diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 938f37d..0000000 --- a/AUTHORS +++ /dev/null @@ -1,3 +0,0 @@ -Rocky Bernstein - -# $Id: AUTHORS,v 1.2 2006/03/08 19:15:06 rockyb Exp $ diff --git a/COPYING b/COPYING deleted file mode 100644 index c4ac587..0000000 --- a/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 6cb206e..0000000 --- a/ChangeLog +++ /dev/null @@ -1,788 +0,0 @@ -## -## autogenerated ChangeLog -- don't edit -## - -2006-03-10 Friday 19:33 Rocky Bernstein - - * NEWS: Last change before release - -2006-03-10 Friday 19:07 Rocky Bernstein - - * configure.ac, post-configure.in, ps-watcher.in.in, - tests/basic.t.in: Deal with time on netbsdelf and regression - tests. basic.t.in: generalize time handling - not just cygwin. - post-configure.in configure.ac: clean up a little. - -2006-03-10 Friday 13:12 Rocky Bernstein - - * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Run - ps-watcher in tests with configured Perl location. - -2006-03-10 Friday 12:47 Rocky Bernstein - - * tests/: full.cnf, full.t.in: Add a test and adjust for cygwin. - -2006-03-10 Friday 12:26 Rocky Bernstein - - * configure.ac, post-configure.in, ps-watcher.in.in, - tests/basic.t.in: Changes to make this work on more - architectures. configure.ac, post-configure.in: another attempt - to get invocation work eveywhere basic.t.in: test for cputime; - forgot ! - -2006-03-10 Friday 04:51 Rocky Bernstein - - * configure.ac: Darwin 8 is okay - -2006-03-10 Friday 04:50 Rocky Bernstein - - * configure.ac: Bug in running right Perl in post-configure - -2006-03-10 Friday 03:49 Rocky Bernstein - - * configure.ac, post-configure.in: Use PERL value specified more. - -2006-03-10 Friday 03:39 Rocky Bernstein - - * NEWS, configure.ac: Add configure option to specify Perl location - -2006-03-10 Friday 03:24 Rocky Bernstein - - * tests/args.t.in: typo: it's ok not okay. - -2006-03-10 Friday 03:21 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/args.t.in, - tests/basic.t.in, tests/full.t.in, tests/paction.t: Add minimal - cygwin support - -2006-03-09 Thursday 17:37 Rocky Bernstein - - * configure.ac, post-configure.in, tests/01.pod.t.in, - tests/Makefile.am: 01.pod.t.in: add POD testing routine - configure.ac: do chmod +x on perl-substituted files. - -2006-03-09 Thursday 16:46 Rocky Bernstein - - * NEWS, ps-watcher.in.in: Document security better. - -2006-03-08 Wednesday 22:52 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, home-page/index.html: Get ready - for 1.06 release. - -2006-03-08 Wednesday 22:24 Rocky Bernstein - - * ps-watcher.in.in: Correction in getting signal name. - -2006-03-08 Wednesday 19:21 Rocky Bernstein - - * touch.pl: Reinstate since Makefile.am uses. - -2006-03-08 Wednesday 19:15 Rocky Bernstein - - * AUTHORS, Makefile.am, cvs2cl_usermap, post-configure.in, - ps-watcher.in.in, touch.pl: ps-watcher.in.in: Wasn't terminating - properly. Thanks to David G. Humes for noticing and fixing. - Modernize code a little bit - - *: rocky@panix.com -> rocky@cpan.org touch.pl: now handled inside - post-configure by Perl - -2006-02-03 Friday 02:23 Rocky Bernstein - - * ps-watcher.in.in: One more small typo. - -2006-02-03 Friday 02:15 Rocky Bernstein - - * post-configure.in, ps-watcher.in.in, home-page/index.html: Mostly - small changes: - - ps-watcher.in.in options are now stored in %opts. Some perlpod - grammar fixes. - - post-configure.in: Suggest "make && make check" (and not with - semicolon) - - home-page/index.html: Probably remove a W3C error. - -2006-01-17 Tuesday 10:00 Rocky Bernstein - - * home-page/index.html: Make valid HTML as per W3C. - -2005-10-12 Wednesday 01:14 Rocky Bernstein - - * ps-watcher.in.in, NEWS: Add BUGS section to manual to describe - common problems. - -2005-09-12 Monday 17:03 Rocky Bernstein - - * configure.ac: Now in 1.06cvs territory - -2005-09-12 Monday 17:03 Rocky Bernstein - - * ps-watcher.in.in: Guard against uninitialized variables - -2005-06-22 Wednesday 01:59 Rocky Bernstein - - * home-page/index.html: instead of ? - -2005-06-22 Wednesday 01:57 Rocky Bernstein - - * home-page/index.html: Correct grammar courtesy of Sir Monitor - Lizard, Ph. Mad. - -2005-05-17 Tuesday 22:00 Rocky Bernstein - - * NEWS: What's new. - -2005-05-17 Tuesday 09:56 Rocky Bernstein - - * configure.ac: NetBSD works like FreeBSD - -2005-05-17 Tuesday 09:52 Rocky Bernstein - - * COPYING, Makefile.am, NEWS, config.guess, config.sub, - configure.ac, missing, post-configure.in, docs/Makefile.am, - tests/Makefile.am: configure.ac: Darwin 7 is like Darwin5 & 6. - configure.ac, post-configure.in: check for at least perl 5.6 - - GPL address change. - -2005-04-09 Saturday 18:06 Rocky Bernstein - - * ps-watcher.in.in: Like this a tad better. - -2005-04-04 Monday 23:58 Rocky Bernstein - - * NEWS, ps-watcher.in.in: Note recent change. - -2005-04-04 Monday 23:53 Rocky Bernstein - - * THANKS: Add thanks to Iñaki Sánchez. - -2005-04-04 Monday 23:50 Rocky Bernstein - - * ps-watcher.in.in, tests/basic.cnf.in: Allow $ps_pat to be used in - action. Patch courtesy of Iñaki Sánchez. (i s a n c h e z at - unav dot es) - -2004-09-11 Saturday 13:29 Rocky Bernstein - - * docs/.cvsignore: More pod2htm stuff. - -2004-09-09 Thursday 10:58 Rocky Bernstein - - * NEWS, cvs2cl_header, cvs2cl_usermap: ChangeLog-creation - improvements. - -2004-09-07 Tuesday 13:51 Rocky Bernstein - - * Makefile.am, ps-watcher.in.in, docs/Makefile.am, - samples/port-watch.ini: Make distcheck works. Show how to use - $PROLOG to do a no-ps like thing such as watching a port (via - lsof). - -2004-05-26 Wednesday 13:46 Rocky Bernstein - - * ps-watcher.in.in: Small change. - -2004-05-26 Wednesday 13:42 Rocky Bernstein - - * Makefile.am, configure.ac, ps-watcher.in.in, docs/Makefile.am: - ps-watcher.in.in: smallish changes - call closelog on - termination, add prototype for pod_this(). - - docs/Makefile.am: ignore errors in building manual/html pages - - Makefile.am: target to create ChangeLog when building - distribution - - configure.ac: now in version 1.05 now. Allow maintainer mode (to - create ChangeLog) - -2004-02-15 Sunday 12:03 Rocky Bernstein - - * docs/Makefile.am: Set title to name without the .in. - -2004-01-18 Sunday 12:20 Rocky Bernstein - - * ps-watcher.in.in: Update copyright. - -2004-01-18 Sunday 11:49 Rocky Bernstein - - * ps-watcher.in.in: Improve documentation with respect to - perl-action. - -2004-01-15 Thursday 03:23 Rocky Bernstein - - * ps-watcher.in.in: perldoc fix. - -2004-01-15 Thursday 03:02 Rocky Bernstein - - * tests/paction.t: Regression test for $PROLOG, $EPILOG and - perl-action. - -2004-01-15 Thursday 03:00 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/Makefile.am, - tests/paction.cnf: Add $PROLOG, $EPILOG and perl-action sections. - Allows one to accumulate information over all processes and take - action on that. - -2004-01-10 Saturday 04:39 Rocky Bernstein - - * ps-watcher.in.in: Documentation enhancement, I think. - -2003-11-22 Saturday 12:31 Rocky Bernstein - - * ps-watcher.in.in: And another formatting change... - -2003-11-22 Saturday 12:27 Rocky Bernstein - - * ps-watcher.in.in: One more trivial typo.... - -2003-11-22 Saturday 12:26 Rocky Bernstein - - * ps-watcher.in.in: Documentation typo. - -2003-11-22 Saturday 12:01 Rocky Bernstein - - * NEWS, configure.ac: Get ready for new (minor) release. - -2003-11-21 Friday 02:36 Rocky Bernstein - - * ps-watcher.in.in, tests/basic.cnf.in, tests/basic.t.in: Add - first-trigger feature. - -2003-09-11 Thursday 03:17 Rocky Bernstein - - * NEWS: Get ready for a release. - -2003-09-10 Wednesday 07:30 Rocky Bernstein - - * ps-watcher.in.in: Fix example configuration as suggested in bug - #776229. - -2003-09-05 Friday 00:23 Rocky Bernstein - - * ps-watcher.in.in: More complicated trigger example suggested by - jason - -2003-09-03 Wednesday 02:04 Rocky Bernstein - - * ps-watcher.in.in: Add troubleshooting section - -2003-09-03 Wednesday 01:42 Rocky Bernstein - - * configure.ac, ps-watcher.in.in: Fixes for FreeBSD - -2003-08-31 Sunday 21:22 Rocky Bernstein - - * tests/basic.cnf.in: perhaps some processes use so little CPU that - the elapsed time will round to zero. Deal with it. - -2003-08-30 Saturday 20:49 Rocky Bernstein - - * ps-watcher.in.in: Update date. - -2003-08-29 Friday 10:49 Rocky Bernstein - - * configure.ac: Get ready for another release. - -2003-08-29 Friday 10:48 Rocky Bernstein - - * tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Regression - tests need to deal with timestamped output. - -2003-08-29 Friday 10:47 Rocky Bernstein - - * ps-watcher.in.in: Add syslog-like timestamp to logfile output. - Problems with getting ps-output now appears only on debug output. - -2003-08-29 Friday 10:45 Rocky Bernstein - - * post-configure.in: Use -w (warning) on perl invocation - -2003-08-13 Wednesday 02:33 Rocky Bernstein - - * configure.ac: PS_CAN_RETURN_MULTIPLE_LINES not set on AIX which - broke it. - -2003-07-11 Friday 05:56 Rocky Bernstein - - * Makefile.am: Add sample files - -2003-07-11 Friday 05:47 Rocky Bernstein - - * configure.ac: typo - -2003-07-11 Friday 05:46 Rocky Bernstein - - * configure.ac: Get ready for 1.0 release. - -2003-07-11 Friday 05:43 Rocky Bernstein - - * Makefile.am, tests/Makefile.am, tests/args.t.in, - tests/count.t.in, tests/full.t.in: Make "make distcheck" work. - -2003-07-11 Friday 05:42 Rocky Bernstein - - * THANKS: Update as appropriate. - -2003-07-10 Thursday 12:20 Rocky Bernstein - - * configure.ac, post-configure.in: A tad better for making "make - distcheck" work: Use $srcdir in post-configure and arrange for - srcdir to be passed in. - -2003-07-10 Thursday 11:50 Rocky Bernstein - - * THANKS, TODO, config.cache, configure.ac, ps-watcher.in.in: Deal - with ps (e.g. Solaris's) which return more than one line for a - single pid. - -2003-07-10 Thursday 11:42 Rocky Bernstein - - * ps-watcher.in.in: Stupid mistake - comments are # not /* */. - -2003-05-19 Monday 16:33 Rocky Bernstein - - * configure.ac: Accomodate darwin6 - -2003-05-19 Monday 16:33 Rocky Bernstein - - * tests/args.t.in: Add one test of --nosyslog - -2003-05-19 Monday 15:58 Rocky Bernstein - - * configure.ac: Add AIX support. - -2003-05-16 Friday 00:12 Rocky Bernstein - - * README: IniConf is now called Config::IniFiles - -2003-03-06 Thursday 05:57 Rocky Bernstein - - * configure.ac: Failed full test. Need to add -x. - -2003-03-06 Thursday 05:48 Rocky Bernstein - - * tests/full.cnf: Don't assume first is pid 1! - -2003-03-06 Thursday 05:37 Rocky Bernstein - - * configure.ac, tests/Makefile.am, tests/.cvsignore, - tests/full.cnf, tests/full.t.in: Add test that we can trigger on - watching processes other than the ones under our account. - -2003-03-06 Thursday 03:54 Rocky Bernstein - - * Makefile.am, NEWS, config.guess, configure.ac, docs/Makefile.am, - tests/Makefile.am: Changes for Mac OS/X - -2003-03-04 Tuesday 18:01 Rocky Bernstein - - * aclocal.m4, docs/Makefile.am, tests/Makefile.in: Add more - automake conversion idioms - -2003-03-04 Tuesday 14:14 Rocky Bernstein - - * autogen.sh: Omitted running aclocal, autoconf, automake... - -2003-03-04 Tuesday 14:08 Rocky Bernstein - - * docs/: Makefile.am, Makefile.in: More automake conversion pains. - -2003-03-04 Tuesday 14:05 Rocky Bernstein - - * .cvsignore, MANIFEST: MANIFEST: not used in automake - -2003-03-04 Tuesday 14:03 Rocky Bernstein - - * NEWS, autogen.sh: autogen.sh: useful for CVS NEWS: what's been - happening? - -2003-03-04 Tuesday 13:59 Rocky Bernstein - - * Makefile.am, Makefile.in: More automake conversion work. - Makefile.am: forgot to add Makefile.PL. Makefile.in: superceded - by Makfile.am - -2003-03-04 Tuesday 13:55 Rocky Bernstein - - * AUTHORS, Makefile.am, Makefile.in, NEWS, aclocal.m4, version, - docs/Makefile.am, docs/Makefile.in, tests/Makefile.am, - tests/Makefile.in: Convert to use Makefile.am - -2003-03-04 Tuesday 02:53 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, version, samples/sample.ini, - tests/args.cnf: Changes for BSD/OS. Also potentially a bug in - FreeBSD. - -2003-03-02 Sunday 16:35 Rocky Bernstein - - * ps-watcher.in.in: More small document changes. Make HTML come out - a tad better. - -2003-03-02 Sunday 15:28 Rocky Bernstein - - * ps-watcher.in.in: Update link for netwinder location! - -2003-03-01 Saturday 21:38 Rocky Bernstein - - * MANIFEST: Typo. - -2003-03-01 Saturday 21:37 Rocky Bernstein - - * NEWS: What's up. - -2003-03-01 Saturday 21:35 Rocky Bernstein - - * MANIFEST: Add Changelog - -2003-03-01 Saturday 21:23 Rocky Bernstein - - * samples/sample.ini: Add $args example. - -2003-03-01 Saturday 21:12 Rocky Bernstein - - * MANIFEST, configure.ac, ps-watcher.in.in: Add variables to - control what ps can do, e.g. can nuke header line, has custom - title (for nuking header line), what time variable we can test - on. - -2003-03-01 Saturday 21:09 Rocky Bernstein - - * tests/: .cvsignore, args.t.in, basic.cnf, basic.cnf.in: Don't - assume etime is a ps-variable. Thanks, FreeBSD. - -2003-03-01 Saturday 21:08 Rocky Bernstein - - * docs/Makefile.in: Cater to brain-dead make on FreeBSD. - -2003-02-28 Friday 16:45 Rocky Bernstein - - * MANIFEST, configure.ac: configure.ac: add freebsd4 check - MANIFEST: add args test files - -2003-02-28 Friday 13:37 Rocky Bernstein - - * config.sub: Update with more recent version of this. - -2003-02-28 Friday 12:34 Rocky Bernstein - - * tests/: .cvsignore, args.cnf, args.t.in: Add args regression - test. - -2003-02-28 Friday 12:33 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, tests/Makefile.in, - tests/basic.cnf, tests/basic.t.in, tests/count.t.in: Add args - documentation and regression tests. count.t.in, basic.t.in: set - perl mode for emacs - -2003-02-27 Thursday 23:46 Rocky Bernstein - - * configure.ac, ps-watcher.in.in, version: Add $args variable to - test on entire command. Perpare to make into another version. - -2003-02-27 Thursday 21:21 Rocky Bernstein - - * configure.ac: Add args to the list of variables that are - accepted. - -2003-01-27 Monday 22:41 Rocky Bernstein - - * MANIFEST, configure.stamp, version: MANIFEST: configre.in -> - configure.ac Other files not sure about, but we'll try - initially... - -2003-01-27 Monday 22:37 Rocky Bernstein - - * configure.ac: Remove touch of stamp file. Dunno... - -2003-01-27 Monday 22:35 Rocky Bernstein - - * configure.ac: Bump version number. - -2003-01-27 Monday 22:34 Rocky Bernstein - - * Makefile.in, NEWS, configure.ac, configure.in, ps-watcher.in.in, - samples/sample.ini: Bug in running make dist. - - Small documentation bug in manual and HTML. Had @PROGRAM@ rather - than @PACKAGE@ so name of package was not in man/html. - - Give example where you want to match all processes except one. - - Print out errors in configuration file - - configure.in -> configure.ac (thanks, autoconf) - - Config::IniConf now gives a syntax error for empty section: []. - Change that. - -2002-10-03 Thursday 14:55 rocky - - * .cvsignore: Seems to be a new thing with autoconf. - -2002-10-03 Thursday 14:55 rocky - - * home-page/index.html: Changes to move to sourceforge project: - download/manpage locations changed. Add link to CVS! And add - sourceforge logo. - -2002-09-24 Tuesday 11:21 rocky - - * NEWS: Update as appropriate. - -2002-09-24 Tuesday 11:20 rocky - - * Makefile.in: Bug in running post-configure when doing a "make - dist". Add "perl" to command. - -2002-09-24 Tuesday 11:18 rocky - - * ps-watcher.in.in: Add example which shows excluding a process - from consideration. - -2002-09-24 Tuesday 11:00 rocky - - * .cvsignore: post-configure is derived. - -2002-09-24 Tuesday 10:59 rocky - - * post-configure.in: Things that need to be done after running - configure. In particular, rewrinte #!/bin/perl lines. - -2002-09-24 Tuesday 10:56 rocky - - * NEWS: Document small doc bug. Version is now 0.96 - -2002-09-24 Tuesday 10:54 rocky - - * ps-watcher.in.in: Document typo. Was using @PROGRAM@ instead of - @PACKAGE@. - -2002-02-06 Wednesday 04:55 rocky - - * MANIFEST: Now derived from post-configure.in - -2002-02-06 Wednesday 04:54 rocky - - * configure.in: Remove bsdstart -- space in it mess things up. - -2002-02-06 Wednesday 04:13 rocky - - * tests/basic.t.in: Turn into a derived file. - -2002-02-06 Wednesday 04:13 rocky - - * tests/: .cvsignore, count.t.in: .cvsignore: ignore derived tests - basic.t: is now derived count.t.in: new test - -2002-02-06 Wednesday 04:10 rocky - - * tests/count.cnf: count.cnf: test "none" and $count > 1 basic.cnf: - minor changes like cvs id line. - -2002-02-06 Wednesday 04:10 rocky - - * docs/Makefile.in: Makefile.in: migrating more to automake: use - @PACKAGE@ now. - -2002-02-06 Wednesday 04:09 rocky - - * Makefile.in, aclocal.m4, configure.in, missing, ps-watcher.in.in: - aclocal.m4 missing, Makefile: New files migrating more to - automake. ps-watcher.in.in: fix bug in "once" and "count > 1" - -2001-11-24 Saturday 19:03 rocky - - * home-page/index.html: Update location. - -2001-06-25 Monday 00:23 rocky - - * ps-watcher.in.in: Another example with count != 1 (syslogd) - changed to count > 4 (httpd). count != 1 may be confusing since - when count == 0 we don't trigger. - -2001-06-25 Monday 00:22 rocky - - * samples/sample.ini: Update to show occurs = none. syslogd - example was incorrect. Change to httpd. - -2001-06-25 Monday 00:20 rocky - - * tests/basic.cnf: Add test for when no matching process exists. - -2001-06-25 Monday 00:17 rocky - - * MANIFEST: Add NEWS - -2001-06-25 Monday 00:16 rocky - - * ps-watcher.in.in: Allow "occurs = none" to fire if no processes - exist. Update Copyright too. - -2001-05-31 Thursday 16:24 rocky - - * tests/basic.cnf: looks like [] is no longer valid. - -2000-09-02 Saturday 18:51 rocky - - * ps-watcher.in.in: Comment backtick problem - -2000-09-02 Saturday 18:43 rocky - - * ps-watcher.in.in: Hopefully this time we've fixed the backtick - problem in a process name. - - Improve description section of doc. - -2000-09-02 Saturday 04:07 rocky - - * ps-watcher.in.in: Add --doc option to print text documentation. - Escape backticks in process names - -2000-04-10 Monday 12:17 rocky - - * home-page/index.html: Initial cut. - -2000-04-09 Sunday 22:43 rocky - - * THANKS: Out of babblefish. - -2000-04-09 Sunday 22:25 rocky - - * THANKS: Correct from pecarry-speak. - -2000-04-09 Sunday 22:06 rocky - - * README: This time for sure? - -2000-04-09 Sunday 22:02 rocky - - * ps-watcher.in.in: Add blank line after =pod for brain-dead - Red-Hat 6.1's brain-deat pod2man program. - -2000-04-09 Sunday 21:58 rocky - - * README: Change invocation example. - -2000-04-09 Sunday 20:40 rocky - - * samples/README: Correct file names. Add Id line. - -2000-04-09 Sunday 20:39 rocky - - * samples/sample.ini: Add Id line. - -2000-04-09 Sunday 20:37 rocky - - * samples/README: Document what each sample does. - -2000-04-09 Sunday 20:37 rocky - - * docs/Makefile.in: Makefile.in: add uninstall. - -2000-04-09 Sunday 20:36 rocky - - * Makefile.in, ps-watcher.in.in: Makefile.in: add uninstall. - post-configure: remove Open3 module check ps-watcher.in.in: Lots - of doc changes. Usage on finding no config file. - -2000-04-09 Sunday 20:25 rocky - - * README: Add quick instructions. Correct mistakes. - -2000-04-09 Sunday 20:13 rocky - - * MANIFEST: Add samples readme. - -2000-03-27 Monday 01:54 rocky - - * tests/.cvsignore: Guess we gotta add this one too. - -2000-03-27 Monday 01:53 rocky - - * tests/: Makefile.in, basic.cnf, driver: Now have some basic - tests. - -2000-03-27 Monday 01:51 rocky - - * .cvsignore, MANIFEST, Makefile.in, ps-watcher.in.in: MANIFEST: - it's a Perl thing. But probably a good idea Makefile.in now uses - it ps-watcher.in.in: remove uninitialized variables in - elapsed2secs - -2000-03-22 Wednesday 07:11 rocky - - * samples/sample.ini: Simple first. - -2000-03-22 Wednesday 07:09 rocky - - * samples/sample.ini: Show off more features. - -2000-03-22 Wednesday 07:08 rocky - - * Makefile.in, TODO, configure.in, ps-watcher.in.in: Makefile.in: - Deal with .in.in TODO: remove done things. Add others - (regresssion tests) ps-watcher.in.in: Add signal handling and - stating configuration file As is usual lots of doc changes. - -2000-03-21 Tuesday 03:20 rocky - - * Makefile.PL: To aid perl to GNU factions. - -2000-03-21 Tuesday 03:17 rocky - - * samples/: sample2.ini, solaris.ini: sampl2.ini: change for Linux. - -2000-03-21 Tuesday 03:16 rocky - - * docs/Makefile.in: Don't need L<> warning any more. - -2000-03-21 Tuesday 03:15 rocky - - * TODO, config.cache, configure.in, ps-watcher.in.in: - post-configure with IniConf version 0.97. ps-watcher.in.in - - many small changes for Linux ps output one token max (no - command) if no ps output skip to next line (ignore terminated - processes) - -2000-03-21 Tuesday 02:23 rocky - - * Makefile.in: Make dist works. Get config.guess, config.sub and - @PROGRAM@.in.in - -2000-03-20 Monday 16:14 rocky - - * configure.in: Add Linux stuff and tests/Makefile - -2000-03-20 Monday 16:12 rocky - - * ps-watcher.in.in: Doc changes. - -2000-03-20 Monday 15:43 rocky - - * configure.in: Substitute in PROGRAM. - -2000-03-20 Monday 09:58 root - - * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, - THANKS, TODO, config.cache, config.guess, config.sub, install-sh, - mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, - samples/sample.ini, samples/sample2.ini, samples/solaris.ini: - Imported sources - -2000-03-20 Monday 09:58 root - - * Makefile.in, README, configure.in, ANNOUNCE, COPYING, INSTALL, - THANKS, TODO, config.cache, config.guess, config.sub, install-sh, - mkinstalldirs, ps-watcher.in.in, touch.pl, docs/Makefile.in, - samples/sample.ini, samples/sample2.ini, samples/solaris.ini: - Initial revision - diff --git a/INSTALL b/INSTALL deleted file mode 100644 index b42a17a..0000000 --- a/INSTALL +++ /dev/null @@ -1,182 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/Makefile.PL b/Makefile.PL deleted file mode 100755 index a71d15e..0000000 --- a/Makefile.PL +++ /dev/null @@ -1,4 +0,0 @@ -#/usr/bin/perl -print "Got'cha! This program uses ./configure.\n"; -print "Just a moment while I transfer your call...\n"; -exec "./configure"; diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 594bf1e..0000000 --- a/Makefile.am +++ /dev/null @@ -1,62 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -############################################################################## - -SUBDIRS = docs tests -noinst_SCRIPTS = post-configure.in touch.pl -EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ - touch.pl Makefile.PL \ - samples/README samples/sample.ini samples/sample2.ini \ - samples/port-watch.ini samples/solaris.ini -bin_SCRIPTS = ps-watcher -PERL = @PERL@ - -DISTCLEANFILES = ps-watcher ps-watcher.stamp - - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -# Build all forms of documentation: manual-pages and HTML -test: - echo "Checking that things work.."; \ - (cd tests && $(PERL) ./driver) - -# A timestamp file is used to record whether or not we've created -# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more -# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. -$(PACKAGE).stamp: $(PACKAGE) - @cp -p $(PACKAGE) $(PACKAGE).in ; \ - $(srcdir)/touch.pl $@ - -# cvs2cl -MAINTAINERCLEANFILES = ChangeLog - -if MAINTAINER_MODE - -.PHONY: ChangeLog -ChangeLog: - $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P - -ACLOCAL_AMFLAGS=-I . - -endif - - - - diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 8272b6d..0000000 --- a/Makefile.in +++ /dev/null @@ -1,645 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################## -# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301 USA -############################################################################## - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/post-configure.in \ - $(srcdir)/ps-watcher.in.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS THANKS TODO config.guess \ - config.sub install-sh missing mkinstalldirs -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno configure.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = post-configure ps-watcher.in ps-watcher -am__installdirs = "$(DESTDIR)$(bindir)" -binSCRIPT_INSTALL = $(INSTALL_SCRIPT) -SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) -SOURCES = -DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-exec-recursive install-info-recursive \ - install-recursive installcheck-recursive installdirs-recursive \ - pdf-recursive ps-recursive uninstall-info-recursive \ - uninstall-recursive -ETAGS = etags -CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -SUBDIRS = docs tests -noinst_SCRIPTS = post-configure.in touch.pl -EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \ - touch.pl Makefile.PL \ - samples/README samples/sample.ini samples/sample2.ini \ - samples/port-watch.ini samples/solaris.ini - -bin_SCRIPTS = ps-watcher -DISTCLEANFILES = ps-watcher ps-watcher.stamp - -# cvs2cl -MAINTAINERCLEANFILES = ChangeLog -@MAINTAINER_MODE_TRUE@ACLOCAL_AMFLAGS = -I . -all: all-recursive - -.SUFFIXES: -am--refresh: - @: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -post-configure: $(top_builddir)/config.status $(srcdir)/post-configure.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ps-watcher.in: $(top_builddir)/config.status $(srcdir)/ps-watcher.in.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -ps-watcher: $(top_builddir)/config.status ps-watcher.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-binSCRIPTS: $(bin_SCRIPTS) - @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - if test -f $$d$$p; then \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ - else :; fi; \ - done - -uninstall-binSCRIPTS: - @$(NORMAL_UNINSTALL) - @list='$(bin_SCRIPTS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ - echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ - rm -f "$(DESTDIR)$(bindir)/$$f"; \ - done -uninstall-info-am: - -# This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - dot_seen=yes; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/samples $(distdir)/tests - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done - list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(mkdir_p) "$(distdir)/$$subdir" \ - || exit 1; \ - distdir=`$(am__cd) $(distdir) && pwd`; \ - top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ - (cd $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$top_distdir" \ - distdir="$$distdir/$$subdir" \ - distdir) \ - || exit 1; \ - fi; \ - done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' -distuninstallcheck: - @cd $(distuninstallcheck_dir) \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(SCRIPTS) -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -info: info-recursive - -info-am: - -install-data-am: - -install-exec-am: install-binSCRIPTS - -install-info: install-info-recursive - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-binSCRIPTS uninstall-info-am - -uninstall-info: uninstall-info-recursive - -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-recursive distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-binSCRIPTS install-data \ - install-data-am install-exec install-exec-am install-info \ - install-info-am install-man install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic mostlyclean-recursive pdf \ - pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ - uninstall-binSCRIPTS uninstall-info-am - - -# Build all forms of documentation: manual-pages and HTML -test: - echo "Checking that things work.."; \ - (cd tests && $(PERL) ./driver) - -# A timestamp file is used to record whether or not we've created -# $(PROGRAM) from $(PROGRAM).in. During debugging if is often more -# convenient to modify $(PROGRAM) rather than $(PROGRAM).in. -$(PACKAGE).stamp: $(PACKAGE) - @cp -p $(PACKAGE) $(PACKAGE).in ; \ - $(srcdir)/touch.pl $@ - -@MAINTAINER_MODE_TRUE@.PHONY: ChangeLog -@MAINTAINER_MODE_TRUE@ChangeLog: -@MAINTAINER_MODE_TRUE@ $(CVS2CL) -W 450 --header $(srcdir)/cvs2cl_header --utc -w -I ChangeLog --usermap $(srcdir)/cvs2cl_usermap -P -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/NEWS b/NEWS deleted file mode 100644 index f0d0709..0000000 --- a/NEWS +++ /dev/null @@ -1,91 +0,0 @@ -Changes from 1.05 to 1.06 (March 10, 2006) - -- Add minimal cygwin support; go over NetBSD and OpenBSD support - -- Add --path option to specify path used in running commands - -- ps-watcher wasn't terminating properly when given a signal. Thanks - to David G. Humes for noticing and fixing. - -- Modernize code a little bit. - -- Guard against unintialized variable conf_time - -- Add BUGS section to manual to describe common problems. - -- Add configure option to specify Perl location - - -Changes from 1.04 to 1.05 (May 18, 2005) - -- Allow $ps_pat to be used in an action. -- Show how to use PROLOG to do non-ps-like things such as watching a - port (via lsof). -- OS tweeks: NetBSD works like FreeBSD, Darwin 7 works. - -Changes from 1.03 to 1.04 (Jan 18, 2004) - -- Add $PROLOG, $EPILOG and perl-action sections. Allows one to - accumulate information over all processes and take action on that. - -- ps-variable order in GNU/Linux was changed to ensure that single-token - attributes don't get messed up by multiple-token attributes. - -Changes from 1.02 to 1.03 (Nov 22, 2003) - -- Add occurs=first-trigger to stop after first trigger rather than first - pattern match. - -Changes from 1.01 to 1.02 (Sept 10, 2003) - Small bug fixes/feature enhancements and documentation fixes. - -Changes from 1.0 to 1.01 (Aug 21, 2003) - -- Log output (not syslog) now contains timestamp, program and process name - -- Errors concerning getting ps information logged only at debug levels - -- Add -w to perl invocation. - -Changes from 0.99 to 1.0 (Jul 10, 2003) - Provision for ps returning multiple lines of output. (Solaris does this for - LWP processes) - make "make distcheck" work. - -Changes from 0.98 to 0.99: (May 19, 2003) - Add AIX support, accomodate Darwin6. - -Changes from 0.97 to 0.98: (Mar 5, 2003) - Works now on BSD/OS and Mac OS/X - Bug fix for FreeBSD. - Convert to use automake - -Changes from 0.96 to 0.97: (Mar 1, 2003) - Portablity fixes - Now runs on FreeBSD. - Tested on the sourceforge compile farm. - Add $args variable to be able to use full ps command. Useful for working - with scripts that list the interpreter rather than the script name. - -Changes from 0.95 to 0.96: - Bug in running make dist. - - Small documentation bug in manual and HTML. Had @PROGRAM@ rather than - @PACKAGE@ so name of package was not in man/html. - - Give example where you want to match all processes except one. - - Print out errors in configuration file - - configure.in -> configure.ac (thanks, autoconf) - - Config::IniConf now gives a syntax error for empty section: []. - Change that. - - -Changes 0.93 - 0.95 - -Make "occurs = none" mean to run if there are no matching ps processes. - -ps-watcher 0.93 -- first general release. - -$Id: NEWS,v 1.27 2006/03/10 19:33:59 rockyb Exp $ diff --git a/README b/README deleted file mode 100644 index ddcecb9..0000000 --- a/README +++ /dev/null @@ -1,41 +0,0 @@ -This directory holds the distribution for ps-watcher, a program for -montoring a system via ps-like commands. - -Short instructions. Type: - cd ps-watcher-* - make - -If make fails you probably need to get IniConf. It it works then... - - ./ps-watcher --nosyslog --log --config ./samples/sample.ini - -Read the documentation to understand what you did. - ----- - -Documentation is in docs directory. - -All of the source code is covered by the GNU GENERAL PUBLIC -LICENSE. See COPYING for details on this. - -To use the program you will need Perl version 5.003 or greater -installed and the following modules: - - Sys::Syslog - File::Basename - Config::IniFiles - Getopt::Long - -The only one of these that is not part of the core Perl distribution -is Config::IniFiles which can be found at: - -http://www.cpan.org/modules/by-module/Config/ - -In order to run the program you'll need a configuration file to -use. Some samples configuration files can be found in the samples -directory. See the README in that directory for a description of -what the configuration files do. - -See INSTALL for generic GNU configure instructions. - -$Id: README,v 1.7 2003/05/16 00:12:59 rockyb Exp $ diff --git a/THANKS b/THANKS deleted file mode 100644 index 3243bdf..0000000 --- a/THANKS +++ /dev/null @@ -1,29 +0,0 @@ -Thanks to various people I worked with at the Associated Press who -have made suggestions. - -This program uses Config::IniFiles (originally called IniConf). Thus -thanks are due to Scott Hutton. Rich Bowen (rbowen@rcbowen.com) now -maintains Config::IniFiles and incorporated my changes to the program that -allow regular expressions to be specified in "section" heads. - -Dave Humes - reporting regression between 1.04 and 1.05 in termination -code and why. - -James R Grinter suggested and provided code to allow the -program to fire when no matching processes (e.g. when a process that -should be running has died). - -Thanks to Jason Welsh for helping to track down -a Solaris problem where ps returned multiple lines of output. - -Thanks to Iñaki Sánchez for the patch that allows one to use $ps_pat in -the action statement. - -Musicological supervision by Stuart Frankel , -cutrate Ph.D. - -$Id: THANKS,v 1.8 2006/03/08 19:17:33 rockyb Exp $ - - - - diff --git a/TODO b/TODO deleted file mode 100644 index 6e5268b..0000000 --- a/TODO +++ /dev/null @@ -1,12 +0,0 @@ -AIX and Linux ps allow custom output lines which means we can enclose -fields in quotes and thus allow variables which have embedded -blanks. Should make use of that. - -For now we only can handle one configuration file. Should allow many. - -Use IPC::Open3? -- it preserves STDERR and STDOUT. Backtick (`cmd`) -doesn't seem to. - -Add more regression tests. - -$Id: TODO,v 1.7 2003/07/10 11:50:21 rockyb Exp $ diff --git a/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index bd3efda..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,603 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 Free Software Foundation, Inc. -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.9.6])]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# The reason of the latter failure is that $top_srcdir and $ac_aux_dir -# are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 7 - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# Do all the work for Automake. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# This macro actually does too much. Some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.58])dnl -dnl Autoconf wants to disallow AM_ names. We explicitly allow -dnl the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -AC_REQUIRE([AM_PROG_MKDIR_P])dnl -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- -# From Jim Meyering - -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -AC_DEFUN([AM_MAINTAINER_MODE], -[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) - dnl maintainer-mode is disabled by default - AC_ARG_ENABLE(maintainer-mode, -[ --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - USE_MAINTAINER_MODE=$enableval, - USE_MAINTAINER_MODE=no) - AC_MSG_RESULT([$USE_MAINTAINER_MODE]) - AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) - MAINT=$MAINTAINER_MODE_TRUE - AC_SUBST(MAINT)dnl -] -) - -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_MKDIR_P -# --------------- -# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. -# -# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories -# created by `make install' are always world readable, even if the -# installer happens to have an overly restrictive umask (e.g. 077). -# This was a mistake. There are at least two reasons why we must not -# use `-m 0755': -# - it causes special bits like SGID to be ignored, -# - it may be too restrictive (some setups expect 775 directories). -# -# Do not use -m 0755 and let people choose whatever they expect by -# setting umask. -# -# We cannot accept any implementation of `mkdir' that recognizes `-p'. -# Some implementations (such as Solaris 8's) are not thread-safe: if a -# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' -# concurrently, both version can detect that a/ is missing, but only -# one can create it and the other will error out. Consequently we -# restrict ourselves to GNU make (using the --version option ensures -# this.) -AC_DEFUN([AM_PROG_MKDIR_P], -[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi -AC_SUBST([mkdir_p])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 3 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/config.guess b/config.guess deleted file mode 100755 index 396482d..0000000 --- a/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[45]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c < -# include -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/config.sub b/config.sub deleted file mode 100755 index fab0aa3..0000000 --- a/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 -Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | 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 \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-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. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | 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-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa-* \ - | ymp-* \ - | z8k-*) - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - 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 - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/configure b/configure deleted file mode 100755 index c895b65..0000000 --- a/configure +++ /dev/null @@ -1,3140 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="ps-watcher.in.in" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CVS2CL MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S PERL PS PS_ARGS PS_ARGS_FMT PS_FULLCMD_FMT PS_NO_NULL_HEADER PS_CAN_RETURN_MULTIPLE_LINES PS_CUSTOM_HEADER PS_PID_OPTS PS_TIME_VAR PS_VARS LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue - fi - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; - - -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "enable_$ac_feature='$ac_optarg'" ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - eval "with_$ac_package='$ac_optarg'" ;; - - -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } -fi - -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias - -# -# Report the --help message. -# -if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF -\`configure' configures this package to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -_ACEOF - - cat <<_ACEOF -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-maintainer-mode enable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-perl set path to Perl - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_sep= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; - 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - esac - done -done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - cat <<\_ASBOX -## ---------------- ## -## Cache variables. ## -## ---------------- ## -_ASBOX - echo - # The following way of writing the cache mishandles newlines in values, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status - ' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; - esac - fi -else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" - case $ac_old_set,$ac_new_set in - set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - - - - - - - - - - - - - - - - - -am__api_version="1.9" -ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install-sh -c" - break - elif test -f $ac_dir/install.sh; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f $ac_dir/shtool; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 -echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} - { (exit 1); exit 1; }; } -fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } - fi - - test "$2" = conftest.file - ) -then - # Ok. - : -else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } -fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" -# Use a double $ so make ignores it. -test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. -# By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} -fi - -if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then - # We used to keeping the `.' as first argument, in order to - # allow $(mkdir_p) to be used without argument. As in - # $(mkdir_p) $(somedir) - # where $(somedir) is conditionally defined. However this is wrong - # for two reasons: - # 1. if the package is installed by a user who cannot write `.' - # make install will fail, - # 2. the above comment should most certainly read - # $(mkdir_p) $(DESTDIR)$(somedir) - # so it does not work when $(somedir) is undefined and - # $(DESTDIR) is not. - # To support the latter case, we have to write - # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), - # so the `.' trick is pointless. - mkdir_p='mkdir -p --' -else - # On NextStep and OpenStep, the `mkdir' command does not - # recognize any option. It will interpret all options as - # directories to create, and then abort because `.' already - # exists. - for d in ./-p ./--version; - do - test -d $d && rmdir $d - done - # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. - if test -f "$ac_aux_dir/mkinstalldirs"; then - mkdir_p='$(mkinstalldirs)' - else - mkdir_p='$(install_sh) -d' - fi -fi - -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - test -n "$AWK" && break -done - -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null - -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE=ps-watcher - VERSION=1.06 - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} - - -MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} - -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - STRIP=$ac_ct_STRIP -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - - -CVS2CL=${CVS2CL-"${am_missing_run}cvs2cl"} - -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. -if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval -else - USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 - - -if test $USE_MAINTAINER_MODE = yes; then - MAINTAINER_MODE_TRUE= - MAINTAINER_MODE_FALSE='#' -else - MAINTAINER_MODE_TRUE='#' - MAINTAINER_MODE_FALSE= -fi - - MAINT=$MAINTAINER_MODE_TRUE - - -# Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} - { (exit 1); exit 1; }; } - -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 -build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} - { (exit 1); exit 1; }; } - -fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 -host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - - - -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -echo "$as_me:$LINENO: checking whether ln -s works" >&5 -echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me:$LINENO: result: no, using $LN_S" >&5 -echo "${ECHO_T}no, using $LN_S" >&6 -fi - -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - SET_MAKE= -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - SET_MAKE="MAKE=${MAKE-make}" -fi - - - -# Check whether --with-perl or --without-perl was given. -if test "${with_perl+set}" = set; then - withval="$with_perl" - PERL=$withval -fi; - -## We use a path for perl so the #! line in autoscan will work. -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PERL in - [\\/]* | ?:[\\/]*) - ac_cv_path_PERL="$PERL" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" - ;; -esac -fi -PERL=$ac_cv_path_PERL - -if test -n "$PERL"; then - echo "$as_me:$LINENO: result: $PERL" >&5 -echo "${ECHO_T}$PERL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - -if test "$PERL" = no; then - { { echo "$as_me:$LINENO: error: Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again." >&5 -echo "$as_me: error: Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again." >&2;} - { (exit 1); exit 1; }; } -fi - - -# Extract the first word of "ps", so it can be a program name with args. -set dummy ps; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_path_PS+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PS in - [\\/]* | ?:[\\/]*) - ac_cv_path_PS="$PS" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PS="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - - test -z "$ac_cv_path_PS" && ac_cv_path_PS="no" - ;; -esac -fi -PS=$ac_cv_path_PS - -if test -n "$PS"; then - echo "$as_me:$LINENO: result: $PS" >&5 -echo "${ECHO_T}$PS" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - -## PS_ARGS gives how we get the command line for a given PID. Also see -## description for PS_VARS. - - - - - -## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line - - -## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return -## multiple lines for a process. Solaris's ps does this for processes -## which have many lwp (light-weight processes). - - -## PS_CUSTOM_HEADER specifies whether we can put an = after the argument -## name to remove the header for that variable - - -## PS_PID_OPTS gives how to get the pid and command name needed for -##l first-level breakout. - - -## PS_TIME_VAR gives a variable that we can test time on - - -## PS_VAR gives a list of the PS variables we can query. -## However we must use only those variables that give output as a single -## token since these are parsed one token per variable. For example -## the arguments (args, or comm, or command) shouldn't be listed here. - - -## ======================================================================== -## Need a better way to figure out ps options and to know -## which ones don't have embeded blanks or to parse ps output. -## ======================================================================== -PS_ARGS_FMT='' -PS_FULLCMD_FMT='' -PS_TIME_VAR='' - -case "$host_os" in - aix* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ -etime tty wchan bnd' - ;; - cygwin* ) - PS_ARGS='-l | cut -c 2-10,56-120' - PS_ARGS_FMT='$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"' - PS_FULLCMD_FMT='$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-l | cut -c 2-10,56-120' - PS_VARS='pid ppid pgid winpid tty uid' - ;; - solaris* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=1 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime f s lwp nlwp psr tty addr wchan fname' - ;; - linux* ) - PS_ARGS='-www -o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o cmd=' - # Make sure we put known single tokens at the beginning like uid. - PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ -cputime drs dsiz egroup eip esp etime euser f fgid \ -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ -group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ -pmem ppid pri rgroup rss rssize rsz ruser s sess session \ -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ -stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ -user vsize vsz wchan' - PS_TIME_VAR='etime' - ;; - netbsdelf2* | openbsd* ) - PS_ARGS='-o args' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cpu' - ;; - netbsd* | freebsd4* ) - PS_ARGS='-O command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - ;; - bsdi4* ) - PS_ARGS='-www -o command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_TIME_VAR='cputime' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - ;; - darwin5* | darwin6* | darwin7* | darwin8* ) - PS_PID_OPTS='-a -x -o pid= -o ucomm' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rss rsz \ -ruid ruser sess sig sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - PS_ARGS='-www -o command' - PS_NO_NULL_HEADER=1 - PS_CUSTOM_HEADER=0 - PS_CAN_RETURN_MULTIPLE_LINES=0 - ;; - * ) - echo "Don't know $host_os. Winging it." - PS_ARGS='' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime tty addr wchan fname' - PS_TIME_VAR='etime' -esac - - ac_config_files="$ac_config_files post-configure" - - ac_config_files="$ac_config_files tests/01.pod.t" - - ac_config_files="$ac_config_files tests/args.t" - - ac_config_files="$ac_config_files tests/basic.t" - - ac_config_files="$ac_config_files tests/count.t" - - ac_config_files="$ac_config_files tests/full.t" - - ac_config_files="$ac_config_files ps-watcher.in" - - ac_config_files="$ac_config_files ps-watcher" - - - ac_config_files="$ac_config_files Makefile docs/Makefile tests/basic.cnf tests/Makefile" -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - -# Transform confdefs.h into DEFS. -# Protect against shell expansion while executing Makefile rules. -# Protect against Makefile macro expansion. -# -# If the first sed substitution is executed (which looks for macros that -# take arguments), then we branch to the quote section. Otherwise, -# look for a macro that doesn't take arguments. -cat >confdef2opt.sed <<\_ACEOF -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g -t quote -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g -t quote -d -: quote -s,[ `~#$^&*(){}\\|;'"<>?],\\&,g -s,\[,\\&,g -s,\],\\&,g -s,\$,$$,g -p -_ACEOF -# We use echo to avoid assuming a particular line-breaking character. -# The extra dot is to prevent the shell from consuming trailing -# line-breaks from the sub-command output. A line-break within -# single-quotes doesn't work because, if this script is created in a -# platform that uses two characters for line-breaks (e.g., DOS), tr -# would break. -ac_LF_and_DOT=`echo; echo .` -DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'` -rm -f confdef2opt.sed - - -ac_libobjs= -ac_ltlibobjs= -for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue - # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${CONFIG_STATUS=./config.status} -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln -else - as_ln_s='cp -p' -fi -rm -f conf$$ conf$$.exe conf$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -cat >>$CONFIG_STATUS <<\_ACEOF - -ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. - -Usage: $0 [OPTIONS] [FILE]... - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - -Configuration files: -$config_files - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` - ac_shift=: - ;; - -*) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" - ac_need_defaults=false;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; } ;; - - *) ac_config_targets="$ac_config_targets $1" ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - - - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "post-configure" ) CONFIG_FILES="$CONFIG_FILES post-configure" ;; - "tests/01.pod.t" ) CONFIG_FILES="$CONFIG_FILES tests/01.pod.t" ;; - "tests/args.t" ) CONFIG_FILES="$CONFIG_FILES tests/args.t" ;; - "tests/basic.t" ) CONFIG_FILES="$CONFIG_FILES tests/basic.t" ;; - "tests/count.t" ) CONFIG_FILES="$CONFIG_FILES tests/count.t" ;; - "tests/full.t" ) CONFIG_FILES="$CONFIG_FILES tests/full.t" ;; - "ps-watcher.in" ) CONFIG_FILES="$CONFIG_FILES ps-watcher.in" ;; - "ps-watcher" ) CONFIG_FILES="$CONFIG_FILES ps-watcher" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; - "tests/basic.cnf" ) CONFIG_FILES="$CONFIG_FILES tests/basic.cnf" ;; - "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 -} - -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@CVS2CL@,$CVS2CL,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@LN_S@,$LN_S,;t t -s,@PERL@,$PERL,;t t -s,@PS@,$PS,;t t -s,@PS_ARGS@,$PS_ARGS,;t t -s,@PS_ARGS_FMT@,$PS_ARGS_FMT,;t t -s,@PS_FULLCMD_FMT@,$PS_FULLCMD_FMT,;t t -s,@PS_NO_NULL_HEADER@,$PS_NO_NULL_HEADER,;t t -s,@PS_CAN_RETURN_MULTIPLE_LINES@,$PS_CAN_RETURN_MULTIPLE_LINES,;t t -s,@PS_CUSTOM_HEADER@,$PS_CUSTOM_HEADER,;t t -s,@PS_PID_OPTS@,$PS_PID_OPTS,;t t -s,@PS_TIME_VAR@,$PS_TIME_VAR,;t t -s,@PS_VARS@,$PS_VARS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - - # Run the commands associated with the file. - case $ac_file in - post-configure ) chmod +x post-configure ;; - tests/01.pod.t ) chmod +x tests/01.pod.t ;; - tests/args.t ) chmod +x tests/args.t ;; - tests/basic.t ) chmod +x tests/basic.t ;; - tests/count.t ) chmod +x tests/count.t ;; - tests/full.t ) chmod +x tests/full.t ;; - ps-watcher ) ./post-configure $srcdir || exit 3 ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (exit 0); exit 0; } -_ACEOF -chmod +x $CONFIG_STATUS -ac_clean_files=$ac_clean_files_save - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } -fi - diff --git a/configure.ac b/configure.ac deleted file mode 100644 index 256a632..0000000 --- a/configure.ac +++ /dev/null @@ -1,236 +0,0 @@ -dnl -dnl Require autoconf version 2.50 or greater -dnl -dnl Copyright (C) 2004, 2006 Rocky Bernstein -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2, or (at your option) -dnl any later version. -dnl -dnl This program is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -dnl 02110-1301 USA. - -dnl $Id: configure.ac,v 1.36 2006/03/10 19:07:05 rockyb Exp $ -dnl Process this file with autoconf to produce a configure script. - -AC_INIT(ps-watcher.in.in) -AM_INIT_AUTOMAKE(ps-watcher,1.06) - -AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir) -AM_MAINTAINER_MODE -AC_CANONICAL_HOST - -AC_PREREQ(2.10)dnl dnl Minimum Autoconf version required. - -dnl ============================= -dnl Checks for programs. -dnl ============================= -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET - -AC_ARG_WITH(perl, AC_HELP_STRING([--with-perl], - [set path to Perl]), PERL=$withval) - -## We use a path for perl so the #! line in autoscan will work. -AC_PATH_PROG(PERL, perl, no) - -if test "$PERL" = no; then - AC_MSG_ERROR(Pssst... you need perl in order to use this program.\ - Install it or put it in your path and try again.) -fi - -AC_SUBST(PERL)dnl - -AC_PATH_PROG(PS, ps, no) -AC_SUBST(PS)dnl - -## PS_ARGS gives how we get the command line for a given PID. Also see -## description for PS_VARS. -AC_SUBST(PS_ARGS) - -AC_SUBST(PS_ARGS_FMT) -AC_SUBST(PS_FULLCMD_FMT) - -## PS_NO_NULL_HEADER indicates that we can't get rid of the PS header line -AC_SUBST(PS_NO_NULL_HEADER) - -## PS_CAN_RETURN_MULTIPLE_LINES indicates the ps on this OS can return -## multiple lines for a process. Solaris's ps does this for processes -## which have many lwp (light-weight processes). -AC_SUBST(PS_CAN_RETURN_MULTIPLE_LINES) - -## PS_CUSTOM_HEADER specifies whether we can put an = after the argument -## name to remove the header for that variable -AC_SUBST(PS_CUSTOM_HEADER) - -## PS_PID_OPTS gives how to get the pid and command name needed for -##l first-level breakout. -AC_SUBST(PS_PID_OPTS) - -## PS_TIME_VAR gives a variable that we can test time on -AC_SUBST(PS_TIME_VAR) - -## PS_VAR gives a list of the PS variables we can query. -## However we must use only those variables that give output as a single -## token since these are parsed one token per variable. For example -## the arguments (args, or comm, or command) shouldn't be listed here. -AC_SUBST(PS_VARS) - -## ======================================================================== -## Need a better way to figure out ps options and to know -## which ones don't have embeded blanks or to parse ps output. -## ======================================================================== -PS_ARGS_FMT='' -PS_FULLCMD_FMT='' -PS_TIME_VAR='' - -case "$host_os" in - aix* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \ -etime tty wchan bnd' - ;; - cygwin* ) - PS_ARGS='-l | cut -c 2-10,56-120' - PS_ARGS_FMT=['$opts{ps_prog} -l |cut -c 2-10,56-120|egrep \"^[ \\t]*%d\"'] - PS_FULLCMD_FMT=['$opts{ps_prog} -l|cut -c 2-47,56-120|egrep \"^[ \\t]*%d\"'] - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-l | cut -c 2-10,56-120' - PS_VARS='pid ppid pgid winpid tty uid' - ;; - solaris* ) - PS_ARGS='-o args=' - PS_CAN_RETURN_MULTIPLE_LINES=1 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_TIME_VAR='etime' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime f s lwp nlwp psr tty addr wchan fname' - ;; - linux* ) - PS_ARGS='-www -o args=' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=1 - PS_NO_NULL_HEADER=0 - PS_PID_OPTS='-e -o pid= -o cmd=' - # Make sure we put known single tokens at the beginning like uid. - PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \ -cputime drs dsiz egroup eip esp etime euser f fgid \ -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \ -group ignored intpri lim longtname m_drs m_trs maj_flt majflt \ -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \ -pmem ppid pri rgroup rss rssize rsz ruser s sess session \ -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \ -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \ -stat state stime suid suser svgid svgroup svuid svuser sz time timeout \ -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \ -user vsize vsz wchan' - PS_TIME_VAR='etime' - ;; - netbsdelf2* | openbsd* ) - PS_ARGS='-o args' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cpu' - ;; - netbsd* | freebsd4* ) - PS_ARGS='-O command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login majflt minflt msgrcv \ -msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - ;; - bsdi4* ) - PS_ARGS='-www -o command' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-a -x -o pid= -o ucomm=' - PS_TIME_VAR='cputime' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rlink rss rsz \ -ruid ruser sess sig sigcatch sigignore sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - ;; - darwin5* | darwin6* | darwin7* | darwin8* ) - PS_PID_OPTS='-a -x -o pid= -o ucomm' - PS_VARS='acflag cpu cputime f \ -inblk jobc ktrace ktracep lim login \ -nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \ -paddr pagein pid ppid pri re rgid rss rsz \ -ruid ruser sess sig sigmask sl start state \ -svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \ -wchan xstat' - PS_TIME_VAR='cputime' - PS_ARGS='-www -o command' - PS_NO_NULL_HEADER=1 - PS_CUSTOM_HEADER=0 - PS_CAN_RETURN_MULTIPLE_LINES=0 - ;; - * ) - echo "Don't know $host_os. Winging it." - PS_ARGS='' - PS_CAN_RETURN_MULTIPLE_LINES=0 - PS_CUSTOM_HEADER=0 - PS_NO_NULL_HEADER=1 - PS_PID_OPTS='-e -o pid= -o comm=' - PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \ -pgid sid pri pcpu pmem vsz rss osz nice class time \ -etime stime tty addr wchan fname' - PS_TIME_VAR='etime' -esac - -AC_CONFIG_FILES([post-configure], [chmod +x post-configure]) -AC_CONFIG_FILES([tests/01.pod.t], [chmod +x tests/01.pod.t]) -AC_CONFIG_FILES([tests/args.t], [chmod +x tests/args.t]) -AC_CONFIG_FILES([tests/basic.t], [chmod +x tests/basic.t]) -AC_CONFIG_FILES([tests/count.t], [chmod +x tests/count.t]) -AC_CONFIG_FILES([tests/full.t], [chmod +x tests/full.t]) -AC_CONFIG_FILES([ps-watcher.in]) -AC_CONFIG_FILES([ps-watcher], [./post-configure $srcdir || exit 3]) - -AC_OUTPUT([ - Makefile \ - docs/Makefile \ - tests/basic.cnf \ - tests/Makefile \ -]) diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index 8ea8713..0000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ -# Copyright (C) 2003, 2004 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## - -# Section 8 is system administration -EXT=8 -man8_MANS = $(PACKAGE).$(EXT) - -MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html -EXTRA_DIST = $(man8_MANS) $(PACKAGE).html -DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -# Files making up the documentation part of this package -DOCS = $(man_MANS) $(PACKAGE).html - -# THIS SHOULD BE THE FIRST TARGET! -all: $(DOCS) Makefile - -$(PACKAGE).html: ../$(PACKAGE).in - -pod2html --infile=../$(PACKAGE).in --outfile=$@ - -$(man8_MANS): ../$(PACKAGE).in - -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ diff --git a/docs/Makefile.in b/docs/Makefile.in deleted file mode 100644 index 1bfbfc2..0000000 --- a/docs/Makefile.in +++ /dev/null @@ -1,374 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################## -# $Id: Makefile.am,v 1.8 2005/05/17 09:53:00 rockyb Exp $ -# Copyright (C) 2003, 2004 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = docs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -man8dir = $(mandir)/man8 -am__installdirs = "$(DESTDIR)$(man8dir)" -NROFF = nroff -MANS = $(man8_MANS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ - -# Section 8 is system administration -EXT = 8 -man8_MANS = $(PACKAGE).$(EXT) -MOSTLYCLEANFILES = *~ $(man8_MANS) $(PACKAGE).html -EXTRA_DIST = $(man8_MANS) $(PACKAGE).html -DISTCLEANFILES = pod2htmi.tmp pod2htmd.tmp - -# Files making up the documentation part of this package -DOCS = $(man_MANS) $(PACKAGE).html -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu docs/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu docs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -uninstall-info-am: -install-man8: $(man8_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ - done -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ - done -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(MANS) -installdirs: - for dir in "$(DESTDIR)$(man8dir)"; do \ - test -z "$$dir" || $(mkdir_p) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-man - -install-exec-am: - -install-info: install-info-am - -install-man: install-man8 - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-man - -uninstall-man: uninstall-man8 - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-man8 install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-man uninstall-man8 - - -# THIS SHOULD BE THE FIRST TARGET! -all: $(DOCS) Makefile - -$(PACKAGE).html: ../$(PACKAGE).in - -pod2html --infile=../$(PACKAGE).in --outfile=$@ - -$(man8_MANS): ../$(PACKAGE).in - -pod2man --section=$(EXT) --name=$(PACKAGE) ../$(PACKAGE).in >$@ -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/docs/ps-watcher.8 b/docs/ps-watcher.8 deleted file mode 100644 index bf6dd24..0000000 --- a/docs/ps-watcher.8 +++ /dev/null @@ -1,743 +0,0 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to -.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' -.\" expand to `' in nroff, nothing in troff, for use with C<>. -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "ps-watcher 8" -.TH ps-watcher 8 "2006-03-10" "perl v5.8.8" "User Contributed Perl Documentation" -.SH "NAME" -ps\-watcher \- monitors various processes based on ps\-like information. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -\&\fBps-watcher\fR [\fIoptions\fR...] - [\f(CW\*(C`\-\-config\*(C'\fR] \fIconfig-file\fR -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Periodically a list of processes obtained via \f(CW\*(C`ps\*(C'\fR. More precisely -each item in the list contains the process name (just what's listed in -the \*(L"cmd\*(R" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. -.PP -Some things you might want to watch a daemon or process for: -.IP "\(bu" 2 -check that it is running (hasn't died) -.IP "\(bu" 2 -ensure it is not running too many times -.IP "\(bu" 2 -isn't consuming too much memory (perhaps a memory leak), or I/O -.PP -Some actions you might want to take: -.IP "\(bu" 2 -restart a process -.IP "\(bu" 2 -kill off rampant processes -.IP "\(bu" 2 -send an alert about any of the conditions listed above -.PP -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a \f(CW\*(C`cron\*(C'\fR job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). -.Sh "\s-1OPTIONS\s0" -.IX Subsection "OPTIONS" -.IP "\-\-help" 4 -.IX Item "--help" -Print a usage message on standard error and exit with a return code -of 100. -.Sp -\&\& -.IP "\-\-doc" 4 -.IX Item "--doc" -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. -.Sp -\&\& -.IP "\-\-version" 4 -.IX Item "--version" -Print the version release on standard output and exit with a return -code of 10. -.Sp -\&\& -.IP "\-\-debug \fInumber\fR" 4 -.IX Item "--debug number" -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. -.IP "[\-\-config] \fIconfiguration file\fR" 4 -.IX Item "[--config] configuration file" -Specify configuration file. . -.Sp -See \*(L"\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1FORMAT\s0\*(R" below for information on the format -of the configuration file and \*(L"\s-1EXAMPLE\s0 \s-1CONFIGURATION\s0\*(R" for a complete -example of a configuration file. -.Sp -\&\& -.IP "\-\-log [\fIlog file\fR]" 4 -.IX Item "--log [log file]" -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use \s-1STDERR\s0. The default is -no error log file. See also \-\-syslog below. -.Sp -\&\& -.IP "\-\-syslog | \-\-nosyslog" 4 -.IX Item "--syslog | --nosyslog" -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. -.Sp -\&\& -.IP "\-\-daemon | \-\-nodaemon" 4 -.IX Item "--daemon | --nodaemon" -Run or don't as a daemon. -.Sp -\&\& -.IP "\-\-path \fIsearch-path\fR" 4 -.IX Item "--path search-path" -Specify the executable search path used in running commands. -.IP "\-\-ps\-prog \fIprogram\fR" 4 -.IX Item "--ps-prog program" -One can specify the command that gives ps information. By default, the -command is \fI/bin/ps\fR. -.Sp -\&\& -.IP "\-\-run | \-\-norun" 4 -.IX Item "--run | --norun" -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. -.Sp -\&\& -.IP "\-\-sleep \fIinterval in seconds\fR" 4 -.IX Item "--sleep interval in seconds" -It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option. -.Sp -If a negative number is specified the program is run only once. -.Sp -\&\& -.Sh "\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1MODIFICATION\s0 \s-1AND\s0 \s-1SIGNAL\s0 \s-1HANDLING\s0" -.IX Subsection "CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING" -Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. -.PP -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a \s-1HUP\s0 signal. -.PP -At any time you can increase the level of debug output by sending a -\&\s-1USR1\s0 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a \s-1USR2\s0 signal. -.PP -It is recommended that you terminate ps-watcher via an \s-1INT\s0, \s-1TERM\s0, or \s-1QUIT\s0 -signal. -.SH "CONFIGURATION FILE FORMAT" -.IX Header "CONFIGURATION FILE FORMAT" -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an \*(L"equal\*(R" sign and finally value. That is: -.PP -.Vb 5 -\& # This is a comment line -\& ; So is this. -\& [process-pattern1] -\& parameter1 = value1 -\& parameter2 = value2 -.Ve -.PP -.Vb 3 -\& [process-pattern2] -\& parameter1 = value3 -\& parameter2 = value4 -.Ve -.PP -Comments start with # or ; and take effect to the end of the line. -.PP -This should be familiar to those who have worked with text-readible -Microsoft \f(CW\*(C`.INI\*(C'\fR files. -.PP -Note process patterns, (\fIprocess\-pattern1\fR and \fIprocess\-pattern2\fR -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. \fIcron\fR and \fI[c]ron\fR which refer to the same process even -though they \fIappear\fR to be different. -.PP -As quoted directly from the Config::IniFiles documentation: -.PP -Multiline or multivalued fields may also be defined ala \s-1UNIX\s0 -\&\*(L"here document\*(R" syntax: -.PP -.Vb 4 -\& Parameter=< 1000 -\& occurs = every -\& action = echo "Large program $command matches $ps_pat: $vsz KB" -.Ve -.Sp -.Vb 8 -\& # Fire if /usr/sbin/syslogd is not running. -\& # Since the program matches against the command names, not commands and -\& # arguments, something like: -\& # ps -ef | grep /usr/sbin/syslogd -\& # won't match the below. -\& [(/usr/sbin/)?syslogd] -\& occurs = none -\& action = /etc/init.d/syslogd start -.Ve -.IP "action" 4 -.IX Item "action" -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. -.Sp -Example: -.Sp -.Vb 1 -\& action = /etc/init.d/market_loader.init restart -.Ve -.IP "perl-action" 4 -.IX Item "perl-action" -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with \f(CW$PROLOG\fR and \f(CW$EPILOG\fR sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do. -.Sp -Example: -.Sp -.Vb 5 -\& # A Perl variable initialization. -\& # Since ps-watcher runs as a daemon it's a good idea -\& # to (re)initialize variables before each run. -\& [$PROLOG] -\& perl-action = $root_procs=0; -.Ve -.Sp -.Vb 4 -\& # Keep track of how many root processes we are running -\& [.*] -\& perl-action = $root_procs++ if $uid == 0 -\& occurs = every -.Ve -.Sp -.Vb 3 -\& # Show this count. -\& [$EPILOG] -\& action = echo "I counted $root_procs root processes" -.Ve -.Sh "\s-1EXPANDED\s0 \s-1VARIABLES\s0 \s-1IN\s0 \s-1TRIGGER/ACTION\s0 \s-1CLAUSES\s0" -.IX Subsection "EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES" -Any variables defined in the program can be used in pattern or -action parameters. For example, \f(CW$program\fR can be used to refer to -the name of this program ps\-watcher. -.PP -The following variables can be used in either the pattern or action -fields. -.IP "$action" 4 -.IX Item "$action" -A string containing the text of the action to run. -.Sp -\&\& -.IP "$perl_action" 4 -.IX Item "$perl_action" -A string containing the text of the perl_action to run. -.Sp -\&\& -.IP "$ps_pat" 4 -.IX Item "$ps_pat" -The Perl regular expression specified in the beginning of the section. -.Sp -\&\& -.IP "$command" 4 -.IX Item "$command" -The command that matched \f(CW$ps_pat\fR. -.Sp -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in \f(CW$command\fR are escaped. -.Sp -Example: -.Sp -.Vb 2 -\& # List processes other than emacs (which is a known pig) that use lots -\& # of virtual memory -.Ve -.Sp -.Vb 3 -\& [.*] -\& trigger = $command !~ /emacs$/ && $vsz > 10 -\& action = echo \e"Looks like you have a big \e$command program: \e$vsz KB\e" -.Ve -.Sp -\&\& -.IP "$count" 4 -.IX Item "$count" -The number of times the pattern matched. Presumably the number of -processes of this class running. -.Sp -\&\& -.IP "$trigger" 4 -.IX Item "$trigger" -A string containing the text of the trigger. -.PP -A list of variables specific to this program or fields commonly found in -\&\f(CW\*(C`ps\*(C'\fR output is listed below followed by a description of the more -common ones. See also \f(CW\*(C`ps\*(C'\fR for a more complete -description of the meaning of the field. -.PP -.Vb 11 -\& uid euid ruid gid egid rgid alarm blocked bsdtime c caught -\&cputime drs dsiz egroup eip esp etime euser f fgid -\&fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -\&group ignored intpri lim longtname m_drs m_trs maj_flt majflt -\&min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -\&pmem ppid pri rgroup rss rssize rsz ruser s sess session -\&sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -\&sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -\&stat state stime suid suser svgid svgroup svuid svuser sz time timeout -\&tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -\&user vsize vsz wchan -.Ve -.PP -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's \f(CW\*(C`ps\*(C'\fR will return a line for each \s-1LWP\s0 (light\-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple \f(CW\*(C`ps\*(C'\fR lines is -used. -.PP -\&\& -.IP "$args" 4 -.IX Item "$args" -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). -.Sp -\&\& -.IP "$ppid" 4 -.IX Item "$ppid" -The parent process id. -.Sp -\&\& -.IP "$stime" 4 -.IX Item "$stime" -The start time of the process. -.Sp -\&\& -.IP "$etime" 4 -.IX Item "$etime" -The end time of the process. -.Sp -\&\& -.IP "$pmem" 4 -.IX Item "$pmem" -The process memory. -.Sp -\&\& -.IP "$pcpu" 4 -.IX Item "$pcpu" -The percent \s-1CPU\s0 utilization. -.Sp -\&\& -.IP "$tty" 4 -.IX Item "$tty" -The controlling tty. -.Sp -\&\& -.IP "$szv" 4 -.IX Item "$szv" -Virtual memory size of the process -.Sh "\s-1OTHER\s0 \s-1THINGS\s0 \s-1IN\s0 \s-1TRIGGER\s0 \s-1CLAUSES\s0" -.IX Subsection "OTHER THINGS IN TRIGGER CLAUSES" -To make testing against elapsed time easier, a function \f(CW\*(C`elapse2sec()\*(C'\fR -has been written to parse and convert elapsed time strings in the -format \f(CW\*(C`dd\-hh:mm:ss\*(C'\fR and a number of seconds. -.PP -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as \f(CW\*(C`MINS\*(C'\fR, \f(CW\*(C`HOURS\*(C'\fR, -and \f(CW\*(C`DAYS\*(C'\fR respectively and they have the expected definitions: -.PP -.Vb 3 -\& use constant MINS => 60; -\& use constant HOURS => 60*60; -\& use constant DAYS => HOURS * 24; -.Ve -.PP -Here is an example of the use of \f(CW\*(C`elapsed2sec()\*(C'\fR: -.PP -.Vb 7 -\& # Which processes have been running for more than 3 hours? -\& # Also note use of builtin-function elapsed2secs, variable $etime -\& # and builtin-function HOURS -\& [.] -\& trigger = elapsed2secs('$etime') > 1*DAYS -\& action = echo "$command has been running more than 1 day ($etime)" -\& occurs = every -.Ve -.PP -Please note the quotes around '$etime'. -.SH "EXAMPLE CONFIGURATION" -.IX Header "EXAMPLE CONFIGURATION" -.Vb 1 -\& # Comments start with # or ; and go to the end of the line. -.Ve -.PP -.Vb 4 -\& # The format for each entry is in Microsoft .INI form: -\& # [process-pattern] -\& # trigger = perl-expression -\& # action = program-and-arguments-to-run -.Ve -.PP -.Vb 3 -\& [httpd$] -\& trigger = $count < 4 -\& action = echo "$trigger fired -- You have $count httpd sessions." -.Ve -.PP -.Vb 3 -\& [.] -\& trigger = $vsz > 10 -\& action = echo "Looks like you have a big $command program: $vsz KB" -.Ve -.PP -.Vb 10 -\& # Unfortunately we have use a different pattern below. (Here we use -\& # ".?" instead of ".".) In effect the the two patterns mean -\& # test every process. -\& [.?] -\& trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 -\& occurs = every -\& action = </dev/null 2>&1`; \e$? >> 8 } -\& action = < and it download via - -.SH "AUTHOR" -.IX Header "AUTHOR" -Rocky Bernstein (rocky@cpan.org) -.SH "COPYRIGHT" -.IX Header "COPYRIGHT" -.Vb 6 -\& Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -\& Rocky Bernstein, email: rocky@cpan.org. -\& This program is free software; you can redistribute it and/or modify -\& it under the terms of the GNU General Public License as published by -\& the Free Software Foundation; either version 2 of the License, or -\& (at your option) any later version. -.Ve -.PP -.Vb 4 -\& 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. -.Ve -.PP -.Vb 3 -\& You should have received a copy of the GNU General Public License -\& along with this program; if not, write to the Free Software -\& Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -.Ve diff --git a/docs/ps-watcher.html b/docs/ps-watcher.html deleted file mode 100644 index 59e4414..0000000 --- a/docs/ps-watcher.html +++ /dev/null @@ -1,764 +0,0 @@ - - - - -ps-watcher - monitors various processes based on ps-like information. - - - - - - -

- - - - - -
-

-

-

NAME

-

ps-watcher - monitors various processes based on ps-like information.

-

-

-
-

SYNOPSIS

-

ps-watcher [options...] - [--config] config-file

-

-

-
-

DESCRIPTION

-

Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the ``cmd'' field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code.

-

Some things you might want to watch a daemon or process for:

-
    -
  • -

    check that it is running (hasn't died)

    -
  • -
  • -

    ensure it is not running too many times

    -
  • -
  • -

    isn't consuming too much memory (perhaps a memory leak), or I/O

    -
  • -
-

Some actions you might want to take:

-
    -
  • -

    restart a process

    -
  • -
  • -

    kill off rampant processes

    -
  • -
  • -

    send an alert about any of the conditions listed above

    -
  • -
-

Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a cron job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration).

-

-

-

OPTIONS

-
-
--help - -
-

Print a usage message on standard error and exit with a return code -of 100.

-
-
-

-
- -
--doc - -
-

Extact the full documentation that you are reading now, print it and -exit with a return code of 101.

-
-
-

-
- -
--version - -
-

Print the version release on standard output and exit with a return -code of 10.

-
-
-

-
- -
--debug number - -
-

Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output.

-
- -
[--config] configuration file - -
-

Specify configuration file. .

-
-
-

See CONFIGURATION FILE FORMAT below for information on the format -of the configuration file and EXAMPLE CONFIGURATION for a complete -example of a configuration file.

-
-
-

-
- -
--log [log file] - -
-

Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below.

-
-
-

-
- -
--syslog | --nosyslog - -
-

Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output.

-
-
-

-
- -
--daemon | --nodaemon - -
-

Run or don't as a daemon.

-
-
-

-
- -
--path search-path - -
-

Specify the executable search path used in running commands.

-
- -
--ps-prog program - -
-

One can specify the command that gives ps information. By default, the -command is /bin/ps.

-
-
-

-
- -
--run | --norun - -
-

do/don't run actions go through the motions as though we were going -to. This may be useful in debugging.

-
-
-

-
- -
--sleep interval in seconds - -
-

It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option.

-
-
-

If a negative number is specified the program is run only once.

-
-
-

-
- -
-

-

-

CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING

-

Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file.

-

More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal.

-

At any time you can increase the level of debug output by sending a -USR1 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal.

-

It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT -signal.

-

-

-
-

CONFIGURATION FILE FORMAT

-

The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an ``equal'' sign and finally value. That is:

-
- # This is a comment line
- ; So is this.
- [process-pattern1]
-  parameter1 = value1
-  parameter2 = value2
-
- [process-pattern2]
-  parameter1 = value3
-  parameter2 = value4
-

Comments start with # or ; and take effect to the end of the line.

-

This should be familiar to those who have worked with text-readible -Microsoft .INI files.

-

Note process patterns, (process-pattern1 and process-pattern2 -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. cron and [c]ron which refer to the same process even -though they appear to be different.

-

As quoted directly from the Config::IniFiles documentation:

-

Multiline or multivalued fields may also be defined ala UNIX -``here document'' syntax:

-
-  Parameter=<<EOT
-  value/line 1
-  value/line 2
-  EOT
-

You may use any string you want in place of ``EOT''. Note -that what follows the ``<<'' and what appears at the end of -the text must match exactly, including any trailing -whitespace.

-

There are two special ``process patterns'': $PROLOG and $EPILOG, the -former should appear first and the latter last.

-

You can put perl code to initialize variables here and do cleanup -actions in these sections using ``perl-action.''

-

A description of parameters names, their meanings and potential values -follows.

-
-
trigger - -
-

This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to ``true'' in a Perl -expression.

-
-
-

If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered.

-
-
-

Example:

-
-
-
-  # Match if httpd has not spawned enough (<4) times. NFS and databases
-  # daemons typically spawn child processes.  Since the program
-  # matches against the command names, not commands and arguments,
-  # something like: ps -ef | grep httpd won't match the below.
-  # If you want to match against the command with arguments, see
-  # the example with $args below.
-  [httpd$]
-  trigger = $count <= 4
-
- -
occurs - -
-

This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -``every'', ``first'', ``first-trigger'', and ``none''.

-
-
-

Setting the occurs value to ``none'' causes the the trigger to be -evaluated when there are no matching processes. Although one might -think ``$count == 0'' in the action expression would do the same thing, -currently as coded this does not work.

-
-
-

Setting the occurs value to ``first'' causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true.

-
-
-

Setting the occurs value to ``first-trigger'' causes the process-pattern -rule to be finished after handling the first rule that matches and -the trigger evaluates to true.

-
-
-

If the item parameter is not specified, ``first'' is assumed.

-
-
-

Examples:

-
-
-
-  [.]
-  occurs = first
-  action = echo "You have $count processes running"
-
-
-
-  # Note in the above since there is no trigger specified,
-  #   occurs = first
-  # is the same thing as 
-  #   occurs = first-trigger
-
-
-
-  [.?]
-  trigger = $vsz > 1000
-  occurs  = every
-  action  = echo "Large program $command matches $ps_pat: $vsz KB"
-
-
-
-  # Fire if /usr/sbin/syslogd is not running.
-  # Since the program matches against the command names, not commands and
-  # arguments, something like: 
-  #   ps -ef | grep /usr/sbin/syslogd
-  # won't match the below.
-  [(/usr/sbin/)?syslogd]
-  occurs = none
-  action = /etc/init.d/syslogd start
-
- -
action - -
-

This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true.

-
-
-

Example:

-
-
-
- action = /etc/init.d/market_loader.init restart
-
- -
perl-action - -
-

This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do.

-
-
-

Example:

-
-
-
-  # A Perl variable initialization.
-  # Since ps-watcher runs as a daemon it's a good idea
-  # to (re)initialize variables before each run.
-  [$PROLOG]
-    perl-action = $root_procs=0;
-
-
-
-  # Keep track of how many root processes we are running
-  [.*]
-    perl-action = $root_procs++ if $uid == 0
-    occurs  = every
-
-
-
-  # Show this count.
-  [$EPILOG]
-    action  = echo "I counted $root_procs root processes"
-
- -
-

-

-

EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES

-

Any variables defined in the program can be used in pattern or -action parameters. For example, $program can be used to refer to -the name of this program ps-watcher.

-

The following variables can be used in either the pattern or action -fields.

-
-
$action - -
-

A string containing the text of the action to run.

-
-
-

-
- -
$perl_action - -
-

A string containing the text of the perl_action to run.

-
-
-

-
- -
$ps_pat - -
-

The Perl regular expression specified in the beginning of the section.

-
-
-

-
- -
$command - -
-

The command that matched $ps_pat.

-
-
-

The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped.

-
-
-

Example:

-
-
-
-  # List processes other than emacs (which is a known pig) that use lots
-  # of virtual memory
-
-
-
-  [.*]
-  trigger = $command !~ /emacs$/ && $vsz > 10
-  action  = echo \"Looks like you have a big \$command program: \$vsz KB\"
-
-
-

-
- -
$count - -
-

The number of times the pattern matched. Presumably the number of -processes of this class running.

-
-
-

-
- -
$trigger - -
-

A string containing the text of the trigger.

-
- -
-

A list of variables specific to this program or fields commonly found in -ps output is listed below followed by a description of the more -common ones. See also ps for a more complete -description of the meaning of the field.

-
- uid euid ruid gid egid rgid alarm blocked bsdtime c caught 
-cputime drs dsiz egroup eip esp etime euser f fgid 
-fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser  
-group ignored intpri lim longtname m_drs m_trs maj_flt majflt 
-min_flt  minflt ni nice nwchan opri pagein pcpu pending pgid pgrp 
-pmem ppid pri rgroup rss rssize rsz ruser s sess session 
-sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore 
-sig_pend sigcatch sigignore sigmask stackp start start_stack start_time 
-stat state stime suid suser svgid svgroup svuid svuser sz time timeout 
-tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname 
-user vsize vsz wchan
-

Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's ps will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple ps lines is -used.

-

-
-
$args - -
-

The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris).

-
-
-

-
- -
$ppid - -
-

The parent process id.

-
-
-

-
- -
$stime - -
-

The start time of the process.

-
-
-

-
- -
$etime - -
-

The end time of the process.

-
-
-

-
- -
$pmem - -
-

The process memory.

-
-
-

-
- -
$pcpu - -
-

The percent CPU utilization.

-
-
-

-
- -
$tty - -
-

The controlling tty.

-
-
-

-
- -
$szv - -
-

Virtual memory size of the process

-
- -
-

-

-

OTHER THINGS IN TRIGGER CLAUSES

-

To make testing against elapsed time easier, a function elapse2sec() -has been written to parse and convert elapsed time strings in the -format dd-hh:mm:ss and a number of seconds.

-

Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as MINS, HOURS, -and DAYS respectively and they have the expected definitions:

-
-  use constant MINS   => 60;
-  use constant HOURS  => 60*60;
-  use constant DAYS   => HOURS * 24;
-

Here is an example of the use of elapsed2sec():

-
-  # Which processes have been running for more than 3 hours?
-  # Also note use of builtin-function elapsed2secs, variable $etime
-  # and builtin-function HOURS
-  [.]
-    trigger = elapsed2secs('$etime') > 1*DAYS
-    action  = echo "$command has been running more than 1 day ($etime)"
-    occurs  = every
-

Please note the quotes around '$etime'.

-

-

-
-

EXAMPLE CONFIGURATION

-
-  # Comments start with # or ; and go to the end of the line.
-
-  # The format for each entry is in Microsoft .INI form:
-  # [process-pattern]
-  # trigger = perl-expression
-  # action  = program-and-arguments-to-run
-
-  [httpd$]
-    trigger = $count < 4
-    action  = echo "$trigger fired -- You have $count httpd sessions."
-
-  [.]
-  trigger = $vsz > 10
-  action  = echo "Looks like you have a big $command program: $vsz KB"
-
-  # Unfortunately we have use a different pattern below. (Here we use
-  # ".?" instead of ".".) In effect the the two patterns mean
-  # test every process.
-  [.?]
-    trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40
-    occurs  = every
-    action  = <<EOT
-     echo "$command used $pcpu% CPU for the last $etime seconds" | /bin/mail root
-     kill -TERM $pid
-  EOT
-
-  # Scripts don't show as the script name as the command name on some
-  # operating systems.  Rather the name of the interpreter is listed
-  # (e.g. bash or perl) Here's how you can match against a script.
-  # BSD/OS is an exception: it does give the script name rather than
-  # the interpreter name.
-  [/usr/bin/perl]
-    trigger = \$args !~ /ps-watcher/
-    occurs  = every
-    action  = echo "***found perl program ${pid}:\n $args"
-

-

-
-

Using $PROLOG for getting non-ps information

-

Here is an example to show how to use ps-watcher to do something not -really possible from ps: check to see if a port is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs.

-
-  [$PROLOG]
-    occurs  = first
-    trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 }
-    action  = <<EOT
-    put-your-favorite-command-here arg1 arg2 ...
-  EOT
-

-

-
-

SECURITY CONSIDERATIONS

-

Any daemon such as this one which is sufficiently flexible is a -security risk. The configuration file allows arbitrary commands to be -run. In particular if this daemon is run as root and the configuration -file is not protected so that it can't be modified, a bad person could -have their programs run as root.

-

There's nothing in the ps command or ps-watcher, that requires one to -run this daemon as root.

-

So as with all daemons, one needs to take usual security precautions -that a careful sysadmin/maintainer of a computer would. If you can run -any daemon as an unprivileged user (or with no privileges), do it! If -not, set the permissions on the configuration file and the directory -it lives in.

-

This program can also run chrooted and there is a --path option that -is available which can be used to set the executable search path. All -commands used by ps-watcher are fully qualified, and I generally give a -full execution path in my configuration file, so consider using the -option --path=''.

-

Commands that need to be run as root you can run via sudo. I often -run process accounting which tracks all commands run. Tripwire may be -useful to track changed configuration files.

-

-

-
-

TROUBLESHOOTING

-

To debug a configuration file the following options are useful:

-

ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

-

For even more information and control try running the above under the -perl debugger, e.g.

-

perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 configuration-file

-

-

-
-

BUGS

-

Well, some of these are not so much a bug in ps-watcher so much as a -challenge to getting ps-watcher to do what you want it to do.

-

One common problem people run in into is understanding exactly what -the process variables mean. The manual page ps(1) should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking.

-

Sometimes one will see this error message when debug tracing is turned on:

-
-  ** debug ** Something wrong getting ps variables
-

This just means that the process died betwee the time ps-watcher first -saw the existence of the process and the time that it queried -variables.

-

-

-
-

SEE ALSO

-

See also ps(1) and syslogd(8).

-

Another cool program doing ps-like things is xps. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output ``attractively'' -but fast. You can the find the homepage at -http://motif-pstree.sourceforge.net and it download via -http://prdownloads.sourceforge.net/motif-pstree

-

-

-
-

AUTHOR

-

Rocky Bernstein (rocky@cpan.org)

-

-

-
-

COPYRIGHT

-
-  Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
-  Rocky Bernstein, email: rocky@cpan.org.
-  This program is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
-  (at your option) any later version.
-
-  This program is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this program; if not, write to the Free Software
-  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- - - - diff --git a/install-sh b/install-sh deleted file mode 100755 index ebc6691..0000000 --- a/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# Permission to use, copy, modify, distribute, and sell this software and its -# documentation for any purpose is hereby granted without fee, provided that -# the above copyright notice appear in all copies and that both that -# copyright notice and this permission notice appear in supporting -# documentation, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/missing b/missing deleted file mode 100755 index c72c059..0000000 --- a/missing +++ /dev/null @@ -1,283 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02110-1301, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.3 - GNU automake" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar ${1+"$@"} && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar ${1+"$@"} && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and you do not seem to have it handy on your - system. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequirements for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 diff --git a/mkinstalldirs b/mkinstalldirs deleted file mode 100755 index 3889669..0000000 --- a/mkinstalldirs +++ /dev/null @@ -1,40 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -# $Id: mkinstalldirs,v 1.1.1.1 2000/03/20 09:58:55 root Exp $ - -errstatus=0 - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# mkinstalldirs ends here diff --git a/post-configure.in b/post-configure.in deleted file mode 100755 index c221979..0000000 --- a/post-configure.in +++ /dev/null @@ -1,80 +0,0 @@ -#!@PERL@ -w -# -*- Perl -*- -# $Id: post-configure.in,v 1.10 2006/03/10 19:07:05 rockyb Exp $ -require 5.006; -sub touch_file($); - -$program='@PACKAGE@'; -# -# Do we have a version of perl that we can work with? -# -printf "You have of Perl %s\n", $]; - -# -# Do we have all the packages we need? -# -print "Checking to see that you have all library modules installed...\n"; -@needed_packages = ('Sys::Syslog', - # 'IPC::Open3', # -- to simultate `cmd` better - 'File::Basename', - 'Config::IniFiles', - 'Getopt::Long', - 'Pod::Text' - ); -foreach $package (@needed_packages) { - unless (eval "require $package") { - die "Need package \"$package\": $@"; - } - print " $package is installed\n"; -} - -# -# -# -print "Checking what to put after #! at the top of $program..."; -$startperl = `@PERL@ -V:startperl`; -if ($startperl =~ /^startperl=\'#!(.*)\'\;$/) { - $perlpath = $1; - print "$perlpath\n"; -} else { - $perlpath = ''; - print STDERR "\nCan't determine what to put after #! in $program\n"; - print STDERR "Change the top of the program or arrange for perl to\n"; - print STDERR "execute it.\n"; -} - -print "Rewriting $program.in into $program..."; -die "Cannot read $program.in: $!" if !open(INPUT, "<$program.in"); -die "Cannot write $program: $!" if !open(OUTPUT, ">$program"); -if (!$perlpath) { - print OUTPUT "# Customize this line, for example:\n#!/usr/bin/perl -w\n"; -} else { - print OUTPUT "#!$perlpath -w\n"; -} -@OUTPUT = ; -shift @OUTPUT; # Remove old 1st line. -print OUTPUT @OUTPUT; -print "\n"; -close(OUTPUT); -chmod 0755, $program; - -# Touch a timestamp to record that we've created this $program -# from $program.in. If we later modify $program (which is convenient -# during debugging), we will know to copy that back to $program.in, -# the version that get's checked into CVS. -touch_file("./${program}.stamp"); -exit; - -sub touch_file($) { - my $file_name = $_[0]; - if (-e $file_name) { - my $now = time(); - my $count = utime $now, $now, $file_name; - exit ($count != 1); - } else { - open(FILE, ">", $file_name) || die "Can't open $file_name: $!"; - close(FILE); - exit $?; - } -} - diff --git a/ps-watcher b/ps-watcher deleted file mode 100755 index b95ed40..0000000 --- a/ps-watcher +++ /dev/null @@ -1,1298 +0,0 @@ -#!/usr/bin/perl -w -# -*- Perl -*- -use diagnostics; -my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; -# See usage subroutine or perlpod documentation below. - -# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -# Rocky Bernstein, email: rocky@cpan.org -# -# This program is free software; you can -# redistribute it and/or modify it under the terms of the GNU General -# Public License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args - $count $pid $command $ps_arg_opts $DEVNULL %opts - ); -use strict; -BEGIN { require 5.00503 } - -sub usage($) { - my ($full_help) = @_; - - print " -usage: - - $program [OPTIONS..] - -$program can be used to monitor various processes based on ps-like -information. - -options: - --help -- print this help and exit - --doc -- extract and print complete documentation and exit - --version -- show a CVS version string and exit - --debug *n* -- give debugging output. The higher the - number, the more the output - --run | --norun -- do/don't run actions - go through the motions as though we were going to - --log [*logfile*] -- Set a log file for this program. If option given - but no logfile, then use STDERR. Default is - no error log file. - --syslog | --nosyslog - -- send or don't send error output to syslog - Default is to send to syslog. - --config *cnf file* -- specify configuration file. - - --daemon | --nodaemon - -- do or don't become a daemon. Default daemonize. - --sleep *time* -- sleep interval between iterations. The default is - $opts{sleep_interval} seconds. - --path path -- executable search path to use in running commands - - --ps-prog *program* -- command that gets ps information. The default is: - $opts{ps_prog} - --ps-pids-opt *ps opts* - -- ps options that lists pids and commands. The - default is: $opts{ps_pid_opts} -"; - - if ($full_help) { - print " -General operation: - -Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the \"command\" field, not the full command and arguments) and its -process id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the process names against. For -each match, a Perl expression specified for that pattern is -evaluated. The evaluated expression can refer to variables which are -set by ps and pertain to the matched process(es), for example the -amount memory consumed by the process, or the total elapsed time. Some -other variables are set by the program, such as the number of times -the process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert. - -This program can be used to ensure a daemon hasn't died or ensure it -is not running too many times. It might be used to determine when a -process has consumed too many resources (for example due to a memory -leak). - -The following variables can be used in patterns or actions: -\t". '$' . join("\n\t\$", @ps_vars) . -" - The following is a sample config file: - -# Comments start with # or ; and go to the end of the line. - -# The format for each entry is in Microsoft .INI form: -# [process-pattern] -# trigger = perl-expression -# action = program-and-arguments-to-run - -[httpd\$] - trigger = \$count < 4 - action = echo \"\$trigger fired -- You have \$count \$command sessions.\" - -[em?cs] -trigger = \$vsz > 10 -action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -"; - } - exit 100; -} - -sub init(); -sub podthis(); -sub process_options(); -sub show_version(); -sub daemonize(); -sub eval_trigger_action($$$); -sub make_the_rounds($); -sub elapsed2secs($); -sub logger($); -sub debug_log($$); -sub gather_psinfo(); -sub read_config($); -sub check_config_file($); -sub run_trigger($$$); - -init(); -process_options(); - -# Unfurl the banner... -logger("Starting: $vcid"); - -my $cfg=read_config($opts{conf_file}); - -if (!defined($cfg)) { - for my $line (@Config::IniFiles::errors) { - logger($line); - } - exit 2; -} - -if ($opts{daemon}) { - daemonize(); -} - -install_handlers(); - -do { - make_the_rounds($cfg); - sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; - check_config_file($opts{conf_file}); -} until ($opts{sleep_interval} < 0) ; -if ($opts{syslog}) { - use Sys::Syslog; - closelog; -} -exit 0; - -# Evaluates the trigger and if that's true also performs -# an action. 1 is returned if the action was performed, -# zero otherwise. -sub eval_trigger_action($$$) { - my ($trigger,$action,$perl_action) = @_; - my $etrigger=$trigger; - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - if (defined($perl_action)) { - debug_log("running Perl_action: $perl_action", 2); - eval($perl_action) if $opts{run}; - } - if (defined($action)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } - return 1; - } - return 0; -} - -# Perform a round over the process_patterns comparing against the -# process info to see if anything's stirring. -sub make_the_rounds($) { - my $cfg = $_[0]; - my @ps_info=gather_psinfo(); - foreach our $ps_pat ($cfg->Sections()) { - debug_log("process pattern: /$ps_pat/", 1); - my @selected_ps; - my $in_prolog_epilog=0; - my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; - my $action = $cfg->val($ps_pat, 'action'); - my $perl_action = $cfg->val($ps_pat, 'perl-action'); - my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; - local $count; - if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { - # Set to run trigger below. - $count = @ps_info; - $in_prolog_epilog=1; - } else { - @selected_ps = grep(/$ps_pat/, @ps_info); - $count = @selected_ps; - debug_log("count for /$ps_pat/: $count", 2); - } - if ($in_prolog_epilog) { - # execute trigger - eval_trigger_action($trigger, $action, $perl_action); - } elsif ($occurs =~ /none/i) { - if ($count eq 0) { - # execute the trigger anyway - eval_trigger_action($trigger, $action, $perl_action); - } - } elsif ($count gt 0) { - TRIGGER: - foreach (@selected_ps) { - next if !/\s*(\d+)\s+(\S+)/; - local($pid, $command) = /\s*(\d+)\s+(\S+)/; - if ($pid !~ /\d+/) { - logger("Something wrong with ps format:\n$_"); - next; - } - - my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; - my @output = `$ps_fullcmd`; - my $output=''; - if (@output == 1) { - # Got one line of output - good. - $output=$output[0]; - # Make sure though we don't just have a title line. - # One of the fields should be just digits, e.g. ppid, uid, gud... - next if $output !~ m{\s+\d+\s+}; - } elsif (@output == 2 && 0) { - # Got two lines of output - we are running a ps where - # we can't remove the title line? - $output=$output[1]; - } elsif (@output > 1 && 0) { - # Got multiple lines of output - we are running a ps which can - # do so. For example Solaris does this for a process that has many - # LWPs (light-weight processes). - $output=$output[0]; - } else { - debug_log("Something wrong getting ps variables", 1); - next; - } - - local $args = ''; - if ($ps_arg_opts) { - my $ps_argscmd = sprintf $ps_args_fmt, $pid; - my @output = `$ps_argscmd`; - if (@output == 1) { - $args=$output[0]; - } elsif (@output == 2 && 0) { - $args=$output[1]; - } else { - debug_log("Something wrong with getting command arguments", 1); - } - } - - # Process may have disappeared. In this case we'll get no - # output. - next if !$output; - - # Add ' ' so split will junk first ps_dvars $junk. - $output = ' ' . $output; - my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; - { - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - - # Escape backticks so that we don't inadvertently run - # the program. For example there could be a process named - # `/tmp/evilcommand` (with backticks). Thanks to Randal - # Schwartz for noticing the problem. - # Not sure if there are other things to watch out for. - # Although the Perl Cookbook suggests how to make system, - # safe, it is silent about making eval safe. - $command =~ s/`/\\`/g; - - if (eval ($perl_ps_assign)) { - my $evaled = eval_trigger_action($trigger, $action, - $perl_action); - last TRIGGER if $evaled && $occurs eq 'first-trigger'; - last TRIGGER if $occurs eq 'first'; - } else { - logger("Something wrong with perl assignment: $perl_ps_assign"); - last TRIGGER; - } - } # no strict - } # foreach - } # if $count - } -} - -# Initailize various variables variously. -sub init() { - - use File::Basename; - $program = basename($0); # Who am I today, anyway? - - $DEVNULL = '/dev/null'; # And what do we do about non Unix? - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - - $opts{debug} = 0; # no debugging - $opts{run} = 1; # run actions - $opts{syslog} = 1; # Log errors to syslog - $opts{logfile} = $DEVNULL; - $opts{daemon} = 1; # Run as daemon; - $opts{ps_prog} = '/bin/ps'; # Where is ps? - $opts{ps_pid_opts} = '-e -o pid= -o cmd='; # How do I get pids and commands? - - $ps_arg_opts = '-www -o args='; # How do I get full process command? - - # List of all the fields from ps we will be able to use. Don't need - # to list variables listed above. - @ps_vars = qw ( uid euid ruid gid egid rgid alarm blocked bsdtime c caught -cputime drs dsiz egroup eip esp etime euser f fgid -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -group ignored intpri lim longtname m_drs m_trs maj_flt majflt -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -pmem ppid pri rgroup rss rssize rsz ruser s sess session -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -stat state stime suid suser svgid svgroup svuid svuser sz time timeout -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -user vsize vsz wchan -); - - # Convert the above into an argument list like - # ($junk, $user, ... ) - # The first argument ($junk) will be null and thrown out. - $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; - - $opts{sleep_interval} = 300; - -} - -# The bane of programming. -sub process_options() { - use Getopt::Long; - my(@opt_cf); - $Getopt::Long::autoabbrev = 1; - my($newstyle_config); - - my ($help, $long_help, $show_version); - - my $result = &GetOptions - ( - 'help' => \$help, - 'doc' => \$long_help, - 'version' => \$show_version, - 'config=s' => \$opts{conf_file}, - 'debug=i' => \$opts{debug}, - 'path=s' => \$ENV{PATH}, - 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, - 'ps-prog=s' => \$opts{ps_prog}, - 'sleep=i' => \$opts{sleep_interval}, - 'log:s' => \$opts{logfile}, - 'syslog!' => \$opts{syslog}, - 'run!' => \$opts{run}, - 'daemon!' => \$opts{daemon}, - ); - - show_version() if $show_version; - usage(1) if $help; - podthis() if $long_help; - - # However specifying a configuration file is not. - # Nor can we deal with multiple configuration files or tolerate - # option-processing errors. - usage(0) if !$result; - - # The option-specifier "--config" is optional... - if (@ARGV && !defined($opts{conf_file})) { - $opts{conf_file} = shift(@ARGV); - } - - # However we do have to give exactly one configurtion file. - if (!defined($opts{conf_file}) || @ARGV != 0) { - print STDERR "$program: Please specify exactly one configuration file.\n"; - usage(0); - } - - $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; - my $ps_vars; - if (1) { - $ps_vars = join('= -o ', @ps_vars) . '='; - } else { - $ps_vars = join(' -o ', @ps_vars); - } - - if ('') { - $ps_fullcmd_fmt = ""; - } else { - $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; - } - if ('') { - $ps_args_fmt = ""; - } else { - $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; - } - - open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; - open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; - open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; -} - -# Signal handling.. -sub install_handlers { - $SIG{'QUIT'} = \&terminate; - $SIG{'TERM'} = \&terminate; - $SIG{'INT'} = \&terminate; - $SIG{'HUP'} = \&null_handler; - $SIG{'USR1'} = \&debug_up_handler; - $SIG{'USR2'} = \&debug_down_handler; -} - -# Used perhaps to break out of a deep sleep. -sub null_handler { - my($signo) = @_; - logger("Received signal: ${signo}"); -} - -# Increase verbosity of debugging. -sub debug_up_handler { - my($signo) = @_; - $opts{debug}++; - logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); -} - -# Decrease verbosity of debugging. -sub debug_down_handler { - my($signo) = @_; - $opts{debug}--; - logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); -} - -# Signal handler to go down recording the signal. -sub terminate { - my($signo) = @_; - use Config; - if (defined $Config{sig_name}) { - my $i = 0; - my @signame; - my %sig; - foreach my $name (split(' ', $Config{sig_name})) { - $signame[$i] = $name; - $sig{$name} = $i; - $i++; - } - $signo = $sig{$signo} if exists($sig{$signo}); - if ($signo =~ m{\A\d+\Z} ) { - logger("Going down on $signame[$signo] (${signo}) signal. " . - "Have a nice day!"); - } - } else { - logger("Going down on signal ${signo}). Have a nice day!"); - } - - $signo = 15 if $signo !~ m{\A\d+\Z}; - if ($opts{syslog}) { - use Sys::Syslog; - closelog; - } - exit $signo; -}; - -# Utility function for parsing/converting elapsed time into seconds. -sub elapsed2secs($) { - $_ = $_[0]; - - # Handle formats like: - # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40:34 -- 20 hours, 40 minutes, 34 seconds - # 0:00 -- 0 seconds. - - # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40.34 -- 20 hours, 40 minutes, 34 seconds - # 5.03 -- 5 minutes, 3 seconds. - # 5 -- 5 seconds. - - # Some easy cases. - return -1 if !defined($_) || m{\A\s*\Z}; - return $_ if m{\A\d+\Z}; - - # Originally had as one pattern and optional - # arguments but i got compaints about using - # uninitialized variables even with "no diagonstics". Would rather - # switch than fight. - my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; - if (m{ - (\d{1,2})- # The number of days. e.g. 1- or 19- or blank - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); - return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); - } elsif (m{ - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($hours, $minutes, $secs) = ($1, $2, $3); - return ($hours*HOURS + $minutes*MINS + $secs); - } elsif (m{$min_secs_pat}) { - my ($minutes, $secs) = ($1, $2); - return ($minutes*MINS + $secs); - } else { - logger("Error in converting $_ to seconds"); - return -1; - } -} - -# Return time and PID as string in a common format -sub timestring() { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); - $mon++; - return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", - $mon, $mday, $year%100, $hour, $min, $sec, $program); -} - -# log error to syslog and print to STDERR. -sub logger($) { - my($msg) = shift; - - if ($opts{syslog}) { - if (!$logopened) { - use Sys::Syslog; - $logopened++; - openlog($program,'cons,pid', 'err'); - } - syslog('info', $msg); - } - if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { - my $ts=timestring(); - print STDERR "$ts: $msg\n"; - } -} - -sub debug_log($$) { - my($msg, $level) = @_; - logger("** debug ** $msg") if $opts{debug} >= $level; -} - -sub gather_psinfo() { - my @output=`$ps_cmd`; - return @output; -} - -# Show the CVS version id string and quit. -sub show_version() { - print "$vcid -Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. -This is free software; see the source for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. -"; - exit 10; -} - - -sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -} - -# Time configuration file was last read. -my $conf_time; - -# Read a configuration file. -sub read_config($) { - use Config::IniFiles; - my($cf)=@_; - if (!-f $cf || !-r _ || -z _ || !-T _) { - logger("Unusable config file: <$cf>"); - return undef; - } - - # Save time we read the configuration file so we can check back - # later to see if it changed. - - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $cf; - $conf_time = $mtime; - - return new Config::IniFiles( -file => $cf ); -} - -# Check to see if any configuration file has changed -# since the last time this routime was called. -# Updates global $conf_time. -sub check_config_file($) { - my ($conf_file) = @_; - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $opts{conf_file}; - if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { - logger("Configuration file $conf_file modified; re-reading..."); - $cfg = read_config($conf_file); - } -} - -sub run_trigger($$$) { - my($trigger, $action, $count) = @_; - my $etrigger=$trigger; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } -} - -sub podthis() { - use Pod::Text; - $^W = 0; - pod2text $0; - exit 101; -} - -#-------------------------------------------------- -=pod - -=head1 NAME - -ps-watcher - monitors various processes based on ps-like information. - - -=head1 SYNOPSIS - -B [I...] - [C<--config>] I - -=head1 DESCRIPTION - -Periodically a list of processes obtained via C. More precisely -each item in the list contains the process name (just what's listed in -the "cmd" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. - -Some things you might want to watch a daemon or process for: - -=over 2 - -=item * - -check that it is running (hasn't died) - -=item * - -ensure it is not running too many times - -=item * - -isn't consuming too much memory (perhaps a memory leak), or I/O - -=back - -Some actions you might want to take: - -=over 2 - -=item * - -restart a process - -=item * - -kill off rampant processes - -=item * - -send an alert about any of the conditions listed above - -=back - -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a C job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). - -=head2 OPTIONS - -=over 4 - -=item --help - -Print a usage message on standard error and exit with a return code -of 100. - -Z<> - -=item --doc - -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. - -Z<> - -=item --version - -Print the version release on standard output and exit with a return -code of 10. - -Z<> - -=item --debug I - -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. - -=item [--config] I - -Specify configuration file. . - -See L below for information on the format -of the configuration file and L for a complete -example of a configuration file. - -Z<> - -=item --log [I] - -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below. - -Z<> - -=item --syslog | --nosyslog - -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. - -Z<> - -=item --daemon | --nodaemon - -Run or don't as a daemon. - -Z<> - -=item --path I - -Specify the executable search path used in running commands. - -=item --ps-prog I - -One can specify the command that gives ps information. By default, the -command is F. - -Z<> - -=item --run | --norun - -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. - -Z<> - -=item --sleep I - -It is expected that one might want to run ps-watcher over and over -again. In such instances one can specify the amount of time between -iterations with this option. - -If a negative number is specified the program is run only once. - -Z<> - -=back - -=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING - -Periodically ps-watcher checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. - -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal. - -At any time you can increase the level of debug output by sending a -USR1 signal to the ps-watcher process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal. - -It is recommended that you terminate ps-watcher via an INT, TERM, or QUIT -signal. - -=head1 CONFIGURATION FILE FORMAT - -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an "equal" sign and finally value. That is: - - # This is a comment line - ; So is this. - [process-pattern1] - parameter1 = value1 - parameter2 = value2 - - [process-pattern2] - parameter1 = value3 - parameter2 = value4 - -Comments start with # or ; and take effect to the end of the line. - -This should be familiar to those who have worked with text-readible -Microsoft C<.INI> files. - -Note process patterns, (F and F -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. F and F<[c]ron> which refer to the same process even -though they I to be different. - -As quoted directly from the Config::IniFiles documentation: - -Multiline or multivalued fields may also be defined ala UNIX -"here document" syntax: - - Parameter=< match exactly, including any trailing -whitespace. - -There are two special "process patterns": $PROLOG and $EPILOG, the -former should appear first and the latter last. - -You can put perl code to initialize variables here and do cleanup -actions in these sections using "perl-action." - -A description of parameters names, their meanings and potential values -follows. - -=over - -=item trigger - -This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to "true" in a Perl -expression. - -If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered. - -Example: - - # Match if httpd has not spawned enough (<4) times. NFS and databases - # daemons typically spawn child processes. Since the program - # matches against the command names, not commands and arguments, - # something like: ps -ef | grep httpd won't match the below. - # If you want to match against the command with arguments, see - # the example with $args below. - [httpd$] - trigger = $count <= 4 - -=item occurs - -This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -"every", "first", "first-trigger", and "none". - -Setting the occurs value to "none" causes the the trigger to be -evaluated when there are no matching processes. Although one might -think "$count == 0" in the action expression would do the same thing, -currently as coded this does not work. - -Setting the occurs value to "first" causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true. - -Setting the occurs value to "first-trigger" causes the process-pattern -rule to be finished after handling the first rule that matches I -the trigger evaluates to true. - -If the item parameter is not specified, "first" is assumed. - -Examples: - - [.] - occurs = first - action = echo "You have $count processes running" - - # Note in the above since there is no trigger specified, - # occurs = first - # is the same thing as - # occurs = first-trigger - - [.?] - trigger = $vsz > 1000 - occurs = every - action = echo "Large program $command matches $ps_pat: $vsz KB" - - # Fire if /usr/sbin/syslogd is not running. - # Since the program matches against the command names, not commands and - # arguments, something like: - # ps -ef | grep /usr/sbin/syslogd - # won't match the below. - [(/usr/sbin/)?syslogd] - occurs = none - action = /etc/init.d/syslogd start - -=item action - -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. - -Example: - - action = /etc/init.d/market_loader.init restart - -=item perl-action - -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which ps-watcher -would otherwise not be able to do. - -Example: - - # A Perl variable initialization. - # Since ps-watcher runs as a daemon it's a good idea - # to (re)initialize variables before each run. - [$PROLOG] - perl-action = $root_procs=0; - - # Keep track of how many root processes we are running - [.*] - perl-action = $root_procs++ if $uid == 0 - occurs = every - - # Show this count. - [$EPILOG] - action = echo "I counted $root_procs root processes" - -=back - -=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES - -Any variables defined in the program can be used in pattern or -action parameters. For example, C<$program> can be used to refer to -the name of this program ps-watcher. - -The following variables can be used in either the pattern or action -fields. - -=over - -=item $action - -A string containing the text of the action to run. - -Z<> - -=item $perl_action - -A string containing the text of the perl_action to run. - -Z<> - -=item $ps_pat - -The Perl regular expression specified in the beginning of the section. - -Z<> - -=item $command - -The command that matched $ps_pat. - -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped. - -Example: - - # List processes other than emacs (which is a known pig) that use lots - # of virtual memory - - [.*] - trigger = $command !~ /emacs$/ && $vsz > 10 - action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -Z<> - -=item $count - -The number of times the pattern matched. Presumably the number of -processes of this class running. - -Z<> - -=item $trigger - -A string containing the text of the trigger. - -=back - -A list of variables specific to this program or fields commonly found in -C output is listed below followed by a description of the more -common ones. See also C for a more complete -description of the meaning of the field. - - uid euid ruid gid egid rgid alarm blocked bsdtime c caught -cputime drs dsiz egroup eip esp etime euser f fgid -fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser -group ignored intpri lim longtname m_drs m_trs maj_flt majflt -min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp -pmem ppid pri rgroup rss rssize rsz ruser s sess session -sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore -sig_pend sigcatch sigignore sigmask stackp start start_stack start_time -stat state stime suid suser svgid svgroup svuid svuser sz time timeout -tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname -user vsize vsz wchan - -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's C will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple C lines is -used. - -Z<> - -=over - -=item $args - -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). - -Z<> - -=item $ppid - -The parent process id. - -Z<> - -=item $stime - -The start time of the process. - -Z<> - -=item $etime - -The end time of the process. - -Z<> - -=item $pmem - -The process memory. - -Z<> - -=item $pcpu - -The percent CPU utilization. - -Z<> - -=item $tty - -The controlling tty. - -Z<> - -=item $szv - -Virtual memory size of the process - -=back - -=head2 OTHER THINGS IN TRIGGER CLAUSES - -To make testing against elapsed time easier, a function C -has been written to parse and convert elapsed time strings in the -format C and a number of seconds. - -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as C, C, -and C respectively and they have the expected definitions: - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - -Here is an example of the use of C: - - # Which processes have been running for more than 3 hours? - # Also note use of builtin-function elapsed2secs, variable $etime - # and builtin-function HOURS - [.] - trigger = elapsed2secs('$etime') > 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -Please note the quotes around '$etime'. - -=head1 EXAMPLE CONFIGURATION - - # Comments start with # or ; and go to the end of the line. - - # The format for each entry is in Microsoft .INI form: - # [process-pattern] - # trigger = perl-expression - # action = program-and-arguments-to-run - - [httpd$] - trigger = $count < 4 - action = echo "$trigger fired -- You have $count httpd sessions." - - [.] - trigger = $vsz > 10 - action = echo "Looks like you have a big $command program: $vsz KB" - - # Unfortunately we have use a different pattern below. (Here we use - # ".?" instead of ".".) In effect the the two patterns mean - # test every process. - [.?] - trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 - occurs = every - action = < is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs. - - [$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < - -For even more information and control try running the above under the -perl debugger, e.g. - -perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 I - -=head1 BUGS - -Well, some of these are not so much a bug in ps-watcher so much as a -challenge to getting ps-watcher to do what you want it to do. - -One common problem people run in into is understanding exactly what -the process variables mean. The manual page L should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking. - -Sometimes one will see this error message when debug tracing is turned on: - - ** debug ** Something wrong getting ps variables - -This just means that the process died betwee the time ps-watcher first -saw the existence of the process and the time that it queried -variables. - -=head1 SEE ALSO - -See also L and L. - -Another cool program doing ps-like things is C. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output "attractively" -but fast. You can the find the homepage at -L and it download via -L - -=head1 AUTHOR - -Rocky Bernstein (rocky@cpan.org) - -=head1 COPYRIGHT - - Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein, email: rocky@cpan.org. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/ps-watcher.in.in b/ps-watcher.in.in deleted file mode 100755 index db12061..0000000 --- a/ps-watcher.in.in +++ /dev/null @@ -1,1278 +0,0 @@ -#!@PERL@ -w -# -*- Perl -*- -use diagnostics; -my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ '; -# See usage subroutine or perlpod documentation below. - -# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 -# Rocky Bernstein, email: rocky@cpan.org -# -# This program is free software; you can -# redistribute it and/or modify it under the terms of the GNU General -# Public License as published by the Free Software Foundation; either -# version 2 of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars - $0 $logopened $ps_args_fmt $args - $count $pid $command $ps_arg_opts $DEVNULL %opts - ); -use strict; -BEGIN { require 5.00503 } - -sub usage($) { - my ($full_help) = @_; - - print " -usage: - - $program [OPTIONS..] - -$program can be used to monitor various processes based on ps-like -information. - -options: - --help -- print this help and exit - --doc -- extract and print complete documentation and exit - --version -- show a CVS version string and exit - --debug *n* -- give debugging output. The higher the - number, the more the output - --run | --norun -- do/don't run actions - go through the motions as though we were going to - --log [*logfile*] -- Set a log file for this program. If option given - but no logfile, then use STDERR. Default is - no error log file. - --syslog | --nosyslog - -- send or don't send error output to syslog - Default is to send to syslog. - --config *cnf file* -- specify configuration file. - - --daemon | --nodaemon - -- do or don't become a daemon. Default daemonize. - --sleep *time* -- sleep interval between iterations. The default is - $opts{sleep_interval} seconds. - --path path -- executable search path to use in running commands - - --ps-prog *program* -- command that gets ps information. The default is: - $opts{ps_prog} - --ps-pids-opt *ps opts* - -- ps options that lists pids and commands. The - default is: $opts{ps_pid_opts} -"; - - if ($full_help) { - print " -General operation: - -Periodically a list of processes obtained via ps. More precisely -each item in the list contains the process name (just what's listed in -the \"command\" field, not the full command and arguments) and its -process id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the process names against. For -each match, a Perl expression specified for that pattern is -evaluated. The evaluated expression can refer to variables which are -set by ps and pertain to the matched process(es), for example the -amount memory consumed by the process, or the total elapsed time. Some -other variables are set by the program, such as the number of times -the process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert. - -This program can be used to ensure a daemon hasn't died or ensure it -is not running too many times. It might be used to determine when a -process has consumed too many resources (for example due to a memory -leak). - -The following variables can be used in patterns or actions: -\t". '$' . join("\n\t\$", @ps_vars) . -" - The following is a sample config file: - -# Comments start with # or ; and go to the end of the line. - -# The format for each entry is in Microsoft .INI form: -# [process-pattern] -# trigger = perl-expression -# action = program-and-arguments-to-run - -[httpd\$] - trigger = \$count < 4 - action = echo \"\$trigger fired -- You have \$count \$command sessions.\" - -[em?cs] -trigger = \$vsz > 10 -action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -"; - } - exit 100; -} - -sub init(); -sub podthis(); -sub process_options(); -sub show_version(); -sub daemonize(); -sub eval_trigger_action($$$); -sub make_the_rounds($); -sub elapsed2secs($); -sub logger($); -sub debug_log($$); -sub gather_psinfo(); -sub read_config($); -sub check_config_file($); -sub run_trigger($$$); - -init(); -process_options(); - -# Unfurl the banner... -logger("Starting: $vcid"); - -my $cfg=read_config($opts{conf_file}); - -if (!defined($cfg)) { - for my $line (@Config::IniFiles::errors) { - logger($line); - } - exit 2; -} - -if ($opts{daemon}) { - daemonize(); -} - -install_handlers(); - -do { - make_the_rounds($cfg); - sleep $opts{sleep_interval} if $opts{sleep_interval} > 0; - check_config_file($opts{conf_file}); -} until ($opts{sleep_interval} < 0) ; -if ($opts{syslog}) { - use Sys::Syslog; - closelog; -} -exit 0; - -# Evaluates the trigger and if that's true also performs -# an action. 1 is returned if the action was performed, -# zero otherwise. -sub eval_trigger_action($$$) { - my ($trigger,$action,$perl_action) = @_; - my $etrigger=$trigger; - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - if (defined($perl_action)) { - debug_log("running Perl_action: $perl_action", 2); - eval($perl_action) if $opts{run}; - } - if (defined($action)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } - return 1; - } - return 0; -} - -# Perform a round over the process_patterns comparing against the -# process info to see if anything's stirring. -sub make_the_rounds($) { - my $cfg = $_[0]; - my @ps_info=gather_psinfo(); - foreach our $ps_pat ($cfg->Sections()) { - debug_log("process pattern: /$ps_pat/", 1); - my @selected_ps; - my $in_prolog_epilog=0; - my $trigger = $cfg->val($ps_pat, 'trigger') || '1'; - my $action = $cfg->val($ps_pat, 'action'); - my $perl_action = $cfg->val($ps_pat, 'perl-action'); - my $occurs = $cfg->val($ps_pat, 'occurs') || "first"; - local $count; - if ($ps_pat =~ /^\$PROLOG/ || $ps_pat =~ /\$EPILOG/) { - # Set to run trigger below. - $count = @ps_info; - $in_prolog_epilog=1; - } else { - @selected_ps = grep(/$ps_pat/, @ps_info); - $count = @selected_ps; - debug_log("count for /$ps_pat/: $count", 2); - } - if ($in_prolog_epilog) { - # execute trigger - eval_trigger_action($trigger, $action, $perl_action); - } elsif ($occurs =~ /none/i) { - if ($count eq 0) { - # execute the trigger anyway - eval_trigger_action($trigger, $action, $perl_action); - } - } elsif ($count gt 0) { - TRIGGER: - foreach (@selected_ps) { - next if !/\s*(\d+)\s+(\S+)/; - local($pid, $command) = /\s*(\d+)\s+(\S+)/; - if ($pid !~ /\d+/) { - logger("Something wrong with ps format:\n$_"); - next; - } - - my $ps_fullcmd = sprintf $ps_fullcmd_fmt, $pid; - my @output = `$ps_fullcmd`; - my $output=''; - if (@output == 1) { - # Got one line of output - good. - $output=$output[0]; - # Make sure though we don't just have a title line. - # One of the fields should be just digits, e.g. ppid, uid, gud... - next if $output !~ m{\s+\d+\s+}; - } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { - # Got two lines of output - we are running a ps where - # we can't remove the title line? - $output=$output[1]; - } elsif (@output > 1 && @PS_CAN_RETURN_MULTIPLE_LINES@) { - # Got multiple lines of output - we are running a ps which can - # do so. For example Solaris does this for a process that has many - # LWPs (light-weight processes). - $output=$output[0]; - } else { - debug_log("Something wrong getting ps variables", 1); - next; - } - - local $args = ''; - if ($ps_arg_opts) { - my $ps_argscmd = sprintf $ps_args_fmt, $pid; - my @output = `$ps_argscmd`; - if (@output == 1) { - $args=$output[0]; - } elsif (@output == 2 && @PS_NO_NULL_HEADER@) { - $args=$output[1]; - } else { - debug_log("Something wrong with getting command arguments", 1); - } - } - - # Process may have disappeared. In this case we'll get no - # output. - next if !$output; - - # Add ' ' so split will junk first ps_dvars $junk. - $output = ' ' . $output; - my $perl_ps_assign = "$ps_dvars = split(/\\s+/, \$output)"; - { - # It is a pain to predeclare all of the variables assigned - # by ps which is OS and ps specific. So we'll allow anything. - # Likewise, we'll allow it occur in $action. - no strict; - - # Escape backticks so that we don't inadvertently run - # the program. For example there could be a process named - # `/tmp/evilcommand` (with backticks). Thanks to Randal - # Schwartz for noticing the problem. - # Not sure if there are other things to watch out for. - # Although the Perl Cookbook suggests how to make system, - # safe, it is silent about making eval safe. - $command =~ s/`/\\`/g; - - if (eval ($perl_ps_assign)) { - my $evaled = eval_trigger_action($trigger, $action, - $perl_action); - last TRIGGER if $evaled && $occurs eq 'first-trigger'; - last TRIGGER if $occurs eq 'first'; - } else { - logger("Something wrong with perl assignment: $perl_ps_assign"); - last TRIGGER; - } - } # no strict - } # foreach - } # if $count - } -} - -# Initailize various variables variously. -sub init() { - - use File::Basename; - $program = basename($0); # Who am I today, anyway? - - $DEVNULL = '/dev/null'; # And what do we do about non Unix? - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - - $opts{debug} = 0; # no debugging - $opts{run} = 1; # run actions - $opts{syslog} = 1; # Log errors to syslog - $opts{logfile} = $DEVNULL; - $opts{daemon} = 1; # Run as daemon; - $opts{ps_prog} = '@PS@'; # Where is ps? - $opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands? - - $ps_arg_opts = '@PS_ARGS@'; # How do I get full process command? - - # List of all the fields from ps we will be able to use. Don't need - # to list variables listed above. - @ps_vars = qw ( @PS_VARS@ -); - - # Convert the above into an argument list like - # ($junk, $user, ... ) - # The first argument ($junk) will be null and thrown out. - $ps_dvars = '($junk,$' . join(',$', @ps_vars) . ')'; - - $opts{sleep_interval} = 300; - -} - -# The bane of programming. -sub process_options() { - use Getopt::Long; - my(@opt_cf); - $Getopt::Long::autoabbrev = 1; - my($newstyle_config); - - my ($help, $long_help, $show_version); - - my $result = &GetOptions - ( - 'help' => \$help, - 'doc' => \$long_help, - 'version' => \$show_version, - 'config=s' => \$opts{conf_file}, - 'debug=i' => \$opts{debug}, - 'path=s' => \$ENV{PATH}, - 'ps-pid-opts=s'=> \$opts{ps_pid_opts}, - 'ps-prog=s' => \$opts{ps_prog}, - 'sleep=i' => \$opts{sleep_interval}, - 'log:s' => \$opts{logfile}, - 'syslog!' => \$opts{syslog}, - 'run!' => \$opts{run}, - 'daemon!' => \$opts{daemon}, - ); - - show_version() if $show_version; - usage(1) if $help; - podthis() if $long_help; - - # However specifying a configuration file is not. - # Nor can we deal with multiple configuration files or tolerate - # option-processing errors. - usage(0) if !$result; - - # The option-specifier "--config" is optional... - if (@ARGV && !defined($opts{conf_file})) { - $opts{conf_file} = shift(@ARGV); - } - - # However we do have to give exactly one configurtion file. - if (!defined($opts{conf_file}) || @ARGV != 0) { - print STDERR "$program: Please specify exactly one configuration file.\n"; - usage(0); - } - - $ps_cmd = "$opts{ps_prog} $opts{ps_pid_opts}"; - my $ps_vars; - if (@PS_CUSTOM_HEADER@) { - $ps_vars = join('= -o ', @ps_vars) . '='; - } else { - $ps_vars = join(' -o ', @ps_vars); - } - - if ('@PS_FULLCMD_FMT@') { - $ps_fullcmd_fmt = "@PS_FULLCMD_FMT@"; - } else { - $ps_fullcmd_fmt = "$opts{ps_prog} -p %d -o $ps_vars"; - } - if ('@PS_ARGS_FMT@') { - $ps_args_fmt = "@PS_ARGS_FMT@"; - } else { - $ps_args_fmt = "$opts{ps_prog} -p %d $ps_arg_opts"; - } - - open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!"; - open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; - open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!" - if $opts{logfile} ne ''; -} - -# Signal handling.. -sub install_handlers { - $SIG{'QUIT'} = \&terminate; - $SIG{'TERM'} = \&terminate; - $SIG{'INT'} = \&terminate; - $SIG{'HUP'} = \&null_handler; - $SIG{'USR1'} = \&debug_up_handler; - $SIG{'USR2'} = \&debug_down_handler; -} - -# Used perhaps to break out of a deep sleep. -sub null_handler { - my($signo) = @_; - logger("Received signal: ${signo}"); -} - -# Increase verbosity of debugging. -sub debug_up_handler { - my($signo) = @_; - $opts{debug}++; - logger("Received signal: ${signo}. Increasing debugging to $opts{debug}."); -} - -# Decrease verbosity of debugging. -sub debug_down_handler { - my($signo) = @_; - $opts{debug}--; - logger("Received signal: ${signo}. Decreasing debugging to $opts{debug}."); -} - -# Signal handler to go down recording the signal. -sub terminate { - my($signo) = @_; - use Config; - if (defined $Config{sig_name}) { - my $i = 0; - my @signame; - my %sig; - foreach my $name (split(' ', $Config{sig_name})) { - $signame[$i] = $name; - $sig{$name} = $i; - $i++; - } - $signo = $sig{$signo} if exists($sig{$signo}); - if ($signo =~ m{\A\d+\Z} ) { - logger("Going down on $signame[$signo] (${signo}) signal. " . - "Have a nice day!"); - } - } else { - logger("Going down on signal ${signo}). Have a nice day!"); - } - - $signo = 15 if $signo !~ m{\A\d+\Z}; - if ($opts{syslog}) { - use Sys::Syslog; - closelog; - } - exit $signo; -}; - -# Utility function for parsing/converting elapsed time into seconds. -sub elapsed2secs($) { - $_ = $_[0]; - - # Handle formats like: - # 1-08:34:37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40:34 -- 20 hours, 40 minutes, 34 seconds - # 0:00 -- 0 seconds. - - # 1-08:34.37 -- One day, 8 hours, 34 minutes, 37 seconds - # 20:40.34 -- 20 hours, 40 minutes, 34 seconds - # 5.03 -- 5 minutes, 3 seconds. - # 5 -- 5 seconds. - - # Some easy cases. - return -1 if !defined($_) || m{\A\s*\Z}; - return $_ if m{\A\d+\Z}; - - # Originally had as one pattern and optional - # arguments but i got compaints about using - # uninitialized variables even with "no diagonstics". Would rather - # switch than fight. - my $min_secs_pat = '(\d{1,2})[:.](\d\d)'; - if (m{ - (\d{1,2})- # The number of days. e.g. 1- or 19- or blank - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($days, $hours, $minutes, $secs) = ($1, $2, $3, $4); - return ($days*DAYS + $hours*HOURS + $minutes*MINS + $secs); - } elsif (m{ - (\d{1,2})[:.] # The number of hrs. e.g. 01: or 23: or blank - $min_secs_pat - }x) { - my ($hours, $minutes, $secs) = ($1, $2, $3); - return ($hours*HOURS + $minutes*MINS + $secs); - } elsif (m{$min_secs_pat}) { - my ($minutes, $secs) = ($1, $2); - return ($minutes*MINS + $secs); - } else { - logger("Error in converting $_ to seconds"); - return -1; - } -} - -# Return time and PID as string in a common format -sub timestring() { - my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = - localtime(time); - $mon++; - return sprintf( "%.2d/%.2d/%.2d %.2d:%.2d:%.2d %s[$$]", - $mon, $mday, $year%100, $hour, $min, $sec, $program); -} - -# log error to syslog and print to STDERR. -sub logger($) { - my($msg) = shift; - - if ($opts{syslog}) { - if (!$logopened) { - use Sys::Syslog; - $logopened++; - openlog($program,'cons,pid', 'err'); - } - syslog('info', $msg); - } - if (defined($opts{logfile}) && $opts{logfile} ne $DEVNULL) { - my $ts=timestring(); - print STDERR "$ts: $msg\n"; - } -} - -sub debug_log($$) { - my($msg, $level) = @_; - logger("** debug ** $msg") if $opts{debug} >= $level; -} - -sub gather_psinfo() { - my @output=`$ps_cmd`; - return @output; -} - -# Show the CVS version id string and quit. -sub show_version() { - print "$vcid -Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein. -This is free software; see the source for copying conditions. -There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -PARTICULAR PURPOSE. -"; - exit 10; -} - - -sub daemonize() { - chdir '/' or die "Can't chdir to /: $!"; - defined(my $pid = fork) or die "Can't fork: $!"; - exit 0 if $pid; - use POSIX qw(setsid); - setsid() or die "Can't start a new session: $!"; - umask 0; -} - -# Time configuration file was last read. -my $conf_time; - -# Read a configuration file. -sub read_config($) { - use Config::IniFiles; - my($cf)=@_; - if (!-f $cf || !-r _ || -z _ || !-T _) { - logger("Unusable config file: <$cf>"); - return undef; - } - - # Save time we read the configuration file so we can check back - # later to see if it changed. - - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $cf; - $conf_time = $mtime; - - return new Config::IniFiles( -file => $cf ); -} - -# Check to see if any configuration file has changed -# since the last time this routime was called. -# Updates global $conf_time. -sub check_config_file($) { - my ($conf_file) = @_; - my($dev, $ino, $mode, $nlink, $uid, $gid, $rdev, $size, - $atime, $mtime, $ctime) = stat $opts{conf_file}; - if ( defined($conf_time) && defined($mtime) && $conf_time < $mtime ) { - logger("Configuration file $conf_file modified; re-reading..."); - $cfg = read_config($conf_file); - } -} - -sub run_trigger($$$) { - my($trigger, $action, $count) = @_; - my $etrigger=$trigger; - if ($trigger ne '1') { - $etrigger =~ s/"/\\"/g; - debug_log("trigger before substitution: $etrigger", 2); - $etrigger = eval qq/"$trigger"/; - } - debug_log("trigger after substitution: $etrigger", 2); - if (eval ($etrigger)) { - debug_log("action before substitution: $action", 2); - my $eaction=$action; - $eaction =~ s/"/\\"/g; - $eaction = eval qq/"$eaction"/; - debug_log("action after substitution: $eaction", 2); - my $output=`$eaction` if $opts{run}; - chomp($output); - logger($output) if $output; - } -} - -sub podthis() { - use Pod::Text; - $^W = 0; - pod2text $0; - exit 101; -} - -#-------------------------------------------------- -=pod - -=head1 NAME - -@PACKAGE@ - monitors various processes based on ps-like information. - - -=head1 SYNOPSIS - -B<@PACKAGE@> [I...] - [C<--config>] I - -=head1 DESCRIPTION - -Periodically a list of processes obtained via C. More precisely -each item in the list contains the process name (just what's listed in -the "cmd" field, not the full command and arguments) and its process -id (pid). A configuration file specifies a list of Perl -regular-expression patterns to match the processes against. For each -match, a Perl expression specified for that pattern is evaluated. The -evaluated expression can refer to variables which are set by ps and -pertain to the matched process(es), for example the amount memory -consumed by the process, or the total elapsed time. Some other -variables are set by the program, such as the number of times the -process is running. If the Perl expression for a matched pattern -evaluates true, then an action can be run such as killing the program, -restarting it, or mailing an alert, or running some arbitrary Perl -code. - -Some things you might want to watch a daemon or process for: - -=over 2 - -=item * - -check that it is running (hasn't died) - -=item * - -ensure it is not running too many times - -=item * - -isn't consuming too much memory (perhaps a memory leak), or I/O - -=back - -Some actions you might want to take: - -=over 2 - -=item * - -restart a process - -=item * - -kill off rampant processes - -=item * - -send an alert about any of the conditions listed above - -=back - -Depending on options specfied, this program can be run as a daemon, -run once (which is suitable as a C job), or run not as a daemon -but still continuously (which may be handy in testing the program or -your configuration). - -=head2 OPTIONS - -=over 4 - -=item --help - -Print a usage message on standard error and exit with a return code -of 100. - -Z<> - -=item --doc - -Extact the full documentation that you are reading now, print it and -exit with a return code of 101. - -Z<> - -=item --version - -Print the version release on standard output and exit with a return -code of 10. - -Z<> - -=item --debug I - -Give debugging output. The higher the number, the more the output. The -default is 0 = none. 2 is the most debugging output. - -=item [--config] I - -Specify configuration file. . - -See L below for information on the format -of the configuration file and L for a complete -example of a configuration file. - -Z<> - -=item --log [I] - -Send or don't send error and debugging output to a log file. If option -is given but no logfile is specified, then use STDERR. The default is -no error log file. See also --syslog below. - -Z<> - -=item --syslog | --nosyslog - -Send or don't send error and debugging output to syslog. The default -is to syslog error and debug output. - -Z<> - -=item --daemon | --nodaemon - -Run or don't as a daemon. - -Z<> - -=item --path I - -Specify the executable search path used in running commands. - -=item --ps-prog I - -One can specify the command that gives ps information. By default, the -command is F<@PS@>. - -Z<> - -=item --run | --norun - -do/don't run actions go through the motions as though we were going -to. This may be useful in debugging. - -Z<> - -=item --sleep I - -It is expected that one might want to run @PACKAGE@ over and over -again. In such instances one can specify the amount of time between -iterations with this option. - -If a negative number is specified the program is run only once. - -Z<> - -=back - -=head2 CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING - -Periodically @PACKAGE@ checks to see if the configuration file -that it was run against has changed. If so, the program rereads the -configuration file. - -More precisely, the checks are done after waking up from a slumber. -If the sleep interval is long (or if you are impatient), you can -probably force the program to wake up using a HUP signal. - -At any time you can increase the level of debug output by sending a -USR1 signal to the @PACKAGE@ process. Similarly you can decrease the -level of debug output by sending the process a USR2 signal. - -It is recommended that you terminate @PACKAGE@ via an INT, TERM, or QUIT -signal. - -=head1 CONFIGURATION FILE FORMAT - -The format of a configuration file is a series of fully qualified -filenames enclosed in square brackets followed by a number of -parameter lines. Each parameter line has a parameter names followed by -an "equal" sign and finally value. That is: - - # This is a comment line - ; So is this. - [process-pattern1] - parameter1 = value1 - parameter2 = value2 - - [process-pattern2] - parameter1 = value3 - parameter2 = value4 - -Comments start with # or ; and take effect to the end of the line. - -This should be familiar to those who have worked with text-readible -Microsoft C<.INI> files. - -Note process patterns, (F and F -above) must be unique. If there are times when you may want to -refer to the same process, one can be creative to make these unique. -e.g. F and F<[c]ron> which refer to the same process even -though they I to be different. - -As quoted directly from the Config::IniFiles documentation: - -Multiline or multivalued fields may also be defined ala UNIX -"here document" syntax: - - Parameter=< match exactly, including any trailing -whitespace. - -There are two special "process patterns": $PROLOG and $EPILOG, the -former should appear first and the latter last. - -You can put perl code to initialize variables here and do cleanup -actions in these sections using "perl-action." - -A description of parameters names, their meanings and potential values -follows. - -=over - -=item trigger - -This parameter specifies the condition on which a process action is -fired. The condition is evaluated with Perl eval() and should -therefore return something which is equivalent to "true" in a Perl -expression. - -If no trigger is given in a section, true or 1 is assumed and -the action is unconditionally triggered. - -Example: - - # Match if httpd has not spawned enough (<4) times. NFS and databases - # daemons typically spawn child processes. Since the program - # matches against the command names, not commands and arguments, - # something like: ps -ef | grep httpd won't match the below. - # If you want to match against the command with arguments, see - # the example with $args below. - [httpd$] - trigger = $count <= 4 - -=item occurs - -This parameter specifies how many times an action should be performed -on processes matching the section trigger. Acceptable values are -"every", "first", "first-trigger", and "none". - -Setting the occurs value to "none" causes the the trigger to be -evaluated when there are no matching processes. Although one might -think "$count == 0" in the action expression would do the same thing, -currently as coded this does not work. - -Setting the occurs value to "first" causes the process-pattern rule to -be finished after handling the first rule that matches, whether or not the -trigger evaluated to true. - -Setting the occurs value to "first-trigger" causes the process-pattern -rule to be finished after handling the first rule that matches I -the trigger evaluates to true. - -If the item parameter is not specified, "first" is assumed. - -Examples: - - [.] - occurs = first - action = echo "You have $count processes running" - - # Note in the above since there is no trigger specified, - # occurs = first - # is the same thing as - # occurs = first-trigger - - [.?] - trigger = $vsz > 1000 - occurs = every - action = echo "Large program $command matches $ps_pat: $vsz KB" - - # Fire if /usr/sbin/syslogd is not running. - # Since the program matches against the command names, not commands and - # arguments, something like: - # ps -ef | grep /usr/sbin/syslogd - # won't match the below. - [(/usr/sbin/)?syslogd] - occurs = none - action = /etc/init.d/syslogd start - -=item action - -This specifies the action, a command that gets run by the system -shell, when the trigger condition is evaluated to be true. - -Example: - - action = /etc/init.d/market_loader.init restart - -=item perl-action - -This specifies Perl statements to be eval'd. This can be especially -useful in conjunction with $PROLOG and $EPILOG sections to make tests -across collections of process and do things which @PACKAGE@ -would otherwise not be able to do. - -Example: - - # A Perl variable initialization. - # Since @PACKAGE@ runs as a daemon it's a good idea - # to (re)initialize variables before each run. - [$PROLOG] - perl-action = $root_procs=0; - - # Keep track of how many root processes we are running - [.*] - perl-action = $root_procs++ if $uid == 0 - occurs = every - - # Show this count. - [$EPILOG] - action = echo "I counted $root_procs root processes" - -=back - -=head2 EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES - -Any variables defined in the program can be used in pattern or -action parameters. For example, C<$program> can be used to refer to -the name of this program @PACKAGE@. - -The following variables can be used in either the pattern or action -fields. - -=over - -=item $action - -A string containing the text of the action to run. - -Z<> - -=item $perl_action - -A string containing the text of the perl_action to run. - -Z<> - -=item $ps_pat - -The Perl regular expression specified in the beginning of the section. - -Z<> - -=item $command - -The command that matched $ps_pat. - -The Perl regular expression specified in the beginning of the section. -Normally processes will not have funny characters in them. Just in -case, backticks in $command are escaped. - -Example: - - # List processes other than emacs (which is a known pig) that use lots - # of virtual memory - - [.*] - trigger = $command !~ /emacs$/ && $vsz > 10 - action = echo \"Looks like you have a big \$command program: \$vsz KB\" - -Z<> - -=item $count - -The number of times the pattern matched. Presumably the number of -processes of this class running. - -Z<> - -=item $trigger - -A string containing the text of the trigger. - -=back - -A list of variables specific to this program or fields commonly found in -C output is listed below followed by a description of the more -common ones. See also C for a more complete -description of the meaning of the field. - - @PS_VARS@ - -Beware though, in some situations ps can return multiple lines for a -single process and we will use just one of these in the trigger. In -particular, Solaris's C will return a line for each LWP (light-weight -process). So on Solaris, if a trigger uses variable lwp, it may or may -not match depending on which single line of the multiple C lines is -used. - -Z<> - -=over - -=item $args - -The command along with its command arguments. It is possible that this -is might get truncated at certain length (if ps does likewise as is -the case on Solaris). - -Z<> - -=item $ppid - -The parent process id. - -Z<> - -=item $stime - -The start time of the process. - -Z<> - -=item $etime - -The end time of the process. - -Z<> - -=item $pmem - -The process memory. - -Z<> - -=item $pcpu - -The percent CPU utilization. - -Z<> - -=item $tty - -The controlling tty. - -Z<> - -=item $szv - -Virtual memory size of the process - -=back - -=head2 OTHER THINGS IN TRIGGER CLAUSES - -To make testing against elapsed time easier, a function C -has been written to parse and convert elapsed time strings in the -format C and a number of seconds. - -Some constants for the number of seconds in a minute, hour, or day -have also been defined. These are referred to as C, C, -and C respectively and they have the expected definitions: - - use constant MINS => 60; - use constant HOURS => 60*60; - use constant DAYS => HOURS * 24; - -Here is an example of the use of C: - - # Which processes have been running for more than 3 hours? - # Also note use of builtin-function elapsed2secs, variable $etime - # and builtin-function HOURS - [.] - trigger = elapsed2secs('$etime') > 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -Please note the quotes around '$etime'. - -=head1 EXAMPLE CONFIGURATION - - # Comments start with # or ; and go to the end of the line. - - # The format for each entry is in Microsoft .INI form: - # [process-pattern] - # trigger = perl-expression - # action = program-and-arguments-to-run - - [httpd$] - trigger = $count < 4 - action = echo "$trigger fired -- You have $count httpd sessions." - - [.] - trigger = $vsz > 10 - action = echo "Looks like you have a big $command program: $vsz KB" - - # Unfortunately we have use a different pattern below. (Here we use - # ".?" instead of ".".) In effect the the two patterns mean - # test every process. - [.?] - trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40 - occurs = every - action = < is active. We make -use of lsof to check port 3333 and the $PROLOG make sure it runs. - - [$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < - -For even more information and control try running the above under the -perl debugger, e.g. - -perl -d @PACKAGE@ --log --nodaemon --sleep -1 --debug 2 I - -=head1 BUGS - -Well, some of these are not so much a bug in @PACKAGE@ so much as a -challenge to getting @PACKAGE@ to do what you want it to do. - -One common problem people run in into is understanding exactly what -the process variables mean. The manual page L should be of -help, but I've found some of the descriptions either a bit vague or -just plain lacking. - -Sometimes one will see this error message when debug tracing is turned on: - - ** debug ** Something wrong getting ps variables - -This just means that the process died betwee the time @PACKAGE@ first -saw the existence of the process and the time that it queried -variables. - -=head1 SEE ALSO - -See also L and L. - -Another cool program doing ps-like things is C. Well okay, it's -another program I distributed. It shows the process tree dynamically -updated using X Motif and tries to display the output "attractively" -but fast. You can the find the homepage at -L and it download via -L - -=head1 AUTHOR - -Rocky Bernstein (rocky@cpan.org) - -=head1 COPYRIGHT - - Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006 - Rocky Bernstein, email: rocky@cpan.org. - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. diff --git a/samples/README b/samples/README deleted file mode 100644 index 839bcb4..0000000 --- a/samples/README +++ /dev/null @@ -1,10 +0,0 @@ -sample.ini - you can use this as a template to make other configuration - files. It has lots of comments at the beginning to remind - you of what's allowed -sample2.ini - sample configuration file to alert when more than 10% - of a processes is in use. -solaris.ini - System processes that you might want to check on, customized - for Solaris. Checks that cron and syslogd are running, - and that no process uses more than 70% of the available CPU. - -$Id: README,v 1.2 2000/04/09 20:40:43 rocky Exp $ \ No newline at end of file diff --git a/samples/port-watch.ini b/samples/port-watch.ini deleted file mode 100644 index 7517ecb..0000000 --- a/samples/port-watch.ini +++ /dev/null @@ -1,13 +0,0 @@ -# $Id: port-watch.ini,v 1.1 2004/09/07 13:51:08 rockyb Exp $ - -# Here is an example to show how to use ps-watcher to do something -# not really possible from ps: check to see if a *port* is active. -# We make use of lsof to check port 3333 and the $PROLOG make -# sure it runs. - -[$PROLOG] - occurs = first - trigger = { \$x=`lsof -i :3333 >/dev/null 2>&1`; \$? >> 8 } - action = < 1*DAYS - action = echo "$command has been running more than 1 day ($etime)" - occurs = every - -[^] - trigger = $vsz > 8000 - occurs = every - action = echo "Large program $command (pid $pid) matches /$ps_pat/: $vsz KB" - -# Scripts don't show as the script name as the command name on some -# operating systems. Rather the name of the interpreter is listed -# (e.g. bash or perl) Here's how you can match against a script. Note -# escaping $ in the trigger but not the action. - -# Note: BSD/OS on the other hand give the script name rather than the -# interpreter name. - -[/usr/bin/perl] - trigger = \$args !~ /ps-watcher/ - occurs = every - action = echo "***found perl program ${pid}:\n $args" - diff --git a/samples/sample2.ini b/samples/sample2.ini deleted file mode 100644 index 7725155..0000000 --- a/samples/sample2.ini +++ /dev/null @@ -1,4 +0,0 @@ -[.] - trigger = $pcpu > 10 - action = echo "$command using $pcpu% CPU" | /bin/mail root - diff --git a/samples/solaris.ini b/samples/solaris.ini deleted file mode 100644 index 9ddc74a..0000000 --- a/samples/solaris.ini +++ /dev/null @@ -1,18 +0,0 @@ -# $Id: solaris.ini,v 1.3 2000/04/09 20:40:21 rocky Exp $ -# Processes one might want to monitor under Solaris - -[(/usr/sbin/)?cron] - trigger = $count=1 - action = echo "$command not running" | /usr/ucb/mail -s "$command down" root - -[(/usr/sbin/)?sylogd] - trigger = $count=1 - action = echo "$command not running" | /usr/ucb/mail -s "$command down" root - -[.] - trigger = $pcpu > 70 - occurs = every - action = < "Test::Pod 1.14 required for testing POD" if $@; -all_pod_files_ok(catfile($top_builddir, "ps-watcher")); diff --git a/tests/01.pod.t.in b/tests/01.pod.t.in deleted file mode 100644 index b288d82..0000000 --- a/tests/01.pod.t.in +++ /dev/null @@ -1,9 +0,0 @@ -#!@PERL@ -w -T -*- Perl -*- -# $Id: 01.pod.t.in,v 1.1 2006/03/09 17:37:31 rockyb Exp $ -my $top_builddir = $ENV{top_builddir} ? $ENV{top_builddir} : '..'; - -use Test::More; -use File::Spec::Functions; -eval "use Test::Pod 1.14"; -plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; -all_pod_files_ok(catfile($top_builddir, "@PACKAGE@")); diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index e84499e..0000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -############################################################################## -# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## - -MOSTLYCLEANFILES = *~ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' - -check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t - -check_DATA = args.cnf basic.cnf \ - count.cnf full.cnf paction.cnf - -EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ - 01.pod.t.in args.t.in basic.cnf.in count.t.in driver - -all: - -check: test - -test: - srcdir=$(srcdir); export srcdir; \ - $(PERL) $(srcdir)/driver diff --git a/tests/Makefile.in b/tests/Makefile.in deleted file mode 100644 index 4558c8c..0000000 --- a/tests/Makefile.in +++ /dev/null @@ -1,332 +0,0 @@ -# Makefile.in generated by automake 1.9.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -############################################################################## -# $Id: Makefile.am,v 1.9 2006/03/09 17:37:31 rockyb Exp $ -# Copyright (C) 2003, 2004, 2006 Rocky Bernstein -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -############################################################################## -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = tests -DIST_COMMON = $(srcdir)/01.pod.t.in $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/args.t.in \ - $(srcdir)/basic.cnf.in $(srcdir)/basic.t.in \ - $(srcdir)/count.t.in $(srcdir)/full.t.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_CLEAN_FILES = 01.pod.t args.t basic.t count.t full.t basic.cnf -SOURCES = -DIST_SOURCES = -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CVS2CL = @CVS2CL@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -PS = @PS@ -PS_ARGS = @PS_ARGS@ -PS_ARGS_FMT = @PS_ARGS_FMT@ -PS_CAN_RETURN_MULTIPLE_LINES = @PS_CAN_RETURN_MULTIPLE_LINES@ -PS_CUSTOM_HEADER = @PS_CUSTOM_HEADER@ -PS_FULLCMD_FMT = @PS_FULLCMD_FMT@ -PS_NO_NULL_HEADER = @PS_NO_NULL_HEADER@ -PS_PID_OPTS = @PS_PID_OPTS@ -PS_TIME_VAR = @PS_TIME_VAR@ - -# The keeps automake from substituting PS_VARS -PS_VARS = '' -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__leading_dot = @am__leading_dot@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -MOSTLYCLEANFILES = *~ -check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t -check_DATA = args.cnf basic.cnf \ - count.cnf full.cnf paction.cnf - -EXTRA_DIST = $(check_SCRIPTS) $(check_DATA) \ - 01.pod.t.in args.t.in basic.cnf.in count.t.in driver - -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -01.pod.t: $(top_builddir)/config.status $(srcdir)/01.pod.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -args.t: $(top_builddir)/config.status $(srcdir)/args.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -basic.t: $(top_builddir)/config.status $(srcdir)/basic.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -count.t: $(top_builddir)/config.status $(srcdir)/count.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -full.t: $(top_builddir)/config.status $(srcdir)/full.t.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -basic.cnf: $(top_builddir)/config.status $(srcdir)/basic.cnf.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkdir_p) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS) $(check_DATA) -check: check-am -all-am: Makefile -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - - -all: - -check: test - -test: - srcdir=$(srcdir); export srcdir; \ - $(PERL) $(srcdir)/driver -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tests/args.cnf b/tests/args.cnf deleted file mode 100644 index 2836a33..0000000 --- a/tests/args.cnf +++ /dev/null @@ -1,13 +0,0 @@ -# Scripts on some OS's don't show as the script name as the command name. -# Rather the name of the interpreter is listed (e.g. bash or perl) -# Here's how you can match against a script. -# Look for my processes: ps-watcher. -[perl] - trigger = \$args =~ /ps-watcher --log/ - action = echo "ok 1" - occurs = every -# On BSD/OS the name of the script rather than the interpreter is show. -[ps-watcher] - trigger = \$args =~ /ps-watcher --log/ - action = echo "ok 1" - occurs = every diff --git a/tests/args.t b/tests/args.t deleted file mode 100755 index 411ee8c..0000000 --- a/tests/args.t +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/perl -w -# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ -# Arg checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -plan( tests => 2); - -my $test='args'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - ok(1, "Saw first matching process"); - $count++; - last; - } -} -ok($count>0, "Saw more than one matching process"); - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/args.t.in b/tests/args.t.in deleted file mode 100644 index ecfb7f7..0000000 --- a/tests/args.t.in +++ /dev/null @@ -1,38 +0,0 @@ -#!@PERL@ -w -# $Id: args.t.in,v 1.8 2006/03/10 13:12:36 rockyb Exp $ -# Arg checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -plan( tests => 2); - -my $test='args'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - ok(1, "Saw first matching process"); - $count++; - last; - } -} -ok($count>0, "Saw more than one matching process"); - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/basic.cnf b/tests/basic.cnf deleted file mode 100644 index ff0282d..0000000 --- a/tests/basic.cnf +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ -# We gotta have at least two processes running. Like the OS -# and the ps-watcher program -[.] - trigger = $count > 1 - action = echo "ok 1" - occurs = first - -# Look for my processes -[perl] - action = echo "ok 2" || echo "$ps_pat" - -[.?] - trigger = elapsed2secs('$etime') >= 0 - action = echo "ok 3" - occurs = first - -# I'm assuming there is no process with just a single space. -[^ $] - action = echo "ok 4" - occurs = none - -# Test to see if first-trigger works. -[.*] - trigger = $pid == $$ - action = echo "ok 5" - occurs = first-trigger diff --git a/tests/basic.cnf.in b/tests/basic.cnf.in deleted file mode 100644 index 7ae0d2a..0000000 --- a/tests/basic.cnf.in +++ /dev/null @@ -1,27 +0,0 @@ -# $Id: basic.cnf.in,v 1.4 2005/04/04 23:50:58 rockyb Exp $ -# We gotta have at least two processes running. Like the OS -# and the ps-watcher program -[.] - trigger = $count > 1 - action = echo "ok 1" - occurs = first - -# Look for my processes -[perl] - action = echo "ok 2" || echo "$ps_pat" - -[.?] - trigger = elapsed2secs('$@PS_TIME_VAR@') >= 0 - action = echo "ok 3" - occurs = first - -# I'm assuming there is no process with just a single space. -[^ $] - action = echo "ok 4" - occurs = none - -# Test to see if first-trigger works. -[.*] - trigger = $pid == $$ - action = echo "ok 5" - occurs = first-trigger diff --git a/tests/basic.t b/tests/basic.t deleted file mode 100755 index 52977bb..0000000 --- a/tests/basic.t +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/perl -w -# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ -# Some basic checks -use strict; -use Test::More; - -if ( 'etime' ) { - plan( tests => 5); -} else { - plan( tests => 4 ); -} - -my $test='basic'; -my $cmd = "/usr/bin/perl ../ps-watcher --log --nosyslog --nodaemon " - . "--sleep -1 --config $test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - s/.+:\s+//; - $i++ if (!'etime' && $i==3); - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/basic.t.in b/tests/basic.t.in deleted file mode 100755 index 0f34386..0000000 --- a/tests/basic.t.in +++ /dev/null @@ -1,32 +0,0 @@ -#!@PERL@ -w -# $Id: basic.t.in,v 1.8 2006/03/10 19:07:06 rockyb Exp $ -# Some basic checks -use strict; -use Test::More; - -if ( '@PS_TIME_VAR@' ) { - plan( tests => 5); -} else { - plan( tests => 4 ); -} - -my $test='basic'; -my $cmd = "@PERL@ ../ps-watcher --log --nosyslog --nodaemon " - . "--sleep -1 --config $test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - s/.+:\s+//; - $i++ if (!'@PS_TIME_VAR@' && $i==3); - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/count.cnf b/tests/count.cnf deleted file mode 100644 index 4f09c64..0000000 --- a/tests/count.cnf +++ /dev/null @@ -1,12 +0,0 @@ -# $Id: count.cnf,v 1.1 2002/02/06 04:10:54 rocky Exp $ -# Test of count and none parameters - -# I'm assuming there can't be a processes with $ in the name -[fuxaduxa$] - occurs = none - action = echo "ok 1" - -# Look for my processes so there should be at least one. -[perl] - occurs = none - action = echo "not ok 2" diff --git a/tests/count.t b/tests/count.t deleted file mode 100755 index f669bb7..0000000 --- a/tests/count.t +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl -w -# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; - -my $test='count'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count = @output; -foreach (@output) { - s/.+:\s+//; - print $_; -} -print "ok 2\n" unless $count == 2; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/count.t.in b/tests/count.t.in deleted file mode 100644 index 34897fd..0000000 --- a/tests/count.t.in +++ /dev/null @@ -1,24 +0,0 @@ -#!@PERL@ -w -# $Id: count.t.in,v 1.5 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; - -my $test='count'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count = @output; -foreach (@output) { - s/.+:\s+//; - print $_; -} -print "ok 2\n" unless $count == 2; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/driver b/tests/driver deleted file mode 100755 index 45f7783..0000000 --- a/tests/driver +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/perl -w -#$Id: driver,v 1.1 2000/03/27 01:53:24 rocky Exp $ -use strict; - -use File::Basename; -my $program = basename($0); # Who am I today, anyway? - -sub usage { - print " -usage: - - $program [test1 ... ] - $program --help - -Runs regresion tests (via Test::Harness). - -If no tests are specified all tests that match *.t in the -test directory are run. - -$program --help prints this help. -"; - - exit 100; -} - -use Test::Harness qw(&runtests $verbose); - -my $setup = 0; -process_options(); - -@ARGV = glob("*.t") if !@ARGV; -runtests @ARGV; -exit 0; - -# The bane of programming. -sub process_options { - use Getopt::Long; - $Getopt::Long::autoabbrev = 1; - my $help = 0; - - my $result = &GetOptions - ( - 'help' => \$help, - ); - usage unless $result; - usage if $help; -} - diff --git a/tests/full.cnf b/tests/full.cnf deleted file mode 100644 index 010abbc..0000000 --- a/tests/full.cnf +++ /dev/null @@ -1,15 +0,0 @@ -# $Id: full.cnf,v 1.3 2006/03/10 12:47:37 rockyb Exp $ -# Test to see we can match on all of the processes, not -# just the ones for our account. - -# On a Unix-like system where there always is a pid 1 - init. -# On there is a ppid of 1. -[.] - occurs = first-trigger - trigger = $ppid == 1 - action = echo "ok 1" - -[.?] - occurs = every - trigger = $pid == 1 - action = echo "ok 2" diff --git a/tests/full.t b/tests/full.t deleted file mode 100755 index fef2a32..0000000 --- a/tests/full.t +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/perl -w -# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( tests => 1); -} else { - plan( tests => 2); -} - -my $test='full'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `/usr/bin/perl ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); - } -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/full.t.in b/tests/full.t.in deleted file mode 100644 index 8ad1c32..0000000 --- a/tests/full.t.in +++ /dev/null @@ -1,34 +0,0 @@ -#!@PERL@ -w -# $Id: full.t.in,v 1.6 2006/03/10 13:12:36 rockyb Exp $ -# Some count checks -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( tests => 1); -} else { - plan( tests => 2); -} - -my $test='full'; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my @output = `@PERL@ ../ps-watcher --log --sleep -1 --nodaemon --config ${srcdir}/$test.cnf 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $i=1; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - my $result = sprintf "ok %d", $i; - $i++; - ok($_ =~ m{$result}); - } -} - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/tests/paction.cnf b/tests/paction.cnf deleted file mode 100644 index dd83e1f..0000000 --- a/tests/paction.cnf +++ /dev/null @@ -1,17 +0,0 @@ -# $Id: paction.cnf,v 1.1 2004/01/15 03:00:32 rockyb Exp $ -# Test perl-action, prolog and epilog -# Rather the name of the interpreter is listed (e.g. bash or perl) -# Here's how you can match against a script. -# Look for my processes: ps-watcher. -[$PROLOG] - perl-action = $my_count=0; $root_procs=0; -[.*] - perl-action = $my_count++; $root_procs++ if $uid == 0 - occurs = every -[$EPILOG] - trigger = < 0 && $my_count < $count && - $root_procs > 0 && $my_count > $root_procs -EOT - action = echo "ok 1" - diff --git a/tests/paction.t b/tests/paction.t deleted file mode 100644 index 096ccf9..0000000 --- a/tests/paction.t +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/perl -w -# $Id: paction.t,v 1.2 2006/03/10 03:21:12 rockyb Exp $ -# Arg paction-statement -use strict; -use Test::More; -use Config; - -if ('cygwin' eq $Config{osname}) { - plan( skip_all => "cygwin's ps is not powerful enough this test"); - exit 0; -} - -my $test='paction'; -print "1..2\n"; - -my $srcdir = $ENV{srcdir} ? $ENV{srcdir} : '.'; -my $cmd = "../ps-watcher --log --nosyslog --nodaemon " - . " --sleep -1 --config ${srcdir}/$test.cnf"; -my @output = `$cmd 2>&1`; - -# First line is Id line. This doesn't count in testing. -shift @output; - -my $count=0; -foreach (@output) { - if (/^.+:\s+.*ok/) { - s/.+:\s+//; - print $_; - $count++; - last; - } -} -print "ok 2\n" if $count>0; - -#;;; Local Variables: *** -#;;; mode:perl *** -#;;; End: *** diff --git a/touch.pl b/touch.pl deleted file mode 100755 index b341830..0000000 --- a/touch.pl +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/perl -w -my $vcid='$Id: touch.pl,v 1.4 2006/03/08 19:22:41 rockyb Exp $ '; -# Copyright (C) 1997-2006 R. Bernstein email: rocky@cpan.org -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -use strict; -use File::Basename; -my $program = basename($0); # Who am I today, anyway? - -if (@ARGV != 1) { - print " -usage: - $program *file* - - A perl implimentation of a minimal Unix touch command: creates file *file* - if it does not exist. In either case, the file is given a creation - time of the current time. -"; - exit 100; -} - -print "$ARGV[0]\n"; -if (-e $ARGV[0]) { - my $now = time(); - my $count = utime $now, $now, $ARGV[0]; - exit ($count != 1); -} else { - open(FILE, ">$ARGV[0]") || die "Can't open $ARGV[0]: $!"; - close(FILE); - exit $?; -}