mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
609b7faeee | ||
|
|
658fe50312 | ||
|
|
61b6acf2f5 |
214 changed files with 47801 additions and 15955 deletions
33
.gitignore
vendored
33
.gitignore
vendored
|
|
@ -1,33 +0,0 @@
|
|||
# Wildcard + in any subdir.
|
||||
*.o
|
||||
*.gcno
|
||||
*.gcda
|
||||
*.[ch].gcov
|
||||
|
||||
# Exact filename in any subdir.
|
||||
.deps
|
||||
.dirstamp
|
||||
Makefile
|
||||
Makefile.in
|
||||
|
||||
# Exact wildcard, e.g., not in subdirs.
|
||||
/tests/*.log
|
||||
/tests/*.trs
|
||||
|
||||
# Exact match, if a directory then everything in directory.
|
||||
/.version
|
||||
/aclocal.m4
|
||||
/autom4te.cache/
|
||||
/config.h
|
||||
/config.h.in
|
||||
/config.log
|
||||
/config.status
|
||||
/configure
|
||||
/dhcpd-pools
|
||||
/INSTALL
|
||||
/libtool
|
||||
/m4/
|
||||
/man/dhcpd-pools.1
|
||||
/stamp-h1
|
||||
/test-suite.log
|
||||
/tests/outputs/
|
||||
105
.in
Normal file
105
.in
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/* .in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
2
.mailmap
2
.mailmap
|
|
@ -1,2 +0,0 @@
|
|||
Sami Kerola <kerolasa@iki.fi>
|
||||
Sami Kerola <kerolasa@iki.fi> <sami.kerola@tomtom.com>
|
||||
5
AUTHORS
5
AUTHORS
|
|
@ -1 +1,4 @@
|
|||
See THANKS file.
|
||||
Authors of dhcpd-pools.
|
||||
See also the files THANKS and ChangeLog.
|
||||
|
||||
Sami Kerola made design and implemented dhcpd-pools.
|
||||
|
|
|
|||
374
COPYING
374
COPYING
|
|
@ -1,34 +1,340 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
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.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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) year 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.
|
||||
|
||||
<signature of Ty Coon>, 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.
|
||||
|
|
|
|||
81
ChangeLog
81
ChangeLog
|
|
@ -1,84 +1,3 @@
|
|||
The end of ChangeLog; Fri Jan 21 18:15:50 2011 +0100
|
||||
See "git log" for change information.
|
||||
|
||||
2011-01-21 Sami Kerola <kerolasa@iki.fi>
|
||||
* Autoreconf done & PACKAGE_URL introduced.
|
||||
* PACKAGE_URL introduced to configure.ac
|
||||
* Dominic Germain sent xml, and detailed xml, outputs
|
||||
patch.
|
||||
* Dominic Germain pointed out include directive bug,
|
||||
which broke shared network name.
|
||||
* Anonymous contrib addition snmptest.pl which should
|
||||
provide some sort of SNMP integration.
|
||||
* Range statements have dynamic-bootp flag and it no
|
||||
longer will break analysis.
|
||||
|
||||
2009-11-04 Sami Kerola <kerolasa@iki.fi>
|
||||
* Roar Pettersen pointed out portability bug related to
|
||||
posixfadvice arguments.
|
||||
* Roar Pettersen pointed out fclose(stdout) portability
|
||||
bug.
|
||||
* Clean up function set to be ran at exit instead of end
|
||||
of main().
|
||||
|
||||
2009-05-14 Dan Thorson
|
||||
* Memory boundary check. Lack of this caused illegal memory
|
||||
references when there was plenty of backup leases.
|
||||
|
||||
2009-02-18 Sami Kerola <kerolasa@iki.fi> && Dan Thorson
|
||||
* posix_fadvice to make read-ahead quicker. (SK)
|
||||
* HTML output to be more beatyful. (DT)
|
||||
* --format H as a full html. (DT)
|
||||
* Finglish to English translation. (DT)
|
||||
* Autotools update, now done by the book. (SK)
|
||||
|
||||
2008-09-06 Sami Kerola <kerolasa@iki.fi>
|
||||
* Release 2.9 - bug fixes.
|
||||
* Bug report from Fredrik Vöcks
|
||||
- Include files & shared network name bug fixed.
|
||||
- If first range had no leases analysis crashed.
|
||||
* Linux style indent.
|
||||
* Autotool files update.
|
||||
|
||||
2008-06-21 Sami Kerola <kerolasa@iki.fi>
|
||||
* dhcpd-pools.c: Default will skip merge sorting.
|
||||
* getdata.c: Interpretation of range wrote without spaces fixed.
|
||||
* getdata.c: Shared network name ending to brace fixed.
|
||||
* Failover backup IP counting.
|
||||
* CSV output bug fixed.
|
||||
|
||||
2008-05-18 Sami Kerola <kerolasa@iki.fi>
|
||||
* Some automake files to help make install pass without complains.
|
||||
* Function names to error messages where they where missing.
|
||||
* Some sort options where missing from help screen.
|
||||
* Manual page update.
|
||||
* Multi key sorting.
|
||||
* Range flip to support reverse order printing.
|
||||
* Output function & errno caused FreeBSD-7.0 to exit with error
|
||||
when there was no trouble.
|
||||
* Code cleanup.
|
||||
|
||||
2008-05-10 Sami Kerola <kerolasa@iki.fi>
|
||||
* Release 2.6
|
||||
* Last version did not follow include directives.
|
||||
* The dhcpd.conf parser was still quite stupid.
|
||||
* Touched IP counting.
|
||||
* All networks count was completely broken.
|
||||
|
||||
2008-05-05 Sami Kerola <kerolasa@iki.fi>
|
||||
* Release 2.5
|
||||
* Reverse order for output sorting.
|
||||
* Options parsing fixed.
|
||||
* Bug report by Roar Pettersen
|
||||
- FreeBSD-7.0 output to file does not work.
|
||||
- Not quite sure will it work even this release.
|
||||
Help needed, I don't have FreeBSD-7.0.
|
||||
* Completely new dhcpd.conf parser.
|
||||
|
||||
2008-04-30 Sami Kerola <kerolasa@iki.fi>
|
||||
* Release 2.4
|
||||
* Sorting for range output.
|
||||
|
||||
2008-04-20 Sami Kerola <kerolasa@iki.fi>
|
||||
* Release 2.3
|
||||
* From bug report by Frank Bulk.
|
||||
|
|
|
|||
236
INSTALL
Normal file
236
INSTALL
Normal file
|
|
@ -0,0 +1,236 @@
|
|||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
|
||||
Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
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, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. (Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.)
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You only need
|
||||
`configure.ac' if you want to change it or regenerate `configure' using
|
||||
a newer version of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system. 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. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you 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 support 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' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
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' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script). Here is a another example:
|
||||
|
||||
/bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
|
||||
configuration-related scripts to be executed by `/bin/bash'.
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
54
Makefile.am
54
Makefile.am
|
|
@ -1,55 +1,5 @@
|
|||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
|
||||
AUTOMAKE_OPTIONS = gnu
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits
|
||||
|
||||
EXTRA_DIST = \
|
||||
.version \
|
||||
build-aux/git-version-gen \
|
||||
m4/gnulib-cache.m4
|
||||
|
||||
SUBDIRS = lib
|
||||
|
||||
BUILT_SOURCES = $(top_srcdir)/.version
|
||||
$(top_srcdir)/.version:
|
||||
echo $(VERSION) > $@-t && mv $@-t $@
|
||||
dist-hook:
|
||||
echo $(VERSION) > $(distdir)/.tarball-version
|
||||
|
||||
PATHFILES =
|
||||
CLEANFILES = $(PATHFILES)
|
||||
EXTRA_DIST += $(PATHFILES:=.in)
|
||||
CLEAN_LOCALS =
|
||||
|
||||
edit_cmd = sed \
|
||||
-e 's|@ALARM_CRIT[@]|$(ALARM_CRIT)|g' \
|
||||
-e 's|@ALARM_WARN[@]|$(ALARM_WARN)|g' \
|
||||
-e 's|@DHCPDCONF_FILE[@]|$(DHCPDCONF_FILE)|g' \
|
||||
-e 's|@DHCPDLEASE_FILE[@]|$(DHCPDLEASE_FILE)|g' \
|
||||
-e 's|@OUTPUT_FORMAT[@]|$(OUTPUT_FORMAT)|g' \
|
||||
-e 's|@OUTPUT_LIMIT[@]|$(OUTPUT_LIMIT)|g' \
|
||||
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
||||
-e 's|@PACKAGE_MAINTAINER[@]|$(PACKAGE_MAINTAINER)|g' \
|
||||
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
|
||||
-e 's|@PACKAGE_URL[@]|$(PACKAGE_URL)|g' \
|
||||
-e 's|@SHELL[@]|$(SHELL)|g' \
|
||||
-e 's|@VERSION[@]|$(VERSION)|g' \
|
||||
-e 's|@bindir[@]|$(bindir)|g' \
|
||||
-e 's|@docdir[@]|$(docdir)|g' \
|
||||
-e 's|@top_srcdir[@]|$(top_srcdir)|g'
|
||||
|
||||
$(PATHFILES): Makefile
|
||||
@ rm -f $@ $@.tmp
|
||||
$(AM_V_at) mkdir -p $$(dirname $@)
|
||||
$(AM_V_GEN) srcdir=''; \
|
||||
test -f ./$@.in || srcdir=$(srcdir)/; \
|
||||
$(edit_cmd) $${srcdir}$@.in >$@.tmp
|
||||
@ mv $@.tmp $@
|
||||
|
||||
include contrib/Makemodule.am
|
||||
include doc/Makemodule.am
|
||||
include man/Makemodule.am
|
||||
include samples/Makemodule.am
|
||||
include src/Makemodule.am
|
||||
include tests/Makemodule.am
|
||||
|
||||
clean-local: $(CLEAN_LOCALS)
|
||||
SUBDIRS = src man
|
||||
|
|
|
|||
582
Makefile.in
Normal file
582
Makefile.in
Normal file
|
|
@ -0,0 +1,582 @@
|
|||
# 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@
|
||||
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 = :
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||
$(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \
|
||||
THANKS TODO depcomp install-sh missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
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 = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
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@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
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@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
dhcpd_conf = @dhcpd_conf@
|
||||
dhcpd_leases = @dhcpd_leases@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
output_format = @output_format@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AUTOMAKE_OPTIONS = 1.5 gnits
|
||||
SUBDIRS = src man
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh:
|
||||
@:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnits '; \
|
||||
cd $(srcdir) && $(AUTOMAKE) --gnits \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnits 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: $(am__configure_deps)
|
||||
cd $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then \
|
||||
rm -f stamp-h1; \
|
||||
$(MAKE) stamp-h1; \
|
||||
else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: $(am__configure_deps)
|
||||
cd $(top_srcdir) && $(AUTOHEADER)
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
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) config.h.in $(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) config.h.in $(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) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) config.h.in $(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)
|
||||
@case `sed 15q $(srcdir)/NEWS` in \
|
||||
*"$(VERSION)"*) : ;; \
|
||||
*) \
|
||||
echo "NEWS not updated; not releasing" 1>&2; \
|
||||
exit 1;; \
|
||||
esac
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
@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 config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
$(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)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
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-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-hdr distclean-recursive distclean-tags \
|
||||
distcleancheck distdir distuninstallcheck 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 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-info-am
|
||||
|
||||
# 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:
|
||||
610
NEWS
610
NEWS
|
|
@ -1,617 +1,10 @@
|
|||
dhcpd-pools -- History of visible changes.
|
||||
|
||||
Copyright (C) 2006- Sami Kerola <kerolasa@iki.fi>
|
||||
Copyright (C) 2006, Sami Kerola <kerolasa@iki.fi>
|
||||
See the end for copying conditions.
|
||||
|
||||
Please send dhcpd-pools bug reports to kerolasa@iki.fi.
|
||||
|
||||
gpg: Signature is crated using RSA key ID 8ED396E37E38D471A00530D3A9553245FDE9B739.
|
||||
|
||||
|
||||
Version 3.3
|
||||
Belkacem Daheb (2):
|
||||
add start, end and hostname printing support for xml and json
|
||||
getdata output: add start, end and hostname printing support for xml and json
|
||||
|
||||
M. van Brummelen (1):
|
||||
docs: fix manual page groff warning
|
||||
|
||||
Sami Kerola (9):
|
||||
update project web page
|
||||
website: use https
|
||||
chore: update web links
|
||||
getdata: only emit warning when config include file cannot be read
|
||||
gnulib: update bootstrap and gitignore files
|
||||
build-sys: quote subshell execution in the autotools file
|
||||
build-sys: update bootstrap from gnulib
|
||||
output: update html javascripts
|
||||
release: 3.3
|
||||
|
||||
luisδμ (1):
|
||||
fix: avoid generation of unvalid JSON in summary
|
||||
|
||||
Version 3.2
|
||||
Jean Benoit (1):
|
||||
contrib: snmptest.pl SNMPwalk can't access to all variables/wrong sort
|
||||
|
||||
Sami Kerola (5):
|
||||
contrib: point out where one can find zabbix template
|
||||
build-sys: update .gitignore files
|
||||
config: remove unnecessary padding
|
||||
build-sys: autotools and gnulib related updates
|
||||
build-sys: routine update
|
||||
release: 3.2
|
||||
|
||||
Version 3.1
|
||||
Mark Sangster (1):
|
||||
output: fix warn and crit counts on shared networks
|
||||
|
||||
Sami Kerola (31):
|
||||
webpage: add instructions how to get output you need
|
||||
build-sys: add coverage files to .gitignore
|
||||
tests: improve coverage
|
||||
docs: fix peoples name in THANKS file to have correct characters
|
||||
add .mailmap
|
||||
output: fix implicit conversion
|
||||
main: simplify option parsing
|
||||
fix typo
|
||||
main: move print_mac_addreses to state structure
|
||||
main: move output_format to state, and rename color_format
|
||||
webpages: use html sample output
|
||||
fix switch missing default case warnings
|
||||
sort: ensure NaN will not trip over comp_double()
|
||||
drop images, java scripts, and such from web sitemap file
|
||||
getdata: remote dead code
|
||||
other: use strftime() to generate date-time string
|
||||
lib: update .gitignore
|
||||
fix typos
|
||||
various: fix few warnings
|
||||
warnings: ensure optimal packing in structures
|
||||
other: use IP string lengths from netinet/in.h
|
||||
mustach: sync with most recent mustach upstream changes
|
||||
various: tidy up variable scopes, and one name mismatch
|
||||
build-sys: update .gitignore files
|
||||
output: add warning and critical threshold counts to mustach
|
||||
samples: make prometheus template less klunky
|
||||
misc: fix spelling issues
|
||||
output: add ethernet address priting support to --mustach
|
||||
build-sys: update bootstrap from gnulib
|
||||
output: update javascripts
|
||||
release: 3.1
|
||||
|
||||
Version 3.0
|
||||
Sami Kerola (56):
|
||||
release: update web page meta data
|
||||
update sitemap
|
||||
output: make output_analysis() to be regular function
|
||||
getdata: fix typo
|
||||
output: add output helper functions
|
||||
output: add color support to text output
|
||||
output: include earlier missing data to json output
|
||||
output: add --skip-ok option
|
||||
other: add --skip-ok to usage() output
|
||||
output: json nan values need quoting
|
||||
other: do not use 'else' after 'return'
|
||||
getdata: do not use 'else' after 'continue'
|
||||
include: use project specific header guard
|
||||
output: use range_output_helper() value in output_xml()
|
||||
output: add mustach templating support
|
||||
output: add separate first_ip and last_ip to json and mustach outputs
|
||||
docs: add mustach sample files
|
||||
tests: add mustach check
|
||||
output: make mustach processing more robust
|
||||
output: avoid mixing ntop_ipaddr() output buffers
|
||||
output: do not skip over first range in mustach output
|
||||
output: save and reuse output helper results
|
||||
output: add must_put_err() utility function
|
||||
output: include stdlib.h to avoid compilation error
|
||||
gnulib: use nstrftime instead of strftime
|
||||
build-sys: omit mustach compilation when it cannot work
|
||||
usage: add error message informing mustach support is not available
|
||||
output: deduplicate file closing code
|
||||
clean up: remove unused variable
|
||||
all files: replace global variables with runtime config state structure
|
||||
all files: re-indent
|
||||
analyze: bug fix shared networks counts
|
||||
other: add Jose Bollo to version output credits
|
||||
output: improve mustach template parsing error
|
||||
analysis: shared networks to be linked list
|
||||
output: make --skip-ok to effect --perfdata
|
||||
output: move shared net andn range status check to output_helper
|
||||
output: make warning and critical colors work in html output
|
||||
output: display more entries in html table by default
|
||||
output: shared net can be in suppressed state
|
||||
output: improve html table
|
||||
hash: include stdlib.h to avoid implicit declarations
|
||||
clean up: fix couple compiler warnings
|
||||
thanks: add Troy D. Hanson to credits about uthash
|
||||
samples: add prometheus text file collector mustach template
|
||||
output: make --skip to take arguments what will be skipped
|
||||
misc: move command line option parsing to separate function
|
||||
misc: move couple enums from global scope to file scope
|
||||
docs: improve doxygen documentation
|
||||
output: remove unused variable attribute
|
||||
output: add more items to mustach tags
|
||||
output: unify time stamp creations
|
||||
orther: fix xstrstr_init() memcmp() return value usage
|
||||
output: add some trivia data to json output
|
||||
usage: --skip=ignored is actually 'suppressed'
|
||||
release: 3.0
|
||||
|
||||
Version 2.29
|
||||
Boris Lytochkin (1):
|
||||
introduce -A arg: treat single subnets as shared-network with CIDR as their name
|
||||
|
||||
Manuel Hachtkemper (1):
|
||||
alarming: add additional performance data
|
||||
|
||||
Sami Kerola (47):
|
||||
tell in README when ./bootstrap is needed
|
||||
add dhcpd-pools website content to a subdirectory
|
||||
add sitemap url to robots.txt file
|
||||
use long options in .indent.pro file
|
||||
webpages: make index page mobile device friendly
|
||||
webpages: compress sitemap.txt file
|
||||
getdata: flip ranges if they are in greater smaller order
|
||||
tests: add range definition flip test
|
||||
contrib: add archlinux package build file
|
||||
contrib: remove unnecessary cgi script
|
||||
contrib: remove awk file duplicate
|
||||
getdata: get rid of remaining stdbool usage
|
||||
argument parsing: fix compiler warning
|
||||
add dhcpd-pools Description Of A Project file
|
||||
fix doap file git repository and license section
|
||||
output: check alarming mode can output successfully
|
||||
build-sys: update bootstrap from gnulib
|
||||
build-sys: update gnulib .gitignore file
|
||||
analyze: use while() when for() is less fit to purpose
|
||||
build-sys: default to ./configure --enable-silent-rules
|
||||
build-sys: always use restrict found by autoconf
|
||||
docs: fix couple typos and improve a sentence in README
|
||||
output: remove unnecessary increment
|
||||
portability: add gnulib modules earlier missing
|
||||
remove const and pure function attributes
|
||||
man: improve synopsis and output limit
|
||||
man: remove old html table only option argument from manual
|
||||
getdata: report position in config file when parsing fails
|
||||
output: fix timestamp localization on html page
|
||||
output: add include avoid referringt to undefined definition
|
||||
getdata: remove POSIX_FADV_NOREUSE
|
||||
style: use same argument names in header and source file
|
||||
contrib: Klaus Slott told about opensuse package
|
||||
getdata: fpos_t is not easy to print correctly
|
||||
lib: update .gitignore
|
||||
fix typo
|
||||
variable: add const to print_mac_addreses_tmp
|
||||
lib: update .gitignore
|
||||
add --ip-version option to force either IPv4 or IPv6 analysis
|
||||
lib: update .gitignore
|
||||
getdata: add cidr range support
|
||||
build-sys: update bootstrap from gnulib
|
||||
docs: update doxygen configuration file
|
||||
docs: tell what needs to be done when releasing new version
|
||||
docs: add build instruction link to the project web page
|
||||
docs: update maintainer gpg key
|
||||
release: 2.29
|
||||
|
||||
Version 2.28
|
||||
Sami Kerola (26):
|
||||
portability: Solaris 10 does not have err.h
|
||||
fix couple compiler warnings
|
||||
make binary exec path dynamic in scripts referring to it
|
||||
update doxygen.conf file
|
||||
add --snet-alarms option to suppress excess range alarms
|
||||
add --warn-count and --crit-count options to suppress alarm noise
|
||||
improve README file instructions
|
||||
make html output to use Bootstrap and DataTables
|
||||
fix typo in README
|
||||
correct return value FIXME items
|
||||
use more descriptive names in limit bits enum definition
|
||||
remove upper limit of sort order definitions
|
||||
fix protocol specifier in html output
|
||||
use bitmap for booleans and other config that has known size
|
||||
simplify output format selection, and passing
|
||||
fix doxygen build
|
||||
fix improve variable names
|
||||
print include system error message when output fails
|
||||
drop a core when bug condition happens
|
||||
make usage() easier to read
|
||||
unify quotation in error messages
|
||||
add --warn-count and --crit-count test, and fix related bug
|
||||
test all sorting options
|
||||
change NAN markup to make tests work on mac
|
||||
fix out of tree build tests
|
||||
release: 2.28
|
||||
|
||||
Version 2.27
|
||||
Sami Kerola (9):
|
||||
docs: remove very basic git usage info
|
||||
docs: remove todo items that will never happen
|
||||
output: remove empty element from xml
|
||||
add touched addresses counts to xml and json reports
|
||||
add xml format check
|
||||
improve html output
|
||||
add hint about configure options to README
|
||||
man: fix character class change
|
||||
gitignore: update gnulib file list
|
||||
release: 2.27
|
||||
|
||||
Version 2.26
|
||||
$ git shortlog v2.25..v2.26
|
||||
Sami Kerola (15):
|
||||
news: add the note about .sig pgp key id
|
||||
reindent all files
|
||||
declare global variables only once
|
||||
add appropriate sorting function for struct leases_t
|
||||
update kernel.org url in README
|
||||
getdata: fix buffer-overflows reported by address sanitizer
|
||||
update bootstrap from gnulib
|
||||
getdata: fix buffer overflow [AddressSanitizer]
|
||||
other: reduce variable scope
|
||||
output: prefer thread safe function localtime_r()
|
||||
tests: add regression test to avoid shared-net off by one alarming
|
||||
issue
|
||||
output: avoid division by zero
|
||||
other: disallow unsigned counter ever to have minus value
|
||||
maint: remove unnecessary braces, spaces, update gnulib .gitignore
|
||||
release: 2.26
|
||||
|
||||
Wolfgang Steudel (1):
|
||||
alarming: include last shared network in alarming [off by one]
|
||||
|
||||
Version 2.25
|
||||
$ git shortlog v2.24..v2.25
|
||||
Sami Kerola (14):
|
||||
build-sys: use more strict method to check __builtin_expect
|
||||
getdata: add missing HAVE_POSIX_FADVISE protection
|
||||
getdata: fix consecutive range definition regression
|
||||
man: add tip analysis of include files can be useful
|
||||
thanks: add Fredrik Lysén & Conor McCarthy
|
||||
generic: use pure and const function attributes when possible
|
||||
tests: fix testing error
|
||||
output: make nagios output have performance data
|
||||
build-sys: update gitinore file
|
||||
output: use symbolic exit values for nagios commands
|
||||
build-sys: update bootstrap script
|
||||
build-sys: require automake 1.12 to get working test-driver
|
||||
contrib: add release siging key to contrib/
|
||||
release: 2.25
|
||||
|
||||
Version 2.24
|
||||
$ git shortlog v2.23..v2.24
|
||||
Sami Kerola (22):
|
||||
build-sys: update configure.ac
|
||||
output: make output limits to apply to alarm return values
|
||||
tests: add alarming tests
|
||||
output: allow alarming, in case of success, be silent
|
||||
tests: fix tests to use the new OK printing limit
|
||||
docs: inform how the limits affect to printing when alarming is in use
|
||||
output: allow user to ignore small ranges and shared networks
|
||||
tests: test small network alarm ignoring
|
||||
docs: add an example how to use limits with alarming
|
||||
thanks: Dan Pritts
|
||||
xstrstr: speed up analysis by avoiding string comparisons
|
||||
other: memcmp() is tiny bit quicker than strncmp()
|
||||
build-sys: update gnulib modules
|
||||
build-sys: AC_PROG_CC_C99 is obsolete; use AC_PROG_CC
|
||||
getdata: use correct file caching advice
|
||||
analyze: remove unnecessary function
|
||||
getdata: memccpy() is better than own similar function
|
||||
getdata: split busy function to segments used via function pointer
|
||||
various: split functions to IPv4 and IPv6 versions
|
||||
various: fix memory leaks
|
||||
getdata: fix one ip ranges when they have trailing spaces in definition
|
||||
release: 2.24
|
||||
|
||||
Version 2.23
|
||||
$ git shortlog v2.22..v2.23
|
||||
Sami Kerola (3):
|
||||
gnulib: add gnulib modules
|
||||
build-sys: update bootstrap from gnulib
|
||||
release: 2.23
|
||||
|
||||
Version 2.22
|
||||
$ git shortlog v2.21..v2.22
|
||||
Cheer Xiao (1):
|
||||
getdata: treat binding states abandoned, expired and release like free
|
||||
|
||||
Sami Kerola (19):
|
||||
tests: add complete check including multiple ranges and shared networks
|
||||
include: add missing declarations to dhcpd-pool.h
|
||||
cppcheck: fix variable scoping
|
||||
build-sys: update .gitignore
|
||||
build-sys: add git-version-gen and test.sh to release package
|
||||
docs: fix spelling mistakes in manual page
|
||||
build-sys: ensure distribution has version file
|
||||
build-sys: update git-version-gen from gnulib
|
||||
tests: binding states commit needs to be reflected in expected results
|
||||
build-sys: reorder gnulib macro in relation to C standard
|
||||
getdata: posix_fadvise() error checking
|
||||
getdata: certain input files caused SIGSEGV
|
||||
tests: check how command works with invalid input
|
||||
getdata: make a lease address detection more robust
|
||||
getdata: make single address ranges work
|
||||
tests: add a test for one ip range
|
||||
build-sys: fix gnulib function order
|
||||
build-sys: use non-recursive build
|
||||
release: 2.22
|
||||
|
||||
Version 2.21
|
||||
$ git shortlog v2.20..v2.21
|
||||
Cheer Xiao (10):
|
||||
IPv6: add DHCPv6 support
|
||||
sort: Use a comparer instead of returner
|
||||
sort: Get rid of global comparer
|
||||
counting & output: Convert all counters to double
|
||||
fix: Put prototype of field_selector back to dhcpd-pools.h
|
||||
sort: let field_selector return NULL at the end
|
||||
counting: Let get_range_size return double
|
||||
sort: let comp_* functions compare double
|
||||
tests: update expected/v6
|
||||
output: fix doc of output_double
|
||||
|
||||
Gilles Bouthenot (5):
|
||||
output: add json format support
|
||||
json output: add newline at end
|
||||
json output: remove useless, empty fields
|
||||
json output: bugfix: correct range specify only first ip
|
||||
contrib: add munin plugins
|
||||
|
||||
Sami Kerola (29):
|
||||
build-sys: remove c++ compiler check
|
||||
tools: add indent command configuration file
|
||||
tests: add basic tests
|
||||
build-sys: update .gitignore
|
||||
tests: add v6 check
|
||||
output: remove unnecessary new line printing
|
||||
build-sys: more clean ups
|
||||
json output: use defined output file for all printing
|
||||
tests: add json tests, and make fail output loud
|
||||
ouput format: fix active lease printing
|
||||
output ethernet: do not crash if ethernet is missing
|
||||
docs: add doxygen tags, configuration file, and autotooling
|
||||
backup counting: fix output regression
|
||||
clean up: remove unused functions
|
||||
clean up: move code to more proper location
|
||||
hash: make delete to use HASH_ITER if it is available
|
||||
clean up: move global variables to config structure
|
||||
clean up: use enum as symbolic bit masks
|
||||
clean up: convert parsing magic numbers to symbolic values
|
||||
clean up: rename get_order() to merge() and mark static
|
||||
clean up: fix few indentation slips
|
||||
getdata: be consistant with symbolic numbers
|
||||
smatch scan: fix few warnings
|
||||
build-sys: allow tests run parallel
|
||||
build-sys: update .gitignore files
|
||||
docs: thanks to Cheer Xiao this software has IPv6 support
|
||||
tests: fix make distcheck
|
||||
docs: fix doxygen make distcheck breakage
|
||||
release: 2.21
|
||||
|
||||
Version 2.20
|
||||
$ git shortlog v2.19..v2.20
|
||||
Cheer Xiao (3):
|
||||
ignore /gnulib/
|
||||
Replace all htonl in getdata.c with ntohl.
|
||||
Fix spelling mistakes.
|
||||
|
||||
Sami Kerola (20):
|
||||
analyze: use simpler comparison
|
||||
analyze: sort ranges before analysis
|
||||
sort: fix if else return statements
|
||||
getdata: fix if else return statements
|
||||
analyze, getdata: write functions in frequency order
|
||||
getdata: stop looking after interesting field
|
||||
getdata: skip strings before nth_field analysis
|
||||
analyze: use gnulib
|
||||
sort: fix get_order() if else return statement
|
||||
(un)likely: use __builtin_expect to inform expected path
|
||||
header: let gnulib do what it is best of
|
||||
xstrstr: add function attributes
|
||||
docs: fix spelling mistakes
|
||||
getdata & analyze: fix first_ip and last_ip arithmetics
|
||||
man: use configured dhcpd.conf and dhcpd.leases paths
|
||||
build-sys: update gitignore
|
||||
build-sys: clean up configure.ac
|
||||
build-sys: make alarm warning & critical default configurable
|
||||
man: fix errors in alarm warning and critical options text
|
||||
release: 2.20
|
||||
|
||||
Version 2.19
|
||||
$ git shortlog v2.18..v2.19
|
||||
Sami Kerola (19):
|
||||
alarming: make native nagios support to dhcpd-pools
|
||||
docs: add examples to manual page
|
||||
docs: add note how to limit alarming scope
|
||||
contrib: add nagios.conf example
|
||||
build-sys: create only xz compressed distribution package
|
||||
all: fix compiler warninings
|
||||
style: fix few indentation issues
|
||||
build-sys: use AM_CPPFLAGS rather than INCLUDES
|
||||
output: fix sign-compare warning [clang]
|
||||
build-sys: add what autoscan found bein missing
|
||||
build-sys: be conservative about posix_fadvice
|
||||
docs: clarify man page
|
||||
build-sys: add gnulib
|
||||
build-sys: clean gnulib & autotools checks
|
||||
performance: add few restict and const key words
|
||||
build-sys: remove files which where added by accident
|
||||
docs: mention gnulib in README file
|
||||
build-sys: update gitignore
|
||||
release: 2.19
|
||||
|
||||
Version 2.18
|
||||
$ git shortlog v2.17..v2.18
|
||||
Ryan Steinmetz (1):
|
||||
build-sys: make build work under FreeBSD
|
||||
|
||||
Sami Kerola (2):
|
||||
build-sys: add --with-uthash=DIR ./configure option
|
||||
analyze: a lot of IP counts being missed
|
||||
|
||||
Version 2.17
|
||||
# git shortlog v2.16..v2.17
|
||||
Enno Gröper (1):
|
||||
analyse: critical bug in the counting code
|
||||
|
||||
Sami Kerola (16):
|
||||
dhcpd-pools.h: move string.h to include
|
||||
dhcpd-pools.h: move string.h to include
|
||||
docs: TODO update
|
||||
Merge branch 'master' of
|
||||
ssh://dhcpd-pools.git.sourceforge.net/gitroot/dhc
|
||||
build: smatch compiler warnings fixed
|
||||
docs: enhance manual page readability
|
||||
all files: use restrict key word for all pointer arguments
|
||||
build-sys: C99 has true and false
|
||||
docs: update thanks
|
||||
TODO: update bugs
|
||||
contrib: add first .awk algorithm test version to contrib
|
||||
docs: update TODO
|
||||
getdata: fix configuration parser bug
|
||||
getdata: do not mix boolean and int data types [cppcheck]
|
||||
output: verify stream status when closing files
|
||||
build-sys: update news for release v2.17
|
||||
|
||||
Version 2.16
|
||||
# git shortlog v2.15..v2.16
|
||||
Sami Kerola (25):
|
||||
docs: help screen & man page
|
||||
docs: add missing full-html flag
|
||||
headers: include-what-you-use fixes
|
||||
other: free backup ranges
|
||||
prepare_memory bug: initialization missing
|
||||
licensing: use FreeBSD license (was GNUv3)
|
||||
parse_leases: exit at read error
|
||||
getdata: realloc instead of asserting
|
||||
getdata: potential overflow due unit change
|
||||
bug: use uint32_t for IP numbers
|
||||
analyze: use more logical variable names
|
||||
getdata: initialize memory
|
||||
all: include-what-you-see fixes
|
||||
analyze: debugging leftover removed
|
||||
THANKS: add Ahmed AL Dakhil
|
||||
maint: coding style fixes
|
||||
output: change to full html behaviour
|
||||
build-sys: autotools configure.ac update
|
||||
docs: NEWS update
|
||||
docs: remove version from manual page
|
||||
licensing: set placeholder properly
|
||||
bug: use uint32_t for IP numbers
|
||||
build-sys: ignore gprof & gcov files
|
||||
getdata: new xstrstr function for performance
|
||||
other: fix two warnings
|
||||
build-sys: update news for release v2.16
|
||||
|
||||
Version 2.15
|
||||
# git shortlog v2.14..v2.15
|
||||
Sami Kerola (13):
|
||||
dhcpd-pools.h: function attributes declarations
|
||||
dhcpd-pools.h: indentation fix
|
||||
getdata.c: initialize variables to have safe values
|
||||
autotools: point correct location of src
|
||||
flose files & free memory when not needed
|
||||
dhcpd-pools.h: portable program_invocation_short_name
|
||||
build-sys: use git version as program version output
|
||||
build-sys: git describe listed wrong tag
|
||||
getdata: increase max number of shared networks
|
||||
clean_up: checking errno at exit does not make sense
|
||||
make range allocation dynamic
|
||||
shared network names to be dynamically allocated
|
||||
thanks: list update
|
||||
|
||||
Version 2.14
|
||||
# git shortlog v2.13..v2.14
|
||||
Sami Kerola (18):
|
||||
Fix to range dynamic-bootp specifier
|
||||
Automake 2.64 is needed.
|
||||
Arithmetic comparisons to be same way around
|
||||
The xml output is dirty and marked as FIXME
|
||||
Optimization on basis of gcov
|
||||
Use what libc will provide
|
||||
Not a syscall error, warn should be warnx.
|
||||
Impossible to reach sections removed
|
||||
posix_fadvice advice parameter change
|
||||
Do not analyze if sort field selector is rubbish.
|
||||
autogen.sh: test bug fix & clean up to messages
|
||||
autogen.sh: typo fix in previous commit
|
||||
Copyright notice change to GNU license 3
|
||||
Allow xml output with leases to use output file
|
||||
INSTALL file is unnecessary
|
||||
fix to safe_strdup prototype.
|
||||
ignore INSTALL file
|
||||
configure.ac: autoscan updates
|
||||
Release 2.14
|
||||
|
||||
Version 2.13
|
||||
* Autoreconf to get ./configure et al up to date.
|
||||
* PACKAGE_URL introduced to configure.ac
|
||||
* Dominic Germain sent xml, and detailed xml, outputs patch.
|
||||
* Dominic Germain pointed out include directive bug, which broke
|
||||
shared network name.
|
||||
* Anonymous contrib addition snmptest.pl which should provide
|
||||
some sort of SNMP integration.
|
||||
* Range statements have dynamic-bootp flag and it no longer will
|
||||
break analysis.
|
||||
|
||||
Version 2.12
|
||||
* Dan Thorson fixed formating.
|
||||
* Roar Pettersen pointed out posix_fadvice portability bug.
|
||||
* Roar Pettersen pointed out fclose(stdout) portability bug.
|
||||
* Clean up will ran at exit instead of end of program.
|
||||
* Stian Øvrevåge pointed out shared network assignment bug.
|
||||
|
||||
Version 2.11
|
||||
* Dan Thorson fixed memory boundary check for backup leases.
|
||||
|
||||
Version 2.10
|
||||
* posix_fadvice to make read-ahead quicker.
|
||||
* Dan Thorson contributions:
|
||||
o HTML output to be more beatyful.
|
||||
o Full HTML output.
|
||||
o Finglish to English translation.
|
||||
* Usage of autotools more properly.
|
||||
|
||||
Version 2.9
|
||||
|
||||
* Include files & shared network name bug fixed.
|
||||
* If first range had no leases analysis crashed.
|
||||
* Linux style indent.
|
||||
|
||||
Version 2.8
|
||||
* dhcpd-pools.c: Default will skip merge sorting.
|
||||
* getdata.c: Interpretation of range wrote without spaces fixed.
|
||||
* getdata.c: Shared network name ending to brace fixed.
|
||||
* Failover backup IP counting.
|
||||
* CSV output bug fixed.
|
||||
|
||||
Version 2.7
|
||||
* Some automake files to help make install pass without complains.
|
||||
* Function names to error messages where they where missing.
|
||||
* Some sort options where missing from help screen.
|
||||
* Manual page update.
|
||||
* Multi key sorting.
|
||||
* Range flip to support reverse order printing.
|
||||
* Output function & errno caused FreeBSD-7.0 to exit with error
|
||||
when there was no trouble.
|
||||
* Code cleanup.
|
||||
|
||||
Version 2.6
|
||||
* I forgot to follow include when I rewrote dhcpd.conf parser.
|
||||
* And the dhcpd.conf parser was still quite stupid.
|
||||
* All networks count was broken. Results before this version where bogus.
|
||||
* Feature: Touched IP counting.
|
||||
|
||||
Version 2.5
|
||||
* Feature:
|
||||
* Reverse order sorting
|
||||
* Option parsing fixed.
|
||||
* FreeBSD-7.0 output to file did not work.
|
||||
* Completely new dhcpd.conf parser.
|
||||
|
||||
Version 2.4
|
||||
* Feature:
|
||||
* Range output sorting.
|
||||
|
||||
Version 2.3
|
||||
* Bugfixes:
|
||||
|
|
@ -655,3 +48,4 @@ Copyright (C) 2006, Sami Kerola <kerolasa@iki.fi>
|
|||
document, or of portions of it, under the above conditions,
|
||||
provided also that they carry prominent notices stating who
|
||||
last changed them.
|
||||
|
||||
|
|
|
|||
76
README
76
README
|
|
@ -1,62 +1,26 @@
|
|||
This is dhcpd-pools - ISC dhcpd lease status utility.
|
||||
This is dhcpd-pools which is made for ISC dhcpd pool range
|
||||
analysis.
|
||||
|
||||
Quick start.
|
||||
With this command you can check usage of pool addresses when
|
||||
address space is great. Command is designed so that it will not
|
||||
get slow even there is thousands of IPs in lease file. This kind
|
||||
of huge dhcpd installation can be near by DSL DSLAMs or some other
|
||||
public access connection points.
|
||||
|
||||
Get the uthash, assuming you do not have it already.
|
||||
This command will not print nice to know information like
|
||||
DHCPStatus does. Output is limited only to list only usage for
|
||||
ranges, shared network and total address space. Limiting what is
|
||||
printed is the right thing to do when there is thousands of
|
||||
addresses. If your address space is small some other dhcp
|
||||
analyzer might be more suitable for you.
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/troydhanson/uthash/archive/master.zip
|
||||
unzip master.zip
|
||||
Source code is pretty printed with this indent command
|
||||
configuration.
|
||||
|
||||
Build the dhcpd-pools project.
|
||||
-nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2 -ndj
|
||||
-nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -psl -nsc -nsob
|
||||
|
||||
cd /tmp/dhcpd-pools
|
||||
./bootstrap # only when building git clone
|
||||
./configure --with-uthash=/tmp/uthash-master/include
|
||||
make
|
||||
make check
|
||||
make install
|
||||
If you write patch please use indent and keep style constant.
|
||||
|
||||
Notice that there are configuration options for default dhcpd.conf,
|
||||
dhcpd.leases paths, among other things.
|
||||
|
||||
./configure --help
|
||||
|
||||
Remember to read the friendly manual page.
|
||||
|
||||
man ./man/dhcpd-pools.1
|
||||
|
||||
Dependencies to other projects.
|
||||
|
||||
https://www.gnu.org/software/gnulib/
|
||||
|
||||
You can avoid repeated gnulib downloads by setting
|
||||
GNULIB_SRCDIR environment variable. For example:
|
||||
|
||||
git clone git://git.savannah.gnu.org/gnulib.git ~/src/gnulib
|
||||
export GNULIB_SRCDIR="$HOME/src/gnulib"
|
||||
|
||||
Assumign detached gnulib please remember to git pull the
|
||||
latest updates before building dhcpd-pools.
|
||||
|
||||
https://troydhanson.github.io/uthash/
|
||||
|
||||
See quick start.
|
||||
|
||||
https://getbootstrap.com/
|
||||
https://datatables.net/
|
||||
|
||||
Bootstrap and DataTables java scripts are used in html
|
||||
output.
|
||||
|
||||
Test data wanted.
|
||||
|
||||
Maintainer is interested to get copy of your dhcpd.conf
|
||||
and dhcpd.leases files, and include files if you use them.
|
||||
Intention is to collect large set of data to build
|
||||
realistic regression test environment.
|
||||
|
||||
If you are interested to help this way put all files into
|
||||
tar.gz, and send them to:
|
||||
|
||||
Sami Kerola <kerolasa@iki.fi>
|
||||
Command home page is located at
|
||||
http://dhcpd-pools.sourceforge.net/
|
||||
|
|
|
|||
55
THANKS
55
THANKS
|
|
@ -1,54 +1,11 @@
|
|||
dhcpd-pools THANKS file
|
||||
|
||||
Project is maintained by Sami Kerola <kerolasa@iki.fi>
|
||||
dhcpd-pools has originally been written by Sami Kerola. Many
|
||||
people have further contributed to dhcpd-pools by reporting
|
||||
problems, suggesting various improvements, or submitting actual
|
||||
code. Here is a list of these people. Help me keep it complete
|
||||
and exempt of errors.
|
||||
|
||||
People who reported problems, give improvement suggestions or even
|
||||
contributed code.
|
||||
|
||||
Otto J. Mäkelä
|
||||
Otto J. Mäkelä
|
||||
Mika Paananen
|
||||
Frank Bulk
|
||||
Roar Pettersen
|
||||
Jeff Wieland
|
||||
Rusty
|
||||
Fredrik Vöcks
|
||||
Dan Thorson
|
||||
Stian Øvrevåge
|
||||
Dominic Germain
|
||||
Anders Låstad
|
||||
Thor Eivind Brantzeg
|
||||
Ahmed AL Dakhil
|
||||
Adam Ciarcinski
|
||||
Rezső Gajdóczy
|
||||
Robert Viou
|
||||
Enno Gröper
|
||||
Troy D. Hanson
|
||||
Ryan Malek
|
||||
Cheer Xiao
|
||||
Gilles Bouthenot
|
||||
Helmut Grohne
|
||||
Joey D.
|
||||
Ryan Steinmetz
|
||||
Dan Pritts
|
||||
Fredrik Lysén
|
||||
Conor McCarthy
|
||||
Wolfgang Steudel
|
||||
Aaron Paetznick
|
||||
Tim Cantin
|
||||
Martijn van Brummelen
|
||||
Anton Tkachev
|
||||
Derrick Lin
|
||||
Ivanov Ivan
|
||||
Manuel Hachtkemper
|
||||
Klaus Slott
|
||||
Boris Lytochkin
|
||||
Jeff Bailey
|
||||
José Bollo
|
||||
Sebastián Cramatte
|
||||
Mark Sangster
|
||||
Brent Swingle
|
||||
Mathieu Morier
|
||||
Jean Benoit
|
||||
Belkacem Daheb
|
||||
Björn Lässig
|
||||
Luisδμ
|
||||
|
|
|
|||
52
TODO
52
TODO
|
|
@ -1,33 +1,25 @@
|
|||
### Bugs
|
||||
Todo:
|
||||
|
||||
Reported-by: Huangyu: I found dhcpd-pools didn't consider if the
|
||||
active lease's ends time is passed so it would still think the
|
||||
lease is active even if dhcpd daemon is stopped for a long time,
|
||||
the leases marked by "active" state in lease_file has expired in
|
||||
fact.
|
||||
* dhcpd.conf file parser should understand semantics of
|
||||
configuration directives.
|
||||
* Better use of autoconfig. Author admits to be beginer in
|
||||
using auto tools. Help needed.
|
||||
* Bad english to good english translation for all files that
|
||||
author has touched. Help needed.
|
||||
* Threshold values -> alarm possibility.
|
||||
* Bug perhaps not? ./dhcpd-pools -o /dev/null
|
||||
/dev/null: Inappropriate ioctl for device
|
||||
Reason is fclose (outfile); in src/output.c
|
||||
|
||||
### Feature requests
|
||||
@ version 3.x - tcp server & snmp support etc
|
||||
|
||||
o Assigned IPs count (Nelson)
|
||||
o Subnet counting class (Henryk)
|
||||
o When time stamps are part of lease situation evaluation (see
|
||||
bug 1) add a --now switch which will one can use to change when
|
||||
expiry happens.
|
||||
o Add lease time histogram support.
|
||||
|
||||
### When releasing
|
||||
|
||||
o Update gnulib
|
||||
o Update bootstrap
|
||||
o Update DataTables, and bootstrap versions; see https://datatables.net/download/index
|
||||
o Update NEWS, webpages/index.html dateModified & version
|
||||
o Make annotated git tag
|
||||
o ./configure --enable-doxygen && make distcheck
|
||||
o BROWSER=cat man -H ./man/dhcpd-pools.1 | tee ./webpages/man.html
|
||||
o gpg --armor --detach-sign dhcpd-pools*tar*
|
||||
* Update sitemap
|
||||
o Upload files to sourceforge
|
||||
o mv doc/html webpages/doxygen
|
||||
o sftp index.html man.html doxygen/* -> sourceforge web
|
||||
remove old doxygen before uploading new
|
||||
o Send email to dhcpd-pools-announce@lists.sourceforge.net subject: Version 3.n is released
|
||||
* TCP server / client for distant queries + libwrap support
|
||||
and some kind of protocol.
|
||||
* SNMP support. Program should be demon which gives states of
|
||||
pools almost instantly when queried. Calculations should be
|
||||
done periodically. This way huge dhcp lease files will not
|
||||
cause problem. Perhaps one thread could poll some socket
|
||||
waiting for query and mean while other could do periodical
|
||||
calculations, where output would be copying data for socket
|
||||
thread.
|
||||
* Configuration file for this command.
|
||||
|
|
|
|||
862
aclocal.m4
vendored
Normal file
862
aclocal.m4
vendored
Normal file
|
|
@ -0,0 +1,862 @@
|
|||
# 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])])
|
||||
|
||||
|
||||
# Copyright (C) 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 8
|
||||
|
||||
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
|
||||
# written in clear, in which case automake, when reading aclocal.m4,
|
||||
# will think it sees a *use*, and therefore will trigger all it's
|
||||
# C support machinery. Also note that it means that autoscan, seeing
|
||||
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
|
||||
|
||||
|
||||
# _AM_DEPENDENCIES(NAME)
|
||||
# ----------------------
|
||||
# See how the compiler implements dependency checking.
|
||||
# NAME is "CC", "CXX", "GCJ", or "OBJC".
|
||||
# We try a few techniques and use that to set a single cache variable.
|
||||
#
|
||||
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
|
||||
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
|
||||
# dependency, and given that the user is not expected to run this macro,
|
||||
# just rely on AC_PROG_CC.
|
||||
AC_DEFUN([_AM_DEPENDENCIES],
|
||||
[AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
|
||||
|
||||
# AM_SET_DEPDIR
|
||||
# -------------
|
||||
# Choose a directory name for dependency files.
|
||||
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
|
||||
AC_DEFUN([AM_SET_DEPDIR],
|
||||
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
|
||||
|
||||
# AM_DEP_TRACK
|
||||
# ------------
|
||||
AC_DEFUN([AM_DEP_TRACK],
|
||||
[AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
|
||||
# Generate code to set up dependency tracking. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 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 3
|
||||
|
||||
# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# ------------------------------
|
||||
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
|
||||
|
||||
# AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
# -----------------------------
|
||||
# This macro should only be invoked once -- use via AC_REQUIRE.
|
||||
#
|
||||
# This code is only required when automatic dependency tracking
|
||||
# is enabled. FIXME. This creates each `.P' file that we will
|
||||
# need in order to bootstrap the dependency handling code.
|
||||
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
|
||||
# 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 8
|
||||
|
||||
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
|
||||
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
|
||||
# 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])])
|
||||
|
||||
# Check to see how 'make' treats includes. -*- 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_MAKE_INCLUDE()
|
||||
# -----------------
|
||||
# Check to see how make treats includes.
|
||||
AC_DEFUN([AM_MAKE_INCLUDE],
|
||||
[am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
|
||||
# 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 <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/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
|
||||
|
||||
3100
autom4te.cache/output.0
Normal file
3100
autom4te.cache/output.0
Normal file
File diff suppressed because it is too large
Load diff
5593
autom4te.cache/output.1
Normal file
5593
autom4te.cache/output.1
Normal file
File diff suppressed because it is too large
Load diff
5830
autom4te.cache/output.2
Normal file
5830
autom4te.cache/output.2
Normal file
File diff suppressed because it is too large
Load diff
5816
autom4te.cache/output.3
Normal file
5816
autom4te.cache/output.3
Normal file
File diff suppressed because it is too large
Load diff
5228
autom4te.cache/output.4
Normal file
5228
autom4te.cache/output.4
Normal file
File diff suppressed because it is too large
Load diff
5228
autom4te.cache/output.5
Normal file
5228
autom4te.cache/output.5
Normal file
File diff suppressed because it is too large
Load diff
797
autom4te.cache/requests
Normal file
797
autom4te.cache/requests
Normal file
|
|
@ -0,0 +1,797 @@
|
|||
# This file was generated.
|
||||
# It contains the lists of macros which have been traced.
|
||||
# It can be safely removed.
|
||||
|
||||
@request = (
|
||||
bless( [
|
||||
'0',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'1',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'/usr/share/aclocal-1.9/amversion.m4',
|
||||
'/usr/share/aclocal-1.9/auxdir.m4',
|
||||
'/usr/share/aclocal-1.9/cond.m4',
|
||||
'/usr/share/aclocal-1.9/depend.m4',
|
||||
'/usr/share/aclocal-1.9/depout.m4',
|
||||
'/usr/share/aclocal-1.9/init.m4',
|
||||
'/usr/share/aclocal-1.9/install-sh.m4',
|
||||
'/usr/share/aclocal-1.9/lead-dot.m4',
|
||||
'/usr/share/aclocal-1.9/make.m4',
|
||||
'/usr/share/aclocal-1.9/missing.m4',
|
||||
'/usr/share/aclocal-1.9/mkdirp.m4',
|
||||
'/usr/share/aclocal-1.9/options.m4',
|
||||
'/usr/share/aclocal-1.9/runlog.m4',
|
||||
'/usr/share/aclocal-1.9/sanity.m4',
|
||||
'/usr/share/aclocal-1.9/strip.m4',
|
||||
'/usr/share/aclocal-1.9/tar.m4',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AM_PROG_MKDIR_P' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_DEP_TRACK' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_DEFUN_ONCE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'2',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'aclocal.m4',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'3',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'/usr/share/aclocal-1.9/amversion.m4',
|
||||
'/usr/share/aclocal-1.9/auxdir.m4',
|
||||
'/usr/share/aclocal-1.9/cond.m4',
|
||||
'/usr/share/aclocal-1.9/depend.m4',
|
||||
'/usr/share/aclocal-1.9/depout.m4',
|
||||
'/usr/share/aclocal-1.9/header.m4',
|
||||
'/usr/share/aclocal-1.9/init.m4',
|
||||
'/usr/share/aclocal-1.9/install-sh.m4',
|
||||
'/usr/share/aclocal-1.9/lead-dot.m4',
|
||||
'/usr/share/aclocal-1.9/make.m4',
|
||||
'/usr/share/aclocal-1.9/missing.m4',
|
||||
'/usr/share/aclocal-1.9/mkdirp.m4',
|
||||
'/usr/share/aclocal-1.9/options.m4',
|
||||
'/usr/share/aclocal-1.9/runlog.m4',
|
||||
'/usr/share/aclocal-1.9/sanity.m4',
|
||||
'/usr/share/aclocal-1.9/strip.m4',
|
||||
'/usr/share/aclocal-1.9/tar.m4',
|
||||
'configure.in'
|
||||
],
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AM_PROG_MKDIR_P' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_DEP_TRACK' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AM_CONFIG_HEADER' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_DEFUN_ONCE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'4',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'/usr/share/aclocal-1.9/amversion.m4',
|
||||
'/usr/share/aclocal-1.9/auxdir.m4',
|
||||
'/usr/share/aclocal-1.9/cond.m4',
|
||||
'/usr/share/aclocal-1.9/depend.m4',
|
||||
'/usr/share/aclocal-1.9/depout.m4',
|
||||
'/usr/share/aclocal-1.9/init.m4',
|
||||
'/usr/share/aclocal-1.9/install-sh.m4',
|
||||
'/usr/share/aclocal-1.9/lead-dot.m4',
|
||||
'/usr/share/aclocal-1.9/make.m4',
|
||||
'/usr/share/aclocal-1.9/missing.m4',
|
||||
'/usr/share/aclocal-1.9/mkdirp.m4',
|
||||
'/usr/share/aclocal-1.9/options.m4',
|
||||
'/usr/share/aclocal-1.9/runlog.m4',
|
||||
'/usr/share/aclocal-1.9/sanity.m4',
|
||||
'/usr/share/aclocal-1.9/strip.m4',
|
||||
'/usr/share/aclocal-1.9/tar.m4',
|
||||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_DEFUN' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AM_PROG_MKDIR_P' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AM_MISSING_HAS_RUN' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AM_MISSING_PROG' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AM_PROG_INSTALL_STRIP' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AM_SANITY_CHECK' => 1,
|
||||
'_AM_PROG_TAR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AM_DEP_TRACK' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'_AM_IF_OPTION' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'sinclude' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'AM_SET_LEADING_DOT' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'_AM_DEPENDENCIES' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AU_DEFUN' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'_AM_SET_OPTION' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_DEFUN_ONCE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_AUX_DIR_EXPAND' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'_AM_SET_OPTIONS' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
|
||||
'AM_RUN_LOG' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'_AM_MANGLE_OPTION' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AM_SET_DEPDIR' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AM_PROG_INSTALL_SH' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1,
|
||||
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
|
||||
'AM_MAKE_INCLUDE' => 1
|
||||
}
|
||||
], 'Autom4te::Request' ),
|
||||
bless( [
|
||||
'5',
|
||||
1,
|
||||
[
|
||||
'/usr/share/autoconf'
|
||||
],
|
||||
[
|
||||
'/usr/share/autoconf/autoconf/autoconf.m4f',
|
||||
'aclocal.m4',
|
||||
'configure.ac'
|
||||
],
|
||||
{
|
||||
'_LT_AC_TAGCONFIG' => 1,
|
||||
'm4_pattern_forbid' => 1,
|
||||
'AC_CANONICAL_TARGET' => 1,
|
||||
'AC_CONFIG_LIBOBJ_DIR' => 1,
|
||||
'AC_C_VOLATILE' => 1,
|
||||
'AC_TYPE_OFF_T' => 1,
|
||||
'AC_FUNC_CLOSEDIR_VOID' => 1,
|
||||
'AC_REPLACE_FNMATCH' => 1,
|
||||
'AC_PROG_LIBTOOL' => 1,
|
||||
'AC_FUNC_STAT' => 1,
|
||||
'AC_FUNC_WAIT3' => 1,
|
||||
'AC_HEADER_TIME' => 1,
|
||||
'AC_FUNC_LSTAT' => 1,
|
||||
'AC_STRUCT_TM' => 1,
|
||||
'AM_AUTOMAKE_VERSION' => 1,
|
||||
'AC_FUNC_GETMNTENT' => 1,
|
||||
'AC_TYPE_MODE_T' => 1,
|
||||
'AC_FUNC_STRTOD' => 1,
|
||||
'AC_CHECK_HEADERS' => 1,
|
||||
'AC_FUNC_STRNLEN' => 1,
|
||||
'm4_sinclude' => 1,
|
||||
'AC_PROG_CXX' => 1,
|
||||
'AC_PATH_X' => 1,
|
||||
'AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK' => 1,
|
||||
'AC_PROG_AWK' => 1,
|
||||
'_m4_warn' => 1,
|
||||
'AC_HEADER_STDC' => 1,
|
||||
'AC_HEADER_MAJOR' => 1,
|
||||
'AC_FUNC_ERROR_AT_LINE' => 1,
|
||||
'AC_PROG_GCC_TRADITIONAL' => 1,
|
||||
'AC_LIBSOURCE' => 1,
|
||||
'AC_FUNC_MBRTOWC' => 1,
|
||||
'AC_STRUCT_ST_BLOCKS' => 1,
|
||||
'AC_CANONICAL_BUILD' => 1,
|
||||
'AC_TYPE_SIGNAL' => 1,
|
||||
'AC_TYPE_UID_T' => 1,
|
||||
'AC_PROG_MAKE_SET' => 1,
|
||||
'AC_CONFIG_AUX_DIR' => 1,
|
||||
'm4_pattern_allow' => 1,
|
||||
'sinclude' => 1,
|
||||
'AC_DEFINE_TRACE_LITERAL' => 1,
|
||||
'AC_FUNC_STRERROR_R' => 1,
|
||||
'AC_PROG_CC' => 1,
|
||||
'AC_DECL_SYS_SIGLIST' => 1,
|
||||
'AC_FUNC_FORK' => 1,
|
||||
'AC_FUNC_STRCOLL' => 1,
|
||||
'AC_FUNC_VPRINTF' => 1,
|
||||
'AC_PROG_YACC' => 1,
|
||||
'AC_INIT' => 1,
|
||||
'AC_STRUCT_TIMEZONE' => 1,
|
||||
'AC_FUNC_CHOWN' => 1,
|
||||
'AC_SUBST' => 1,
|
||||
'AC_FUNC_ALLOCA' => 1,
|
||||
'AC_CANONICAL_HOST' => 1,
|
||||
'AC_FUNC_GETPGRP' => 1,
|
||||
'AC_PROG_RANLIB' => 1,
|
||||
'AM_INIT_AUTOMAKE' => 1,
|
||||
'AC_FUNC_SETPGRP' => 1,
|
||||
'AC_CONFIG_SUBDIRS' => 1,
|
||||
'AC_FUNC_MMAP' => 1,
|
||||
'AC_FUNC_REALLOC' => 1,
|
||||
'AC_TYPE_SIZE_T' => 1,
|
||||
'AC_CONFIG_LINKS' => 1,
|
||||
'AC_CHECK_TYPES' => 1,
|
||||
'LT_SUPPORTED_TAG' => 1,
|
||||
'AC_CHECK_MEMBERS' => 1,
|
||||
'AM_MAINTAINER_MODE' => 1,
|
||||
'AC_FUNC_UTIME_NULL' => 1,
|
||||
'AC_FUNC_SELECT_ARGTYPES' => 1,
|
||||
'AC_HEADER_STAT' => 1,
|
||||
'AC_FUNC_STRFTIME' => 1,
|
||||
'AC_PROG_CPP' => 1,
|
||||
'AC_C_INLINE' => 1,
|
||||
'AM_ENABLE_MULTILIB' => 1,
|
||||
'AC_PROG_LEX' => 1,
|
||||
'AC_C_CONST' => 1,
|
||||
'AC_TYPE_PID_T' => 1,
|
||||
'AC_CONFIG_FILES' => 1,
|
||||
'include' => 1,
|
||||
'AC_FUNC_SETVBUF_REVERSED' => 1,
|
||||
'AC_PROG_INSTALL' => 1,
|
||||
'AM_GNU_GETTEXT' => 1,
|
||||
'AC_CHECK_LIB' => 1,
|
||||
'AC_FUNC_OBSTACK' => 1,
|
||||
'AC_FUNC_MALLOC' => 1,
|
||||
'AC_FUNC_GETGROUPS' => 1,
|
||||
'AC_FUNC_GETLOADAVG' => 1,
|
||||
'AH_OUTPUT' => 1,
|
||||
'AC_FUNC_FSEEKO' => 1,
|
||||
'AM_PROG_CC_C_O' => 1,
|
||||
'AC_FUNC_MKTIME' => 1,
|
||||
'AC_CANONICAL_SYSTEM' => 1,
|
||||
'AM_CONDITIONAL' => 1,
|
||||
'AC_CONFIG_HEADERS' => 1,
|
||||
'AC_HEADER_SYS_WAIT' => 1,
|
||||
'AC_PROG_LN_S' => 1,
|
||||
'AC_FUNC_MEMCMP' => 1,
|
||||
'm4_include' => 1,
|
||||
'AC_HEADER_DIRENT' => 1,
|
||||
'AC_CHECK_FUNCS' => 1
|
||||
}
|
||||
], 'Autom4te::Request' )
|
||||
);
|
||||
|
||||
70
autom4te.cache/traces.0
Normal file
70
autom4te.cache/traces.0
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
m4trace:configure.in:5: -1- AC_INIT([dhcpd-pools], [2.0], [kerolasa@iki.fi])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:9: -1- AC_PROG_CC
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:11: -1- AC_CONFIG_FILES([Makefile])
|
||||
m4trace:configure.in:12: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:12: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
751
autom4te.cache/traces.1
Normal file
751
autom4te.cache/traces.1
Normal file
|
|
@ -0,0 +1,751 @@
|
|||
m4trace:/usr/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
m4trace:/usr/share/aclocal-1.9/amversion.m4:20: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
m4trace:/usr/share/aclocal-1.9/auxdir.m4:52: -1- 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`
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/cond.m4:32: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:131: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:141: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:156: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:53: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:67: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:92: -1- 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
|
||||
])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:113: -1- 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])
|
||||
m4trace:/usr/share/aclocal-1.9/install-sh.m4:14: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/lead-dot.m4:21: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/make.m4:51: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:17: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:34: -1- 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
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/mkdirp.m4:63: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
m4trace:/usr/share/aclocal-1.9/runlog.m4:17: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
m4trace:/usr/share/aclocal-1.9/sanity.m4:51: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/strip.m4:28: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/tar.m4:95: -1- 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 <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/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])
|
||||
])
|
||||
m4trace:configure.in:5: -1- AC_INIT([dhcpd-pools], [2.0], [kerolasa@iki.fi])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:7: -1- AM_INIT_AUTOMAKE([1.9 foreign])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:7: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
m4trace:configure.in:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.in:7: -1- AC_PROG_INSTALL
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTIONS([1.9 foreign])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTION([1.9])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([1.9])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTION([foreign])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([foreign])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-define])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.in:7: -1- AM_SANITY_CHECK
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_HAS_RUN
|
||||
m4trace:configure.in:7: -1- AM_AUX_DIR_EXPAND
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_SH
|
||||
m4trace:configure.in:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_STRIP
|
||||
m4trace:configure.in:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ac_ct_STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AM_PROG_MKDIR_P
|
||||
m4trace:configure.in:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.in:7: -1- AC_PROG_AWK
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.in:7: -1- AC_PROG_MAKE_SET
|
||||
m4trace:configure.in:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.in:7: -1- AM_SET_LEADING_DOT
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-ustar])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-pax])
|
||||
m4trace:configure.in:7: -1- _AM_PROG_TAR([v7])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.in:7: -1- _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
|
||||
])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-dependencies])
|
||||
m4trace:configure.in:9: -1- AC_PROG_CC
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:9: -1- _AM_DEPENDENCIES([CC])
|
||||
m4trace:configure.in:9: -1- AM_SET_DEPDIR
|
||||
m4trace:configure.in:9: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.in:9: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
m4trace:configure.in:9: -1- AM_MAKE_INCLUDE
|
||||
m4trace:configure.in:9: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.in:9: -1- AM_DEP_TRACK
|
||||
m4trace:configure.in:9: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.in:9: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:9: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:19: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
|
||||
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
|
||||
configure.in:19: the top level])
|
||||
m4trace:configure.in:25: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
|
||||
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
|
||||
configure.in:25: the top level])
|
||||
m4trace:configure.in:31: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
|
||||
You should run autoupdate.], [autoconf/general.m4:219: AC_HELP_STRING is expanded from...
|
||||
configure.in:31: the top level])
|
||||
m4trace:configure.in:37: -1- AC_SUBST([dhcpdconffile])
|
||||
m4trace:configure.in:38: -1- AC_SUBST([dhcpdleasesfile])
|
||||
m4trace:configure.in:39: -1- AC_SUBST([outputformat])
|
||||
m4trace:configure.in:41: -1- AC_CHECK_FUNCS([getopt_long inet_aton inet_addr], [break])
|
||||
m4trace:configure.in:41: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* Define to 1 if you have the `getopt_long\' function. */
|
||||
#undef HAVE_GETOPT_LONG])
|
||||
m4trace:configure.in:41: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the `inet_aton\' function. */
|
||||
#undef HAVE_INET_ATON])
|
||||
m4trace:configure.in:41: -1- AH_OUTPUT([HAVE_INET_ADDR], [/* Define to 1 if you have the `inet_addr\' function. */
|
||||
#undef HAVE_INET_ADDR])
|
||||
m4trace:configure.in:43: -1- AC_CHECK_LIB([resolv], [inet_ntoa])
|
||||
m4trace:configure.in:43: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:43: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:46: -1- AC_CHECK_HEADERS([arpa/inet.h errno.h netinet/in.h stdio.h \
|
||||
stdlib.h string.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:46: -1- AC_HEADER_STDC
|
||||
m4trace:configure.in:46: -1- AC_PROG_CPP
|
||||
m4trace:configure.in:46: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:46: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:46: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:46: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:46: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.in:46: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:46: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:49: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_H])
|
||||
m4trace:configure.in:50: -1- AC_CHECK_HEADERS([getopt.h], [cat >>confdefs.h <<\_ACEOF
|
||||
@%:@define HAVE_GETOPT_H 1
|
||||
_ACEOF
|
||||
], [import_sources="getopt.c getopt1.c $import_sources"])
|
||||
m4trace:configure.in:50: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H])
|
||||
m4trace:configure.in:53: -1- AC_FUNC_ALLOCA
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
|
||||
#undef HAVE_ALLOCA])
|
||||
m4trace:configure.in:53: -1- AC_LIBSOURCE([alloca.c])
|
||||
m4trace:configure.in:53: -1- AC_SUBST([ALLOCA], [alloca.$ac_objext])
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
|
||||
#undef C_ALLOCA])
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c\' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
|
||||
m4trace:configure.in:56: -1- AC_SUBST([PERL])
|
||||
m4trace:configure.in:58: -1- AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
m4trace:configure.in:60: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:60: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.in:60: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
221
autom4te.cache/traces.2
Normal file
221
autom4te.cache/traces.2
Normal file
|
|
@ -0,0 +1,221 @@
|
|||
m4trace:configure.in:5: -1- AC_INIT([dhcpd-pools], [2.3], [kerolasa@iki.fi])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:7: -1- AM_INIT_AUTOMAKE([1.9 foreign])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.in:7: -1- AC_PROG_INSTALL
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ac_ct_STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.in:7: -1- AC_PROG_AWK
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.in:7: -1- AC_PROG_MAKE_SET
|
||||
m4trace:configure.in:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.in:9: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete.
|
||||
You should run autoupdate.], [aclocal.m4:353: AM_CONFIG_HEADER is expanded from...
|
||||
configure.in:9: the top level])
|
||||
m4trace:configure.in:9: -1- AC_CONFIG_HEADERS([config.h])
|
||||
m4trace:configure.in:10: -1- AC_PROG_CC
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.in:10: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.in:10: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:25: -1- AC_SUBST([dhcpd_conf])
|
||||
m4trace:configure.in:33: -1- AC_SUBST([dhcpd_leases])
|
||||
m4trace:configure.in:41: -1- AC_SUBST([output_format])
|
||||
m4trace:configure.in:49: -1- AC_SUBST([output_limit])
|
||||
m4trace:configure.in:51: -1- AC_CHECK_FUNCS([getopt_long inet_aton inet_addr], [break])
|
||||
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* Define to 1 if you have the `getopt_long\' function. */
|
||||
#undef HAVE_GETOPT_LONG])
|
||||
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the `inet_aton\' function. */
|
||||
#undef HAVE_INET_ATON])
|
||||
m4trace:configure.in:51: -1- AH_OUTPUT([HAVE_INET_ADDR], [/* Define to 1 if you have the `inet_addr\' function. */
|
||||
#undef HAVE_INET_ADDR])
|
||||
m4trace:configure.in:53: -1- AC_CHECK_LIB([resolv], [inet_ntoa])
|
||||
m4trace:configure.in:53: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:53: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:56: -1- AC_CHECK_HEADERS([arpa/inet.h errno.h netinet/in.h stdio.h \
|
||||
stdlib.h string.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:56: -1- AC_HEADER_STDC
|
||||
m4trace:configure.in:56: -1- AC_PROG_CPP
|
||||
m4trace:configure.in:56: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:56: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:56: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:56: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:56: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.in:56: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:56: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:59: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_H])
|
||||
m4trace:configure.in:60: -1- AC_CHECK_HEADERS([getopt.h], [cat >>confdefs.h <<\_ACEOF
|
||||
@%:@define HAVE_GETOPT_H 1
|
||||
_ACEOF
|
||||
], [import_sources="getopt.c getopt1.c $import_sources"])
|
||||
m4trace:configure.in:60: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H])
|
||||
m4trace:configure.in:63: -1- AC_FUNC_ALLOCA
|
||||
m4trace:configure.in:63: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:63: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:63: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
|
||||
m4trace:configure.in:63: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
|
||||
#undef HAVE_ALLOCA])
|
||||
m4trace:configure.in:63: -1- AC_LIBSOURCE([alloca.c])
|
||||
m4trace:configure.in:63: -1- AC_SUBST([ALLOCA], [alloca.$ac_objext])
|
||||
m4trace:configure.in:63: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
|
||||
m4trace:configure.in:63: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
|
||||
#undef C_ALLOCA])
|
||||
m4trace:configure.in:63: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:63: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c\' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:63: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])
|
||||
m4trace:configure.in:63: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
|
||||
m4trace:configure.in:66: -1- AC_SUBST([PERL])
|
||||
m4trace:configure.in:68: -1- AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
m4trace:configure.in:70: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:70: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
752
autom4te.cache/traces.3
Normal file
752
autom4te.cache/traces.3
Normal file
|
|
@ -0,0 +1,752 @@
|
|||
m4trace:/usr/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
m4trace:/usr/share/aclocal-1.9/amversion.m4:20: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
m4trace:/usr/share/aclocal-1.9/auxdir.m4:52: -1- 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`
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/cond.m4:32: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:131: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:141: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:156: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:53: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:67: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/header.m4:12: -1- AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
|
||||
m4trace:/usr/share/aclocal-1.9/header.m4:12: -1- AC_DEFUN([AM_CONFIG_HEADER], [AC_DIAGNOSE([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete.
|
||||
You should run autoupdate.])dnl
|
||||
AC_CONFIG_HEADERS($@)])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:92: -1- 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
|
||||
])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:113: -1- 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])
|
||||
m4trace:/usr/share/aclocal-1.9/install-sh.m4:14: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/lead-dot.m4:21: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/make.m4:51: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:17: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:34: -1- 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
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/mkdirp.m4:63: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
m4trace:/usr/share/aclocal-1.9/runlog.m4:17: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
m4trace:/usr/share/aclocal-1.9/sanity.m4:51: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/strip.m4:28: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/tar.m4:95: -1- 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 <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/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])
|
||||
])
|
||||
m4trace:configure.in:5: -1- AC_INIT([dhcpd-pools], [2.1], [kerolasa@iki.fi])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.in:5: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.in:5: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.in:5: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.in:5: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.in:7: -1- AM_INIT_AUTOMAKE([1.9 foreign])
|
||||
m4trace:configure.in:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.in:7: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
m4trace:configure.in:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.in:7: -1- AC_PROG_INSTALL
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTIONS([1.9 foreign])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTION([1.9])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([1.9])
|
||||
m4trace:configure.in:7: -1- _AM_SET_OPTION([foreign])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([foreign])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-define])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.in:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.in:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.in:7: -1- AM_SANITY_CHECK
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_HAS_RUN
|
||||
m4trace:configure.in:7: -1- AM_AUX_DIR_EXPAND
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_SH
|
||||
m4trace:configure.in:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.in:7: -1- AM_PROG_INSTALL_STRIP
|
||||
m4trace:configure.in:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([ac_ct_STRIP])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.in:7: -1- AM_PROG_MKDIR_P
|
||||
m4trace:configure.in:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.in:7: -1- AC_PROG_AWK
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.in:7: -1- AC_PROG_MAKE_SET
|
||||
m4trace:configure.in:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.in:7: -1- AM_SET_LEADING_DOT
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-ustar])
|
||||
m4trace:configure.in:7: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([tar-pax])
|
||||
m4trace:configure.in:7: -1- _AM_PROG_TAR([v7])
|
||||
m4trace:configure.in:7: -1- AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.in:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.in:7: -1- _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
|
||||
])
|
||||
m4trace:configure.in:7: -2- _AM_MANGLE_OPTION([no-dependencies])
|
||||
m4trace:configure.in:9: -1- AM_CONFIG_HEADER([config.h])
|
||||
m4trace:configure.in:9: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete.
|
||||
You should run autoupdate.], [/usr/share/aclocal-1.9/header.m4:12: AM_CONFIG_HEADER is expanded from...
|
||||
configure.in:9: the top level])
|
||||
m4trace:configure.in:9: -1- AC_CONFIG_HEADERS([config.h])
|
||||
m4trace:configure.in:10: -1- AC_PROG_CC
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.in:10: -1- _AM_DEPENDENCIES([CC])
|
||||
m4trace:configure.in:10: -1- AM_SET_DEPDIR
|
||||
m4trace:configure.in:10: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.in:10: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
m4trace:configure.in:10: -1- AM_MAKE_INCLUDE
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.in:10: -1- AM_DEP_TRACK
|
||||
m4trace:configure.in:10: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.in:10: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.in:10: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.in:25: -1- AC_SUBST([dhcpd_conf])
|
||||
m4trace:configure.in:33: -1- AC_SUBST([dhcpd_leases])
|
||||
m4trace:configure.in:41: -1- AC_SUBST([output_format])
|
||||
m4trace:configure.in:43: -1- AC_CHECK_FUNCS([getopt_long inet_aton inet_addr], [break])
|
||||
m4trace:configure.in:43: -1- AH_OUTPUT([HAVE_GETOPT_LONG], [/* Define to 1 if you have the `getopt_long\' function. */
|
||||
#undef HAVE_GETOPT_LONG])
|
||||
m4trace:configure.in:43: -1- AH_OUTPUT([HAVE_INET_ATON], [/* Define to 1 if you have the `inet_aton\' function. */
|
||||
#undef HAVE_INET_ATON])
|
||||
m4trace:configure.in:43: -1- AH_OUTPUT([HAVE_INET_ADDR], [/* Define to 1 if you have the `inet_addr\' function. */
|
||||
#undef HAVE_INET_ADDR])
|
||||
m4trace:configure.in:45: -1- AC_CHECK_LIB([resolv], [inet_ntoa])
|
||||
m4trace:configure.in:45: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:45: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV])
|
||||
m4trace:configure.in:48: -1- AC_CHECK_HEADERS([arpa/inet.h errno.h netinet/in.h stdio.h \
|
||||
stdlib.h string.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:48: -1- AC_HEADER_STDC
|
||||
m4trace:configure.in:48: -1- AC_PROG_CPP
|
||||
m4trace:configure.in:48: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:48: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.in:48: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.in:48: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.in:48: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.in:48: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.in:48: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.in:51: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_H])
|
||||
m4trace:configure.in:52: -1- AC_CHECK_HEADERS([getopt.h], [cat >>confdefs.h <<\_ACEOF
|
||||
@%:@define HAVE_GETOPT_H 1
|
||||
_ACEOF
|
||||
], [import_sources="getopt.c getopt1.c $import_sources"])
|
||||
m4trace:configure.in:52: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H])
|
||||
m4trace:configure.in:55: -1- AC_FUNC_ALLOCA
|
||||
m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:55: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H])
|
||||
m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
|
||||
m4trace:configure.in:55: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
|
||||
#undef HAVE_ALLOCA])
|
||||
m4trace:configure.in:55: -1- AC_LIBSOURCE([alloca.c])
|
||||
m4trace:configure.in:55: -1- AC_SUBST([ALLOCA], [alloca.$ac_objext])
|
||||
m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
|
||||
m4trace:configure.in:55: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
|
||||
#undef C_ALLOCA])
|
||||
m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:55: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c\' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END])
|
||||
m4trace:configure.in:55: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])
|
||||
m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
|
||||
m4trace:configure.in:58: -1- AC_SUBST([PERL])
|
||||
m4trace:configure.in:60: -1- AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
m4trace:configure.in:62: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.in:62: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.in:62: -1- _AC_AM_CONFIG_HEADER_HOOK([$ac_file])
|
||||
m4trace:configure.in:62: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
721
autom4te.cache/traces.4
Normal file
721
autom4te.cache/traces.4
Normal file
|
|
@ -0,0 +1,721 @@
|
|||
m4trace:/usr/share/aclocal-1.9/amversion.m4:13: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
m4trace:/usr/share/aclocal-1.9/amversion.m4:20: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
m4trace:/usr/share/aclocal-1.9/auxdir.m4:52: -1- 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`
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/cond.m4:32: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:131: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
|
||||
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
|
||||
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
|
||||
AC_REQUIRE([AM_DEP_TRACK])dnl
|
||||
|
||||
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
|
||||
[$1], CXX, [depcc="$CXX" am_compiler_list=],
|
||||
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
|
||||
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
|
||||
[depcc="$$1" am_compiler_list=])
|
||||
|
||||
AC_CACHE_CHECK([dependency style of $depcc],
|
||||
[am_cv_$1_dependencies_compiler_type],
|
||||
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
|
||||
# We make a subdir and do the tests there. Otherwise we can end up
|
||||
# making bogus files that we don't know about and never remove. For
|
||||
# instance it was reported that on HP-UX the gcc test will end up
|
||||
# making a dummy file named `D' -- because `-MD' means `put the output
|
||||
# in D'.
|
||||
mkdir conftest.dir
|
||||
# Copy depcomp to subdir because otherwise we won't find it if we're
|
||||
# using a relative directory.
|
||||
cp "$am_depcomp" conftest.dir
|
||||
cd conftest.dir
|
||||
# We will build objects and dependencies in a subdirectory because
|
||||
# it helps to detect inapplicable dependency modes. For instance
|
||||
# both Tru64's cc and ICC support -MD to output dependencies as a
|
||||
# side effect of compilation, but ICC will put the dependencies in
|
||||
# the current directory while Tru64 will put them in the object
|
||||
# directory.
|
||||
mkdir sub
|
||||
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
if test "$am_compiler_list" = ""; then
|
||||
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
|
||||
fi
|
||||
for depmode in $am_compiler_list; do
|
||||
# Setup a source with many dependencies, because some compilers
|
||||
# like to wrap large dependency lists on column 80 (with \), and
|
||||
# we should not choose a depcomp mode which is confused by this.
|
||||
#
|
||||
# We need to recreate these files for each test, as the compiler may
|
||||
# overwrite some of them when testing with obscure command lines.
|
||||
# This happens at least with the AIX C compiler.
|
||||
: > sub/conftest.c
|
||||
for i in 1 2 3 4 5 6; do
|
||||
echo '#include "conftst'$i'.h"' >> sub/conftest.c
|
||||
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
|
||||
# Solaris 8's {/usr,}/bin/sh.
|
||||
touch sub/conftst$i.h
|
||||
done
|
||||
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
|
||||
|
||||
case $depmode in
|
||||
nosideeffect)
|
||||
# after this tag, mechanisms are not by side-effect, so they'll
|
||||
# only be used when explicitly requested
|
||||
if test "x$enable_dependency_tracking" = xyes; then
|
||||
continue
|
||||
else
|
||||
break
|
||||
fi
|
||||
;;
|
||||
none) break ;;
|
||||
esac
|
||||
# We check with `-c' and `-o' for the sake of the "dashmstdout"
|
||||
# mode. It turns out that the SunPro C++ compiler does not properly
|
||||
# handle `-M -o', and we need to detect this.
|
||||
if depmode=$depmode \
|
||||
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
|
||||
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
|
||||
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
|
||||
>/dev/null 2>conftest.err &&
|
||||
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
|
||||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
am_cv_$1_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
cd ..
|
||||
rm -rf conftest.dir
|
||||
else
|
||||
am_cv_$1_dependencies_compiler_type=none
|
||||
fi
|
||||
])
|
||||
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
|
||||
AM_CONDITIONAL([am__fastdep$1], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:141: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
|
||||
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depend.m4:156: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
|
||||
[ --disable-dependency-tracking speeds up one-time build
|
||||
--enable-dependency-tracking do not reject slow dependency extractors])
|
||||
if test "x$enable_dependency_tracking" != xno; then
|
||||
am_depcomp="$ac_aux_dir/depcomp"
|
||||
AMDEPBACKSLASH='\'
|
||||
fi
|
||||
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
AC_SUBST([AMDEPBACKSLASH])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:53: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do
|
||||
# Strip MF so we end up with the name of the file.
|
||||
mf=`echo "$mf" | sed -e 's/:.*$//'`
|
||||
# Check whether this is an Automake generated Makefile or not.
|
||||
# We used to match only the files named `Makefile.in', but
|
||||
# some people rename them; so instead we look at the file content.
|
||||
# Grep'ing the first line is not enough: some people post-process
|
||||
# each Makefile.in and add a new line on top of each file to say so.
|
||||
# So let's grep whole file.
|
||||
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
|
||||
dirpart=`AS_DIRNAME("$mf")`
|
||||
else
|
||||
continue
|
||||
fi
|
||||
# Extract the definition of DEPDIR, am__include, and am__quote
|
||||
# from the Makefile without running `make'.
|
||||
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
|
||||
test -z "$DEPDIR" && continue
|
||||
am__include=`sed -n 's/^am__include = //p' < "$mf"`
|
||||
test -z "am__include" && continue
|
||||
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
|
||||
# When using ansi2knr, U may be empty or an underscore; expand it
|
||||
U=`sed -n 's/^U = //p' < "$mf"`
|
||||
# Find all dependency output files, they are included files with
|
||||
# $(DEPDIR) in their names. We invoke sed twice because it is the
|
||||
# simplest approach to changing $(DEPDIR) to its actual value in the
|
||||
# expansion.
|
||||
for file in `sed -n "
|
||||
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
|
||||
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
|
||||
# Make sure the directory exists.
|
||||
test -f "$dirpart/$file" && continue
|
||||
fdir=`AS_DIRNAME(["$file"])`
|
||||
AS_MKDIR_P([$dirpart/$fdir])
|
||||
# echo "creating $dirpart/$file"
|
||||
echo '# dummy' > "$dirpart/$file"
|
||||
done
|
||||
done
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/depout.m4:67: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
|
||||
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
|
||||
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:92: -1- 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
|
||||
])
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/init.m4:113: -1- 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])
|
||||
m4trace:/usr/share/aclocal-1.9/install-sh.m4:14: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/lead-dot.m4:21: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/make.m4:51: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
|
||||
cat > confinc << 'END'
|
||||
am__doit:
|
||||
@echo done
|
||||
.PHONY: am__doit
|
||||
END
|
||||
# If we don't find an include directive, just comment out the code.
|
||||
AC_MSG_CHECKING([for style of include used by $am_make])
|
||||
am__include="#"
|
||||
am__quote=
|
||||
_am_result=none
|
||||
# First try GNU make style include.
|
||||
echo "include confinc" > confmf
|
||||
# We grep out `Entering directory' and `Leaving directory'
|
||||
# messages which can occur if `w' ends up in MAKEFLAGS.
|
||||
# In particular we don't look at `^make:' because GNU make might
|
||||
# be invoked under some other name (usually "gmake"), in which
|
||||
# case it prints its new name instead of `make'.
|
||||
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
|
||||
am__include=include
|
||||
am__quote=
|
||||
_am_result=GNU
|
||||
fi
|
||||
# Now try BSD make style include.
|
||||
if test "$am__include" = "#"; then
|
||||
echo '.include "confinc"' > confmf
|
||||
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
|
||||
am__include=.include
|
||||
am__quote="\""
|
||||
_am_result=BSD
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([am__include])
|
||||
AC_SUBST([am__quote])
|
||||
AC_MSG_RESULT([$_am_result])
|
||||
rm -f confinc confmf
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:17: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
|
||||
$1=${$1-"${am_missing_run}$2"}
|
||||
AC_SUBST($1)])
|
||||
m4trace:/usr/share/aclocal-1.9/missing.m4:34: -1- 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
|
||||
])
|
||||
m4trace:/usr/share/aclocal-1.9/mkdirp.m4:63: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:14: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:20: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:26: -1- AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
|
||||
m4trace:/usr/share/aclocal-1.9/options.m4:32: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
|
||||
m4trace:/usr/share/aclocal-1.9/runlog.m4:17: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
|
||||
($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
|
||||
(exit $ac_status); }])
|
||||
m4trace:/usr/share/aclocal-1.9/sanity.m4:51: -1- 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)])
|
||||
m4trace:/usr/share/aclocal-1.9/strip.m4:28: -1- 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])])
|
||||
m4trace:/usr/share/aclocal-1.9/tar.m4:95: -1- 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 <conftest.tar])
|
||||
grep GrepMe conftest.dir/file >/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])
|
||||
])
|
||||
m4trace:configure.ac:2: -1- AC_INIT([dhcpd-pools], [2.1], [kerolasa@iki.fi])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([ke_PRE], [2.1.0])
|
||||
m4trace:configure.ac:7: -1- AM_INIT_AUTOMAKE
|
||||
m4trace:configure.ac:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.ac:7: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
m4trace:configure.ac:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_INSTALL
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.ac:7: -1- _AM_SET_OPTIONS([])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.ac:7: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
|
||||
m4trace:configure.ac:7: -2- _AM_MANGLE_OPTION([no-define])
|
||||
m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.ac:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.ac:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.ac:7: -1- AM_SANITY_CHECK
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_HAS_RUN
|
||||
m4trace:configure.ac:7: -1- AM_AUX_DIR_EXPAND
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.ac:7: -1- AM_PROG_INSTALL_SH
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.ac:7: -1- AM_PROG_INSTALL_STRIP
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_STRIP])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.ac:7: -1- AM_PROG_MKDIR_P
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_AWK
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_MAKE_SET
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.ac:7: -1- AM_SET_LEADING_DOT
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.ac:7: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
|
||||
[_AM_PROG_TAR([v7])])])
|
||||
m4trace:configure.ac:7: -2- _AM_MANGLE_OPTION([tar-ustar])
|
||||
m4trace:configure.ac:7: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
|
||||
m4trace:configure.ac:7: -2- _AM_MANGLE_OPTION([tar-pax])
|
||||
m4trace:configure.ac:7: -1- _AM_PROG_TAR([v7])
|
||||
m4trace:configure.ac:7: -1- AM_MISSING_PROG([AMTAR], [tar])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.ac:7: -1- _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
|
||||
])
|
||||
m4trace:configure.ac:7: -2- _AM_MANGLE_OPTION([no-dependencies])
|
||||
m4trace:configure.ac:12: -1- AC_PROG_CC
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.ac:12: -1- _AM_DEPENDENCIES([CC])
|
||||
m4trace:configure.ac:12: -1- AM_SET_DEPDIR
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.ac:12: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
m4trace:configure.ac:12: -1- AM_MAKE_INCLUDE
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.ac:12: -1- AM_DEP_TRACK
|
||||
m4trace:configure.ac:12: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.ac:12: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.ac:21: -1- AC_HEADER_STDC([])
|
||||
m4trace:configure.ac:21: -1- AC_PROG_CPP
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.ac:21: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.ac:21: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([arpa/inet.h errno.h getopt.h netinet/in.h stdio.h stdlib.h string.h strings.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:25: -1- AC_FUNC_ALLOCA
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
|
||||
#undef HAVE_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AC_LIBSOURCE([alloca.c])
|
||||
m4trace:configure.ac:25: -1- AC_SUBST([ALLOCA], [alloca.$ac_objext])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
|
||||
#undef C_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c\' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
|
||||
m4trace:configure.ac:42: -1- AC_SUBST([PERL])
|
||||
m4trace:configure.ac:44: -1- AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
m4trace:configure.ac:46: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.ac:46: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
m4trace:configure.ac:46: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
|
||||
199
autom4te.cache/traces.5
Normal file
199
autom4te.cache/traces.5
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
m4trace:configure.ac:2: -1- AC_INIT([dhcpd-pools], [2.1], [kerolasa@iki.fi])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
|
||||
m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([SHELL], [${CONFIG_SHELL-/bin/sh}])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${prefix}/share'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${prefix}/info'])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${prefix}/man'])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING])
|
||||
m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
|
||||
m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
|
||||
m4trace:configure.ac:6: -1- AC_SUBST([ke_PRE], [2.1.0])
|
||||
m4trace:configure.ac:7: -1- AM_INIT_AUTOMAKE
|
||||
m4trace:configure.ac:7: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
|
||||
m4trace:configure.ac:7: -1- AM_AUTOMAKE_VERSION([1.9.6])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_INSTALL
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_PROGRAM])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_SCRIPT])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_DATA])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([CYGPATH_W])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
|
||||
m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
|
||||
m4trace:configure.ac:7: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
|
||||
#undef PACKAGE])
|
||||
m4trace:configure.ac:7: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
|
||||
m4trace:configure.ac:7: -1- AH_OUTPUT([VERSION], [/* Version number of package */
|
||||
#undef VERSION])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([ACLOCAL])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOCONF])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOMAKE])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AUTOHEADER])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([MAKEINFO])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([install_sh])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([STRIP])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([ac_ct_STRIP])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([mkdir_p])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_AWK
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AWK])
|
||||
m4trace:configure.ac:7: -1- AC_PROG_MAKE_SET
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([SET_MAKE])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__leading_dot])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([AMTAR])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__tar])
|
||||
m4trace:configure.ac:7: -1- AC_SUBST([am__untar])
|
||||
m4trace:configure.ac:12: -1- AC_PROG_CC
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([LDFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([ac_ct_CC])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__include])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__quote])
|
||||
m4trace:configure.ac:12: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEP_TRUE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEP_FALSE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([AMDEPBACKSLASH])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
|
||||
m4trace:configure.ac:12: -1- AM_CONDITIONAL([am__fastdepCC], [
|
||||
test "x$enable_dependency_tracking" != xno \
|
||||
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_TRUE])
|
||||
m4trace:configure.ac:12: -1- AC_SUBST([am__fastdepCC_FALSE])
|
||||
m4trace:configure.ac:21: -1- AC_HEADER_STDC([])
|
||||
m4trace:configure.ac:21: -1- AC_PROG_CPP
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPPFLAGS])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([CPP])
|
||||
m4trace:configure.ac:21: -1- AC_SUBST([EGREP])
|
||||
m4trace:configure.ac:21: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
|
||||
m4trace:configure.ac:21: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS])
|
||||
m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([arpa/inet.h errno.h getopt.h netinet/in.h stdio.h stdlib.h string.h strings.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:22: -1- AC_CHECK_HEADERS([sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
|
||||
inttypes.h stdint.h unistd.h], [], [], [$ac_includes_default])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H])
|
||||
m4trace:configure.ac:22: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H])
|
||||
m4trace:configure.ac:25: -1- AC_FUNC_ALLOCA
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
|
||||
#undef HAVE_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AC_LIBSOURCE([alloca.c])
|
||||
m4trace:configure.ac:25: -1- AC_SUBST([ALLOCA], [alloca.$ac_objext])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
|
||||
#undef C_ALLOCA])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c\' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END])
|
||||
m4trace:configure.ac:25: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
@%:@undef STACK_DIRECTION])
|
||||
m4trace:configure.ac:25: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
|
||||
m4trace:configure.ac:42: -1- AC_SUBST([PERL])
|
||||
m4trace:configure.ac:44: -1- AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
m4trace:configure.ac:46: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
|
||||
m4trace:configure.ac:46: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
|
||||
|
|
@ -1,93 +0,0 @@
|
|||
# Bootstrap configuration. -*- sh -*-
|
||||
|
||||
# Copyright (C) 2006-2025 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules="
|
||||
close-stream
|
||||
closeout
|
||||
error
|
||||
fclose
|
||||
fcntl-h
|
||||
fdopen
|
||||
fflush
|
||||
fopen
|
||||
getopt-gnu
|
||||
inet_pton
|
||||
isnan
|
||||
netinet_in
|
||||
nstrftime
|
||||
progname
|
||||
quote
|
||||
realloc-gnu
|
||||
stat
|
||||
stddef
|
||||
stdio
|
||||
stdlib
|
||||
stpncpy
|
||||
strdup-posix
|
||||
strstr
|
||||
strtod
|
||||
time_r
|
||||
xalloc
|
||||
"
|
||||
|
||||
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
||||
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
||||
--from-code=UTF-8\\\
|
||||
--flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\
|
||||
--flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
|
||||
--flag=wrapf:1:c-format\\\
|
||||
'
|
||||
|
||||
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
|
||||
# appears in configure.ac, exclude some unnecessary files.
|
||||
# Without grep's -E option (not portable enough, pre-configure),
|
||||
# the following test is ugly. Also, this depends on the existence
|
||||
# of configure.ac, not the obsolescent-named configure.in. But if
|
||||
# you're using this infrastructure, you should care about such things.
|
||||
|
||||
gettext_external=0
|
||||
grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
grep '^[ ]*AM_GNU_GETTEXT(\[external]' configure.ac > /dev/null &&
|
||||
gettext_external=1
|
||||
|
||||
if test $gettext_external = 1; then
|
||||
# Gettext supplies these files, but we don't need them since
|
||||
# we don't have an intl subdirectory.
|
||||
excluded_files='
|
||||
m4/glibc2.m4
|
||||
m4/intdiv0.m4
|
||||
m4/lcmessage.m4
|
||||
m4/lock.m4
|
||||
m4/printf-posix.m4
|
||||
m4/size_max.m4
|
||||
m4/uintmax_t.m4
|
||||
m4/ulonglong.m4
|
||||
m4/visibility.m4
|
||||
m4/xsize.m4
|
||||
'
|
||||
fi
|
||||
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.59
|
||||
automake 1.9.6
|
||||
git 1.5.5
|
||||
tar -
|
||||
"
|
||||
12
build-aux/.gitignore
vendored
12
build-aux/.gitignore
vendored
|
|
@ -1,12 +0,0 @@
|
|||
/ar-lib
|
||||
/compile
|
||||
/config.guess
|
||||
/config.rpath
|
||||
/config.sub
|
||||
/depcomp
|
||||
/install-sh
|
||||
/ltmain.sh
|
||||
/mdate-sh
|
||||
/missing
|
||||
/test-driver
|
||||
/texinfo.tex
|
||||
|
|
@ -1,227 +0,0 @@
|
|||
#!/bin/sh
|
||||
# Print a version string.
|
||||
scriptversion=2022-01-27.18; # UTC
|
||||
|
||||
# Copyright (C) 2007-2022 Free Software Foundation, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
# This script is derived from GIT-VERSION-GEN from GIT: https://git-scm.com/.
|
||||
# It may be run two ways:
|
||||
# - from a git repository in which the "git describe" command below
|
||||
# produces useful output (thus requiring at least one signed tag)
|
||||
# - from a non-git-repo directory containing a .tarball-version file, which
|
||||
# presumes this script is invoked like "./git-version-gen .tarball-version".
|
||||
|
||||
# In order to use intra-version strings in your project, you will need two
|
||||
# separate generated version string files:
|
||||
#
|
||||
# .tarball-version - present only in a distribution tarball, and not in
|
||||
# a checked-out repository. Created with contents that were learned at
|
||||
# the last time autoconf was run, and used by git-version-gen. Must not
|
||||
# be present in either $(srcdir) or $(builddir) for git-version-gen to
|
||||
# give accurate answers during normal development with a checked out tree,
|
||||
# but must be present in a tarball when there is no version control system.
|
||||
# Therefore, it cannot be used in any dependencies. GNUmakefile has
|
||||
# hooks to force a reconfigure at distribution time to get the value
|
||||
# correct, without penalizing normal development with extra reconfigures.
|
||||
#
|
||||
# .version - present in a checked-out repository and in a distribution
|
||||
# tarball. Usable in dependencies, particularly for files that don't
|
||||
# want to depend on config.h but do want to track version changes.
|
||||
# Delete this file prior to any autoconf run where you want to rebuild
|
||||
# files to pick up a version string change; and leave it stale to
|
||||
# minimize rebuild time after unrelated changes to configure sources.
|
||||
#
|
||||
# As with any generated file in a VC'd directory, you should add
|
||||
# /.version to .gitignore, so that you don't accidentally commit it.
|
||||
# .tarball-version is never generated in a VC'd directory, so needn't
|
||||
# be listed there.
|
||||
#
|
||||
# Use the following line in your configure.ac, so that $(VERSION) will
|
||||
# automatically be up-to-date each time configure is run (and note that
|
||||
# since configure.ac no longer includes a version string, Makefile rules
|
||||
# should not depend on configure.ac for version updates).
|
||||
#
|
||||
# AC_INIT([GNU project],
|
||||
# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
||||
# [bug-project@example])
|
||||
#
|
||||
# Then use the following lines in your Makefile.am, so that .version
|
||||
# will be present for dependencies, and so that .version and
|
||||
# .tarball-version will exist in distribution tarballs.
|
||||
#
|
||||
# EXTRA_DIST = $(top_srcdir)/.version
|
||||
# BUILT_SOURCES = $(top_srcdir)/.version
|
||||
# $(top_srcdir)/.version:
|
||||
# echo '$(VERSION)' > $@-t
|
||||
# mv $@-t $@
|
||||
# dist-hook:
|
||||
# echo '$(VERSION)' > $(distdir)/.tarball-version
|
||||
|
||||
|
||||
me=$0
|
||||
|
||||
year=`expr "$scriptversion" : '\([^-]*\)'`
|
||||
version="git-version-gen $scriptversion
|
||||
|
||||
Copyright (C) ${year} Free Software Foundation, Inc.
|
||||
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
||||
This is free software: you are free to change and redistribute it.
|
||||
There is NO WARRANTY, to the extent permitted by law."
|
||||
|
||||
usage="\
|
||||
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
|
||||
Print a version string.
|
||||
|
||||
Options:
|
||||
|
||||
--prefix PREFIX prefix of git tags (default 'v')
|
||||
--fallback VERSION
|
||||
fallback version to use if \"git --version\" fails
|
||||
|
||||
--help display this help and exit
|
||||
--version output version information and exit
|
||||
|
||||
Running without arguments will suffice in most cases."
|
||||
|
||||
prefix=v
|
||||
fallback=
|
||||
|
||||
while test $# -gt 0; do
|
||||
case $1 in
|
||||
--help) echo "$usage"; exit 0;;
|
||||
--version) echo "$version"; exit 0;;
|
||||
--prefix) shift; prefix=${1?};;
|
||||
--fallback) shift; fallback=${1?};;
|
||||
-*)
|
||||
echo "$0: Unknown option '$1'." >&2
|
||||
echo "$0: Try '--help' for more information." >&2
|
||||
exit 1;;
|
||||
*)
|
||||
if test "x$tarball_version_file" = x; then
|
||||
tarball_version_file="$1"
|
||||
elif test "x$tag_sed_script" = x; then
|
||||
tag_sed_script="$1"
|
||||
else
|
||||
echo "$0: extra non-option argument '$1'." >&2
|
||||
exit 1
|
||||
fi;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test "x$tarball_version_file" = x; then
|
||||
echo "$usage"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
tag_sed_script="${tag_sed_script:-s/x/x/}"
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# Avoid meddling by environment variable of the same name.
|
||||
v=
|
||||
v_from_git=
|
||||
|
||||
# First see if there is a tarball-only version file.
|
||||
# then try "git describe", then default.
|
||||
if test -f $tarball_version_file
|
||||
then
|
||||
v=`cat $tarball_version_file` || v=
|
||||
case $v in
|
||||
*$nl*) v= ;; # reject multi-line output
|
||||
esac
|
||||
test "x$v" = x \
|
||||
&& echo "$0: WARNING: $tarball_version_file is damaged" 1>&2
|
||||
fi
|
||||
|
||||
if test "x$v" != x
|
||||
then
|
||||
: # use $v
|
||||
# Otherwise, if there is at least one git commit involving the working
|
||||
# directory, and "git describe" output looks sensible, use that to
|
||||
# derive a version string.
|
||||
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
|
||||
&& v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
|
||||
|| git describe --abbrev=4 HEAD 2>/dev/null` \
|
||||
&& v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
|
||||
&& case $v in
|
||||
$prefix[0-9]*) ;;
|
||||
*) (exit 1) ;;
|
||||
esac
|
||||
then
|
||||
# Is this a new git that lists number of commits since the last
|
||||
# tag or the previous older version that did not?
|
||||
# Newer: v6.10-77-g0f8faeb
|
||||
# Older: v6.10-g0f8faeb
|
||||
vprefix=`expr "X$v" : 'X\(.*\)-g[^-]*$'` || vprefix=$v
|
||||
case $vprefix in
|
||||
*-*) : git describe is probably okay three part flavor ;;
|
||||
*)
|
||||
: git describe is older two part flavor
|
||||
# Recreate the number of commits and rewrite such that the
|
||||
# result is the same as if we were using the newer version
|
||||
# of git describe.
|
||||
vtag=`echo "$v" | sed 's/-.*//'`
|
||||
commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
|
||||
|| { commit_list=failed;
|
||||
echo "$0: WARNING: git rev-list failed" 1>&2; }
|
||||
numcommits=`echo "$commit_list" | wc -l`
|
||||
v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
|
||||
test "$commit_list" = failed && v=UNKNOWN
|
||||
;;
|
||||
esac
|
||||
|
||||
# Change the penultimate "-" to ".", for version-comparing tools.
|
||||
# Remove the "g" to save a byte.
|
||||
v=`echo "$v" | sed 's/-\([^-]*\)-g\([^-]*\)$/.\1-\2/'`;
|
||||
v_from_git=1
|
||||
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
|
||||
v=UNKNOWN
|
||||
else
|
||||
v=$fallback
|
||||
fi
|
||||
|
||||
v=`echo "$v" |sed "s/^$prefix//"`
|
||||
|
||||
# Test whether to append the "-dirty" suffix only if the version
|
||||
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
|
||||
# or if it came from .tarball-version.
|
||||
if test "x$v_from_git" != x; then
|
||||
# Don't declare a version "dirty" merely because a timestamp has changed.
|
||||
git update-index --refresh > /dev/null 2>&1
|
||||
|
||||
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
|
||||
case "$dirty" in
|
||||
'') ;;
|
||||
*) # Append the suffix only if there isn't one already.
|
||||
case $v in
|
||||
*-dirty) ;;
|
||||
*) v="$v-dirty" ;;
|
||||
esac ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Omit the trailing newline, so that m4_esyscmd can use the result directly.
|
||||
printf %s "$v"
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'before-save-hook 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC0"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
5
build-aux/snippet/.gitignore
vendored
5
build-aux/snippet/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
/_Noreturn.h
|
||||
/arg-nonnull.h
|
||||
/c++defs.h
|
||||
/unused-parameter.h
|
||||
/warn-on-use.h
|
||||
105
config.h.in
Normal file
105
config.h.in
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
/* config.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
|
||||
systems. This function is required for `alloca.c' support on those systems.
|
||||
*/
|
||||
#undef CRAY_STACKSEG_END
|
||||
|
||||
/* Define to 1 if using `alloca.c'. */
|
||||
#undef C_ALLOCA
|
||||
|
||||
/* Define to 1 if you have `alloca', as a function or macro. */
|
||||
#undef HAVE_ALLOCA
|
||||
|
||||
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
|
||||
*/
|
||||
#undef HAVE_ALLOCA_H
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#undef HAVE_ARPA_INET_H
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#undef HAVE_ERRNO_H
|
||||
|
||||
/* Define to 1 if you have the <getopt.h> header file. */
|
||||
#undef HAVE_GETOPT_H
|
||||
|
||||
/* Define to 1 if you have the `getopt_long' function. */
|
||||
#undef HAVE_GETOPT_LONG
|
||||
|
||||
/* Define to 1 if you have the `inet_addr' function. */
|
||||
#undef HAVE_INET_ADDR
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#undef HAVE_LIBRESOLV
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#undef HAVE_NETINET_IN_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdio.h> header file. */
|
||||
#undef HAVE_STDIO_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#undef HAVE_SYS_SOCKET_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Name of package */
|
||||
#undef PACKAGE
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* If using the C implementation of alloca, define if you know the
|
||||
direction of stack growth for your system; otherwise it will be
|
||||
automatically deduced at run-time.
|
||||
STACK_DIRECTION > 0 => grows toward higher addresses
|
||||
STACK_DIRECTION < 0 => grows toward lower addresses
|
||||
STACK_DIRECTION = 0 => direction of growth unknown */
|
||||
#undef STACK_DIRECTION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Version number of package */
|
||||
#undef VERSION
|
||||
172
configure.ac
172
configure.ac
|
|
@ -1,172 +0,0 @@
|
|||
# -*- Autoconf -*-
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_CONFIG_MACRO_DIRS([m4])
|
||||
AC_INIT([dhcpd-pools],
|
||||
[m4_esyscmd([build-aux/git-version-gen .tarball-version])],
|
||||
[kerolasa@iki.fi],[],
|
||||
[https://dhcpd-pools.sourceforge.net/])
|
||||
PACKAGE_MAINTAINER="Sami Kerola"
|
||||
AC_SUBST([PACKAGE_MAINTAINER])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AM_INIT_AUTOMAKE([
|
||||
-Wall
|
||||
-Wextra-portability
|
||||
1.12
|
||||
foreign
|
||||
dist-xz
|
||||
no-dist-gzip
|
||||
parallel-tests
|
||||
subdir-objects
|
||||
tar-pax
|
||||
])
|
||||
AC_CONFIG_SRCDIR([src/dhcpd-pools.h])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
|
||||
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
|
||||
[AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
|
||||
|
||||
# Checks for programs
|
||||
AC_USE_SYSTEM_EXTENSIONS
|
||||
AC_C_RESTRICT
|
||||
AC_PROG_CC
|
||||
gl_EARLY
|
||||
gl_INIT
|
||||
AC_PROG_MAKE_SET
|
||||
LT_INIT
|
||||
|
||||
# Checks for libraries.
|
||||
LT_INIT
|
||||
|
||||
# Checks for header files.
|
||||
AC_CHECK_HEADERS([\
|
||||
arpa/inet.h \
|
||||
fcntl.h \
|
||||
libintl.h \
|
||||
limits.h \
|
||||
sys/socket.h \
|
||||
])
|
||||
|
||||
AC_ARG_WITH(
|
||||
[uthash],
|
||||
[AS_HELP_STRING([--with-uthash=DIR], [Use uthash from [DIR]/uthash.h)])],
|
||||
[AS_CASE([$with_uthash],
|
||||
[yes], [],
|
||||
[no], [AC_MSG_ERROR([the uthash is required])],
|
||||
[CPPFLAGS="$CPPFLAGS -I$with_uthash"]
|
||||
)]
|
||||
)
|
||||
AC_CHECK_HEADER([uthash.h], [], [AC_MSG_ERROR([Unable to find uthash.h])])
|
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_INLINE
|
||||
AC_HEADER_STDBOOL
|
||||
AC_TYPE_SIZE_T
|
||||
AC_TYPE_UINT32_T
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_CHECK_FUNCS([\
|
||||
__fpending \
|
||||
open_memstream \
|
||||
posix_fadvise \
|
||||
])
|
||||
AC_CHECK_DECL([strndupa])
|
||||
|
||||
AC_CHECK_FUNCS([fpclassify], [],
|
||||
[AC_CHECK_LIB([m], [fpclassify], [MATH_LIBS="-lm"])]
|
||||
[AC_CHECK_LIB([m], [__fpclassify], [MATH_LIBS="-lm"])]
|
||||
)
|
||||
AC_SUBST([MATH_LIBS])
|
||||
|
||||
AS_IF([test "x$ac_cv_func_open_memstream" = "xyes" && test "x$ac_cv_have_decl_strndupa" == "xyes"], [
|
||||
build_mustach=yes
|
||||
AC_DEFINE([BUILD_MUSTACH], [1], [build mustach support])
|
||||
], [
|
||||
build_mustach=no
|
||||
])
|
||||
AM_CONDITIONAL([ENABLE_MUSTACH], [test "x$build_mustach" = xyes])
|
||||
|
||||
AC_MSG_CHECKING([if the compiler supports __builtin_expect])
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
|
||||
return __builtin_expect(1, 1) ? 1 : 0
|
||||
]])],[
|
||||
have_builtin_expect=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
],[
|
||||
have_builtin_expect=no
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
AS_IF([test x$have_builtin_expect = xyes], [
|
||||
AC_DEFINE([HAVE_BUILTIN_EXPECT], [1],
|
||||
[The compiler supports __builtin_expect])
|
||||
])
|
||||
|
||||
AC_ARG_WITH([dhcpd-conf],
|
||||
[AS_HELP_STRING([--with-dhcpd-conf=FILE],[default path of dhcpd.conf])],
|
||||
[dhcpd_conf_path="$withval"],
|
||||
[dhcpd_conf_path="/etc/dhcpd.conf"])
|
||||
AC_DEFINE_UNQUOTED([DHCPDCONF_FILE], ["$dhcpd_conf_path"], [default path of dhcpd.conf])
|
||||
AC_SUBST([DHCPDCONF_FILE], [$dhcpd_conf_path])
|
||||
|
||||
AC_ARG_WITH([dhcpd-leases],
|
||||
[AS_HELP_STRING([--with-dhcpd-leases=FILE],[default path of dhcpd.leases])],
|
||||
[dhcpd_leases_path="$withval"],
|
||||
[dhcpd_leases_path="/var/lib/dhcp/dhcpd.leases"])
|
||||
AC_DEFINE_UNQUOTED([DHCPDLEASE_FILE], ["$dhcpd_leases_path"], [default path of dhcpd.leases])
|
||||
AC_SUBST([DHCPDLEASE_FILE], [$dhcpd_leases_path])
|
||||
|
||||
AC_ARG_WITH([output-format],
|
||||
[AS_HELP_STRING([--with-output-format=FORMAT],[default output format])],
|
||||
[output_format="$withval"],
|
||||
[output_format="text"])
|
||||
AC_DEFINE_UNQUOTED([OUTPUT_FORMAT], ["$output_format"], [default output format])
|
||||
AC_SUBST([OUTPUT_FORMAT], [$output_format])
|
||||
|
||||
AC_ARG_WITH([output-limit],
|
||||
[AS_HELP_STRING([--with-output-limit=MASK],[default output limit])],
|
||||
[output_limit="$withval"],
|
||||
[output_limit="77"])
|
||||
AC_DEFINE_UNQUOTED([OUTPUT_LIMIT], ["$output_limit"], [default output limit])
|
||||
AC_SUBST([OUTPUT_LIMIT], [$output_limit])
|
||||
|
||||
AC_ARG_WITH([warning],
|
||||
[AS_HELP_STRING([--with-warning=NUM],[monitoring warning default])],
|
||||
[warning_percent="$withval"],
|
||||
[warning_percent="80"])
|
||||
AC_DEFINE_UNQUOTED([ALARM_WARN], [$warning_percent], [monitoring warning default])
|
||||
AC_SUBST([ALARM_WARN], [$warning_percent])
|
||||
|
||||
AC_ARG_WITH([critical],
|
||||
[AS_HELP_STRING([--with-critical=NUM],[monitoring critical default])],
|
||||
[critical_percent="$withval"],
|
||||
[critical_percent="90"])
|
||||
AC_DEFINE_UNQUOTED([ALARM_CRIT], [$critical_percent], [monitoring critical default])
|
||||
AC_SUBST([ALARM_CRIT], [$critical_percent])
|
||||
|
||||
AC_ARG_ENABLE([doxygen],
|
||||
AS_HELP_STRING([--enable-doxygen],[build internal api documentation @<:@default=disabled@:>@]),
|
||||
[], [enable_doxygen=no])
|
||||
AM_CONDITIONAL([ENABLE_DOXYGEN], [test "x$enable_doxygen" = "xyes"])
|
||||
|
||||
AS_IF([test x$enable_doxygen = xyes], [
|
||||
AC_CHECK_PROGS([DOXYGEN], [doxygen])
|
||||
AS_IF([test "x$DOXYGEN" = "x"],
|
||||
AC_MSG_ERROR([doxygen not in path])
|
||||
)
|
||||
|
||||
AC_CHECK_PROGS([DOXYGEN_DOT], [dot])
|
||||
AS_IF([test "x$DOXYGEN" = "x"],
|
||||
AC_MSG_WARN([dot not in path, internal documentation graphs are not generated])
|
||||
)
|
||||
])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN], [test "x$DOXYGEN" != "x"])
|
||||
AM_CONDITIONAL([HAVE_DOXYGEN_DOT], [test "x$DOXYGEN_DOT" != "x"])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
lib/Makefile
|
||||
])
|
||||
|
||||
AC_OUTPUT
|
||||
70
configure.in
Normal file
70
configure.in
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
AC_INIT([dhcpd-pools], [2.3], [kerolasa@iki.fi])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.9 foreign])
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AC_PROG_CC
|
||||
AC_ISC_POSIX
|
||||
|
||||
dnl Default paths.
|
||||
dhcpd_conf_default=/home/kerolasa/crap/src/old-dhcpd-pools/backup/input/dhcpd.conf
|
||||
dhcpd_leases_default=/home/kerolasa/crap/src/old-dhcpd-pools/backup/input/dhcpd.leases
|
||||
output_format_default=text
|
||||
|
||||
dnl Let the user set his own paths
|
||||
AC_ARG_WITH(dhcpd-conf,
|
||||
[ --with-dhcpd-conf=PATH Path where dhcpd.conf is located],
|
||||
[ dhcpd_conf=$withval
|
||||
CPPFLAGS="$CPPFLAGS -DDHCPDCONF_FILE='\"$withval\"'" ],
|
||||
[ dhcpd_conf=$dhcpd_conf_default ]
|
||||
)
|
||||
AC_SUBST(dhcpd_conf)
|
||||
|
||||
AC_ARG_WITH(dhcpd-leases,
|
||||
[ --with-dhcpd-leases=PATH Path where dhcpd.leases is located],
|
||||
[ dhcpd_leases=$withval
|
||||
CPPFLAGS="$CPPFLAGS -DDHCPDLEASE_FILE='\"$withval\"'" ],
|
||||
[ dhcpd_leases=$dhcpd_leases_default ]
|
||||
)
|
||||
AC_SUBST(dhcpd_leases)
|
||||
|
||||
AC_ARG_WITH(output-format,
|
||||
[ --with-output-format=FORMAT Default output format],
|
||||
[ output_format=$withval
|
||||
CPPFLAGS="$CPPFLAGS -DOUTPUT_FORMAT='\"$withval\"'" ],
|
||||
[ output_format=$output_format_default ]
|
||||
)
|
||||
AC_SUBST(output_format)
|
||||
|
||||
AC_ARG_WITH(output-limit,
|
||||
[ --with-output-limit=NRO Default output limit 00 - 77],
|
||||
[ output_limit=$withval
|
||||
CPPFLAGS="$CPPFLAGS -DOUTPUT_LIMIT='\"$withval\"'" ],
|
||||
[ output_limit=$output_limit_default ]
|
||||
)
|
||||
AC_SUBST(output_limit)
|
||||
|
||||
AC_CHECK_FUNCS(getopt_long inet_aton inet_addr, break)
|
||||
|
||||
AC_CHECK_LIB(resolv, inet_ntoa)
|
||||
|
||||
AC_CHECK_HEADERS([arpa/inet.h errno.h netinet/in.h stdio.h \
|
||||
stdlib.h string.h sys/socket.h sys/stat.h sys/types.h unistd.h])
|
||||
|
||||
dnl GNU commandline parsing in getopt.h present ?
|
||||
AC_CHECK_HEADERS(getopt.h, AC_DEFINE(HAVE_GETOPT_H),
|
||||
import_sources="getopt.c getopt1.c $import_sources")
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_ALLOCA
|
||||
|
||||
dnl for help2man
|
||||
AC_CHECK_PROG(PERL, perl, perl)
|
||||
|
||||
AC_CONFIG_FILES([Makefile man/Makefile src/Makefile])
|
||||
|
||||
AC_OUTPUT
|
||||
1
contrib/.gitignore
vendored
1
contrib/.gitignore
vendored
|
|
@ -1 +0,0 @@
|
|||
/nagios.conf
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
contribdir = $(datadir)/dhcpd-pools/
|
||||
PATHFILES += contrib/nagios.conf
|
||||
dist_contrib_SCRIPTS = contrib/snmptest.pl
|
||||
dist_contrib_DATA = contrib/nagios.conf
|
||||
EXTRA_DIST += contrib/munin_plugins
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
# Archlinux package file. Just download this file, and
|
||||
# makepkg PKGBUILD
|
||||
# pacman -U ./dhcpd-pools*.pkg.tar.xz
|
||||
|
||||
pkgname=dhcpd-pools
|
||||
pkgver=0
|
||||
pkgrel=1
|
||||
pkgdesc="ISC dhcpd lease status utility"
|
||||
arch=('i686' 'x86_64')
|
||||
url=https://dhcpd-pools.sourceforge.net/
|
||||
license=('BSD')
|
||||
depends=('pacman')
|
||||
makedepends=('uthash' 'git')
|
||||
source=("$pkgname"::'git://git.code.sf.net/p/dhcpd-pools/code')
|
||||
md5sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$pkgname"
|
||||
# Use the tag of the last commit
|
||||
git describe --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/$pkgname"
|
||||
./bootstrap
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--bindir=/usr/bin
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$pkgname"
|
||||
make PREFIX=/ DESTDIR="$pkgdir" install
|
||||
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
|
||||
}
|
||||
34
contrib/dhcpd-pools.cgi
Executable file
34
contrib/dhcpd-pools.cgi
Executable file
|
|
@ -0,0 +1,34 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Simple CGI for dhcpd-pools.
|
||||
|
||||
echo Content-type: text/html
|
||||
echo
|
||||
|
||||
# To make lease table more fancy use CSS definition something
|
||||
# like this in your style.css file.
|
||||
#
|
||||
# TABLE.dhcpd-pools {
|
||||
# border-style : groove;
|
||||
# margin-left : 2px;
|
||||
# foo : bar;
|
||||
# }
|
||||
#
|
||||
# http://www.w3.org/TR/REC-CSS2/tables.html
|
||||
#
|
||||
# And uncomment this line.
|
||||
#
|
||||
#echo <link type="text/css" rel="stylesheet" href="/style.css" />
|
||||
|
||||
echo "<html>"
|
||||
echo "<body>"
|
||||
echo "<p>This was situation at "
|
||||
date
|
||||
echo "</p>"
|
||||
|
||||
/usr/local/bin/dhcpd-pools --format html
|
||||
|
||||
echo "</body>"
|
||||
echo "</html>"
|
||||
|
||||
# EOF
|
||||
|
|
@ -1,111 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFLH/jcBEADNgkgZAr7b/qvHzNkme8eSplDA8UHhcCFQmBnQ8HYFEYBi1Y5a
|
||||
GhICcuisRSuZIPLtqRF8ntoOXsOHOUxnn5hVR62HxMLgOC1PQMw8TzREobbkAxMp
|
||||
Vg66c6JXD2+jEGuAbhRk1XyWJHaCN2ewT06ToqGi7jhlw6nz1AHyohhyxeRlyMff
|
||||
a4daTIRREnh2qouImSOE0E8ETAb0eOnFOsweHhmbpC/RDzuY7Ns8YcNH3FbWT1Kl
|
||||
4W9vOstB1JcgSz38/tnzoMG2Mf2jI8LgR+6xiHTb7i6bgyWiBOxcJWouTVam6SC0
|
||||
Bc5cAe8EqHT6NMEjtNjDEzmb3ZFpFUnNKgKK5Wzghf17HAvYwpjYxNNoQl9jNIkf
|
||||
XroquAyDDXW0IkNdGDARjJGW17r38oRH/R3q79DZNlqV/DPk4YLb0EAKzRAdBYGm
|
||||
v8Bj+uLXc4JT9kTB5E8DT2ZR+61E4eT/zk4rpZ5j6tTktLNaSG58VYc+oQlPkPsB
|
||||
ntraDsORpa5cK9uPUbHIHN1qd4gi35O4UDSqS023XnStQqsUD4vlzICedPDypn28
|
||||
h9q2nlNQHSDjIRnZFD+z9IHfVoBNTfm5/UH7NKBAvSS6rP5zsgi2fittt5AFdbmQ
|
||||
VBOtpYp5vbcdSt8gNdJRy8FRaiQ/2n74xF1Zso/PGni1xRmseS+qBGI95QARAQAB
|
||||
tB1TYW1pIEtlcm9sYSA8a2Vyb2xhc2FAaWtpLmZpPokCcwQTAQgAXQIbAwULCQgH
|
||||
AgYVCAkKCwIEFgIDAQIeAQIXgAIZARsYaHR0cDovL2h0dHAta2V5cy5nbnVwZy5u
|
||||
ZXQWIQSO05bjfjjUcaAFMNOpVTJF/em3OQUCWb42mgUJGcI7YwAKCRCpVTJF/em3
|
||||
OWNBD/4/N0OO6cA3bmEAum5qmHdcJVcUor9ClY3oY2QWdTyDCmSJLcTZUNsTrYYA
|
||||
hY5vQsDxG6ZaKiITvhwp9y4PdJmnqqzRfnqnXusSVEsqG3vGHIVlpQj8Vgurr68d
|
||||
1x2buHGRvRrjBMWR/Ro1TUeNOmM4HStcvjXRTWlHk9VXi9nk+uMQY9n1lXYNChda
|
||||
0usj7q5QXXFXbOukKrvEZzt4I1tGbSEv7bBIghr5fMAJg8ZqAMDwfqsUKSM38HF4
|
||||
leCUgMZS7XuXuEb35ImjR1VYYCb+L2Q/PFqDOEGQpUwyLOzXcU9TaIDjMhNQY19y
|
||||
DTUjW1YdQtf+3XmQFa4X1Od0jP1PiVJhw1LNCQLOENs+SRqT9s0W8+nP3qjso/LR
|
||||
T3vR3FcGSw6KrESMFvmwY7EEYGvOpEgaIv8sIJl7un4BoWHYq/2D6jDHK/YmbpgG
|
||||
J2FIvZZ4vVYixqgrqCh54USpwTaKd4KQpdm4zZMJ2yIznR6+gXxTi2TyUwKFV67y
|
||||
RY6o5n3jusWuRejB1BI2eXRbFSeZn6IxAG8QLlLHu1R/XBB1dYDkbtYZ5XuAJRTH
|
||||
qjCL+s/4rjJIUj02dmmtiyObN3bs/48DTQsDqgCYbA2wmbBjT9lPmRWfncBSlqbx
|
||||
XSRwyXnDql+UIi6wphBdESn5TNVJjWxYQ16ZRYoZlz4tV2bPl4kCHAQQAQoABgUC
|
||||
WCOB1QAKCRCB/dUuZfDuelcKD/4iggO8sgYYmTf63y2LJhG7e2d3K/cbQ04Pn/iF
|
||||
b6zBa5kCsLAWHJmWBPlPkQB3HjZ+j1OSs4sHvwuotuVde2cbtzEvuphQRamFSU83
|
||||
lakXwXrk00IU7oVEz1Yo9c7IB6pOY0uDgQMIp/Vitm9pomZXAV3S1bYciYuvXdJC
|
||||
6SaUbyrHzkVgxEV7TSK2XUgMFGnBCIUhqxNA+chkGg6KS715XH8MJyb1Izinsjux
|
||||
Q07+tquoiYqRhSntTc+bJ83OpSB8bPlqP1FZdc+ypZjq8OEpFIZK8QtK+849vzYw
|
||||
vORq19mwFAY9y6XZip7YZzSGzn7Q4v3XfVJlIwGrkHSnUkqOmQXGdoSHAiwX3WhU
|
||||
nPtpYFZQoFFQjm0SsgdPWbqJmmLj2MjHUFbKzl9PVa0INnwp6RxfzNZjU6OxphoI
|
||||
ocw+2hmXv/lHzb+cwFf8Nae0WOJkCoGwxk9mYA0omhuKJ/WWVvauu+uaswBkeX6O
|
||||
1Yf1jSrWgK5u+jbDcmZj0kFL0zdB/pBxshngxCA3efPd1e2dJGcPlaoqkwZAtEmG
|
||||
hwWDj9Gk5IhSX1/Wpv+ke2wprUPzwv7Z5loXroLub2R29FWyHzymwlnts5hSg7kR
|
||||
1PzxD3iOHFgmnWcBCchf8UWmAjrutZQJZWLTDkzlC6Vj8rkJcgdb0v14zvYVJTWs
|
||||
Q/hMDYkCHAQSAQoABgUCWCN/ZwAKCRCRAl9JYWN/KLmND/9k8ydscqaMW86NswOC
|
||||
drJDXuOTDvJJlnLYhgO1+jKQizbHQqnszIVk7KvXY2/K++TdTNdG/+/LosvtIRKb
|
||||
2DEvV2hPZhc3UxZ2Gnx9ocqjSCfmd9er9EY34WGLtr57eQnu93CJGe10F3qg4rr3
|
||||
8zsgQcLXomvKnB2J5oRWBla01DXZhum1uIbehrqDmBUz9YxAIz9adY0AjDyLNvAB
|
||||
IghkjobLHWhouQaTV1IT6Koixdrj6eKekjRojWVZ7Po5dcUe525NlA1yBJhI9VDF
|
||||
TLy6DHEwmJJuAQqDpyRILzSDsyQ0B+wBgpGks5reCDZlwAjogLy0O6nV2qYKfVXK
|
||||
ziHeXPvzLPEfSmkA0ZutLXnJBLNfod4zELLJrPJA27dDdQO4yImoAjjTklyBpHXy
|
||||
Fp3r5RlDq5yA9VpNkC58KJQZoiplkUNBaQTjYgcYX4LDaU4bEq++CUUEnisIyqPO
|
||||
KqJPJAvmlm1d2vOMxhzcjxt3xBAvDZ8ibRIXlV296Y56SEBe5UZhyUqpAQBa0zsp
|
||||
oQm9MdkqoC+IDBTRVnbGSxsw0GiQRpAJyNOlkTzP6z6ySmRIQ1hH1TqXx7TChPqP
|
||||
tcLHLOnRTY9/v5Kt8APa+qgn/0UVgGcetkarqXNdtq+zD1x9C0DFNURBl0uH/E1E
|
||||
Dtyx4xI6xCY3jzv0Cb1y9Afrc7Q7U2FtaSBLZXJvbGEgKGh0dHA6Ly93d3cuaWtp
|
||||
LmZpL2tlcm9sYXNhLykgPGtlcm9sYXNhQGlraS5maT6JAlYEEwECAEACGwMHCwkI
|
||||
BwMCAQYVCAIJCgsEFgIDAQIeAQIXgBYhBI7TluN+ONRxoAUw06lVMkX96bc5BQJZ
|
||||
vjaaBQkZwjtjAAoJEKlVMkX96bc58KYP/jvpHWmoKKFzqClLdDkN8tBo30GgHGoh
|
||||
WKHbgW859mi/ZcYzTxlx6Dm88QwV5DRulgqAHvLTippncR3LTpL3Ys86ZDoIskF9
|
||||
BnWOm/bC+Czl9mDL6BNfFEWWnfeGFsCaMq/Jx8nj8i2o0ezhbTjCeGeng4quWK1D
|
||||
T6G8Kvnk7Dc+i0n20LUQf2WRCLrtJEl/PMElc+11X/jLm9ypjE/jr24xiNsZck45
|
||||
4rdMsdkZqgbSHWNIHyxS66mWmD1vbHp3kq0ic09ISCx/Xc7OQpv7V0hN+lxE+AvA
|
||||
3Mjp2i7A3ntwUbPwmZkdiWUrBqU4CYee0S4fbgroUjNQ/JhGZmCku5YbcyAg4KrP
|
||||
quXEftY0HP3qQMMElcwna5ljDQdC9NGuSWkH0OKZsuXlgtIz583wjNTKupzii+jo
|
||||
AJcNnbdRR4i/U7cI+/ySluTp+Az/odmTNzssGnlsXOSGYWk4o6ruKvU4HzUauMEO
|
||||
XPrTvI7IlH/GIHvwrOcXAyAU90M0qppC4YjXK8oCawzTnbQVQsbedwoNaEPaD4Bz
|
||||
N4ka9PtvgKnBzODvOeDsTz1O6vTomttW2C6nficc/PXQvxDkZ3NeJw3eGiiAQxeA
|
||||
w2Ps3+oIasyQZZVLlvu8dfE2BsPArggPLNgd6bLk3yk/gQGR0D+/TyHuCgPM1nZt
|
||||
mBG3utrXfMz3iQIcBBABCgAGBQJYI4HVAAoJEIH91S5l8O56YhYQAIfxcRP31w+6
|
||||
htYZO5dGS1zF1CReY8VO/AyBa59YJHAlFSbOhqHQY1SAYD+H1IZhv/JCvQScZhyT
|
||||
giI3KPP1RAPUa1xGZrf4hwl7Yu8ZpFn1Y0Gxd4bj2i9HWJcd1A+ci4kc+dU4rPEB
|
||||
ac2U06vcIyuyCSjuK2RdYCyd7pQRkoUtZxWen6sxi1khsw3Qucfbr5QZyh/roA4i
|
||||
hTb3VlFFIiCRcZOAqSYml9a+kbDxpgswbdCE3EMHVYBWtFwWImZOhnsun148H7EA
|
||||
+b+hAcbkoNpXJOfC8q/EM0qm6C1GhryXe1voLxfeMdKKjXM78dc0z3L/Vz0E+stD
|
||||
qrT7CG1jLSk/rIjSvRhbnEX/ZTKa+19ytht0B2zxkokjevvzw6cXSM5JjG8Q9k7R
|
||||
PcPOTS0t7MSwRqCEFvhvswH3JYy0SH0U2nKbPmkY1Awh6BZNyGpf3dxHV648RVZv
|
||||
lrXUbXv1azD8U+llaMkVx0PTbej0RcRHQM6B5zJ0qu1MC64V/v2uUK3MNl38JdFa
|
||||
wkB494uf024FRIfJlQ8+WYrsGlHbUBZZsWzsyrPaeaqL0Xcy+hOc7wu7cZPxkqL8
|
||||
71O3jbq2dFkBWA4ANsiRdJTh14qoen4YVdc9gjq6HsuFyu0gauDktLaLUHVCX27e
|
||||
kWThHNxeNoGkcKKHoQdHrN8sII8C1q6fiQIcBBIBCgAGBQJYI39nAAoJEJECX0lh
|
||||
Y38oIbEP/165gMnaD+g7cfGsHCHQk9/ZrE+4iXfZSwxlhaJ4kK88Ad/tPvoiOxmS
|
||||
NaUIfH/koGBQNeE/OjjIkPiGlsldg9//4mGmSglM4jLeQBG0QuTLo30aNCl9xU6q
|
||||
rv9PV/ROfjRUF5NxCAiDdA24uBZ8CftdK5sglD6fazeINQyNk5Wm8e7Jk9PRzIuK
|
||||
jnZRyaGJl3egx5smWnCZZ8QfjsYXDzbp1uDavmF7Qczp+xbzBhdh6VdSZ0VwvnPr
|
||||
kN3CzGiR3AuG982R41UGZQ3a+3d38QnmX8cdT1yCqJLrSh4+AJbuGrndOqxBhTN0
|
||||
VQBIGHteZ6ezxDHs4kVBwfSc3XOzNimJKFVxWCJDXZQojKawu7PaDPYGxU9OWAjs
|
||||
OWtJFTGqeEiBDQbnLwncT5l/I1O1zv9MIFhQ4MgJeRbvG/QjuLrP6RoIMGZLkX6K
|
||||
o35dZ6gO/XAdhJmOhfon6Q5/RPdB11e/UkM58xZMbQLGJ3Gm9vjz039vwMabMjXf
|
||||
28UE3xKzdzDg8Fb3ykNtIQSFNr/cf5YBZ7KMtfJ6ugExmJQQdWxZLQpHoNNCmknt
|
||||
OHOajlB628N3J0PKlwPjjt5KveBO2ur/yAly6SSv2Oi/astGscgrJtIyPFKMmKar
|
||||
gPzEnPv4DfLbHnskHkyzVBrQE16Pmcfx4fAe2LeDIO8KJMqSxKOouQINBFLH/jcB
|
||||
EADGsDuJyhEGExcInkb4Zy8HlSNaT0nFxpQK+tI5RlqyC11TnxdUDCQwPPRh/hdN
|
||||
s7RDQ6lHhmXydD04+Sjjn0nkQCxd8TlBTwOU6BV4vPF7BonskTMHb6mXxOo+6f7+
|
||||
J5q4beQ7XzRSoFqLZ0kiump7B4m6L4WSqZmcfi8f6EOQZHK1HsTB2jE+cwaPm7vN
|
||||
eNaKXYM6hHojZ7XnDavv4vMxfLRGGx5e6wNcZexD4t4pkMwmA+A576t5CnIm8JVB
|
||||
2HLj2YZN6DfIfYQ9EcMYSYVLg/EuivPaMZIoIa9ki5TbeQDANluJqAG+i+CSoIfJ
|
||||
X1V1p0WoeSEKJnGBhVFmajU+nek1lCqeM/VXQF4dWbFCQm8/eKl1M9PY77dwT90x
|
||||
RZDeigM6o6CoB+6rfePAnwsmtA21LyQ9WMTCH9qii9SvlWkfCvLK3HnC/2d1ctws
|
||||
F8yoc6KF+Qwj7RV23/iHYqjxB8OcOAyHuv+k0sD9o0MLlzAExOftLPkwyWS8ePs7
|
||||
rJVLSA42N3diUYx5TO3NzmU8ifn4hGxbF9J/sIYQUfCxH9V+DBe2vhVSZ/bQKpVU
|
||||
ZTE8KxINL32JvTR3HbEwHKIe0xIFnDOMGrWP7icPEsaSKj/0vEq/Is/R2nJWfD0V
|
||||
zs7vil9zYU16vHQtZrv/5SzavzDRFGxLm7/jDfrzMuNRdQARAQABiQIlBBgBAgAP
|
||||
BQJSx/43AhsMBQkJZgGAAAoJEKlVMkX96bc5cYEQAI8xVRdoza/MY9KFJCRiobii
|
||||
4GjxAJqIXXvbY8mM7rvmiLnzfr5msLzSop7Epse6tkI8QvYXbY+EjXke27J8rM/z
|
||||
qXyqdKJfcqKVzq6fIQyVVsz9o0hwvuSjkcSgCV2b8XHKbNygSnNh2VJ5YY/zL2x5
|
||||
tsySa3tLukh46ydKWRQqOSMIxMT0TnCOiTMr5INwGnX68rB0kEuCSUdkzDuyulW2
|
||||
T0oN7Yx4ASgrJixwSu/UNMO/fXvkG0NYIWeXQcnn0C8zQv/PAfzJ9O+24Md4m6tz
|
||||
VuDpblSRB6E8xQhusysRc4BEHB/G3Ege3JR/tumT6solJD7pfFDYkC9rAKhTKK9h
|
||||
1b2VpEGxN9o8qwwjtNljLakEYXuWNpCmZxKAR4Agg3UY8CGmgsTKyjsfB9iO2+LX
|
||||
CS9uQMAtIHbnr++mPASBEKD6rP8QIyf12fbI9JRNGWcXQVZBGXWmu4UaKOrXBTVz
|
||||
ooj2yG7kZmKO0FoIaCqqTUs2/KhnFj2EFvym2j1OMrYxOM/pT6w3cv3CwGb1ILOX
|
||||
0qrTQiEpOExSMa21Mi4678jXt6F6NPWG/lwlgE1WM9i9jIcua+NU5ZJiqQ/rjuSR
|
||||
MB/WFrQy66/jb9wWNp/G6DXrANgdgoC9Dq5oviB+dqSXlU5b0atG4ru506mXCHKm
|
||||
OC+wu0oRlGQ/X6iuuDfS
|
||||
=fVwo
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var command = "dhcpd-pools"
|
||||
var timeout = 5000; // (ms) if the command take longer, then kill it
|
||||
|
||||
var execFile = require('child_process').execFile;
|
||||
var echo = require('util').print;
|
||||
|
||||
var arg = process.argv[2];
|
||||
|
||||
if ("autoconf" === arg) {
|
||||
echo("yes\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
execFile(command, [ "--format=j", "--sort=n" ], { timeout: timeout }, function(error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
console.log('exec error: ' + error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
stdout = JSON.parse(stdout);
|
||||
|
||||
if ("config" === arg) {
|
||||
echo("graph_title dhcp usage (number of machines)\n");
|
||||
echo("graph_vlabel nb of machines\n");
|
||||
echo("graph_scale no\n");
|
||||
echo("graph_category network\n");
|
||||
|
||||
stdout["subnets"].forEach(function(subnet) {
|
||||
var location = subnet["location"];
|
||||
var range = subnet["range"];
|
||||
echo(location + '.label ' + location + ' (' + range + ')\n');
|
||||
});
|
||||
} else {
|
||||
stdout["shared-networks"].forEach(function(network) {
|
||||
var location = network["location"];
|
||||
var used = network["used"];
|
||||
var defined = network["defined"];
|
||||
echo(location + '.value ' + used + '\n');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set("display_errors", true);
|
||||
|
||||
$ret="";
|
||||
$xml = exec("dhcpd-pools --format x --sort n", $ret);
|
||||
$xml = join($ret);
|
||||
|
||||
$xml = new SimpleXMLElement($xml);
|
||||
|
||||
|
||||
if ($argc>1 && $argv[1]=="autoconf") {
|
||||
echo "yes\n";
|
||||
return;
|
||||
} elseif ($argc>1 && $argv[1]=="config") {
|
||||
$xml2 = $xml->xpath("subnet");
|
||||
echo "graph_title dhcp usage (number of machines)\n";
|
||||
echo "graph_vlabel nb of machines\n";
|
||||
echo "graph_scale no\n";
|
||||
echo "graph_category network\n";
|
||||
foreach ($xml2 as $xml3) {
|
||||
$location = (string) $xml3->location;
|
||||
$range = (string) $xml3->range;
|
||||
echo "$location.label $location ($range)\n";
|
||||
}
|
||||
} else {
|
||||
$xml2 = $xml->xpath("shared-network");
|
||||
foreach ($xml2 as $xml3) {
|
||||
$location = (string) $xml3->location;
|
||||
$used = (int) $xml3->used;
|
||||
$defined = (int) $xml3->defined;
|
||||
$pourcent = ceil($used*10000/$defined)/100;
|
||||
echo "$location.value $used\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
var command = "dhcpd-pools"
|
||||
var timeout = 5000; // (ms) if the command take longer, then kill it
|
||||
|
||||
var execFile = require('child_process').execFile;
|
||||
var echo = require('util').print;
|
||||
|
||||
var arg = process.argv[2];
|
||||
|
||||
if ("autoconf" === arg) {
|
||||
echo("yes\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
execFile(command, [ "--format=j", "--sort=n" ], { timeout: timeout }, function(error, stdout, stderr) {
|
||||
if (error !== null) {
|
||||
console.log('exec error: ' + error);
|
||||
return 1;
|
||||
}
|
||||
|
||||
stdout = JSON.parse(stdout);
|
||||
|
||||
if ("config" === arg) {
|
||||
echo("graph_title dhcp usage (in percent)\n");
|
||||
echo("graph_args --upper-limit 100 -l 0 --rigid\n");
|
||||
echo("graph_vlabel %\n");
|
||||
echo("graph_scale no\n");
|
||||
echo("graph_category network\n");
|
||||
|
||||
stdout["subnets"].forEach(function(subnet) {
|
||||
var location = subnet["location"];
|
||||
var range = subnet["range"];
|
||||
echo(location + '.label ' + location + ' (' + range + ')\n');
|
||||
echo(location + '.warning 75\n');
|
||||
echo(location + '.critical 90\n');
|
||||
});
|
||||
} else {
|
||||
stdout["shared-networks"].forEach(function(network) {
|
||||
var location = network["location"];
|
||||
var used = network["used"];
|
||||
var defined = network["defined"];
|
||||
// keep 1 digit after decimal point
|
||||
var percent = Math.ceil(used * 100 / defined) / 10;
|
||||
echo(location + '.value ' + percent + '\n');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
error_reporting(E_ALL);
|
||||
ini_set("display_errors", true);
|
||||
|
||||
//$xml = file_get_contents("test.xml");
|
||||
$ret="";
|
||||
$xml = exec("dhcpd-pools --format x --sort n", $ret);
|
||||
$xml = join($ret);
|
||||
|
||||
$xml = new SimpleXMLElement($xml);
|
||||
|
||||
|
||||
if ($argc>1 && $argv[1]=="autoconf") {
|
||||
echo "yes\n";
|
||||
return;
|
||||
} elseif ($argc>1 && $argv[1]=="config") {
|
||||
$xml2 = $xml->xpath("subnet");
|
||||
echo "graph_title dhcp usage (in percent)\n";
|
||||
echo "graph_args --upper-limit 100 -l 0 --rigid\n";
|
||||
echo "graph_vlabel %\n";
|
||||
echo "graph_scale no\n";
|
||||
echo "graph_category network\n";
|
||||
foreach ($xml2 as $xml3) {
|
||||
$location = (string) $xml3->location;
|
||||
$range = (string) $xml3->range;
|
||||
echo "$location.label $location ($range)\n";
|
||||
echo "$location.warning 75\n";
|
||||
echo "$location.critical 90\n";
|
||||
}
|
||||
} else {
|
||||
$xml2 = $xml->xpath("shared-network");
|
||||
foreach ($xml2 as $xml3) {
|
||||
$location = (string) $xml3->location;
|
||||
$used = (int) $xml3->used;
|
||||
$defined = (int) $xml3->defined;
|
||||
// keep 1 digit after decimal point
|
||||
$pourcent = ceil($used*1000/$defined)/10;
|
||||
echo "$location.value $pourcent\n";
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB |
|
|
@ -1 +0,0 @@
|
|||
command[check_dhcpd_pools]=@bindir@/dhcpd-pools --warning $ARG1$ --critical $ARG2$
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
Klaus Slott made a package that works for opensuse, and is
|
||||
a good starting point for whom ever happens to need an rpm.
|
||||
|
||||
https://build.opensuse.org/package/show/home:Mr_Manor/dhcpd-pools
|
||||
|
|
@ -1,479 +0,0 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# <Note from="Sami Kerola">
|
||||
# This script is anonymous user contribution (due legal
|
||||
# department did not let the person the get credit because
|
||||
# they are afraid open source contributions). You know who you
|
||||
# are, and I am graceful to get this to be part of the
|
||||
# package.
|
||||
# </Note>
|
||||
|
||||
# 1) modify snmpd.conf and add the following line. Note that the
|
||||
# last field must match the path/name of the script:
|
||||
#
|
||||
# pass_persist .1.3.6.1.4.1.2021.250.255 /root/snmptest.pl
|
||||
#
|
||||
# This assumes you've already configured snmpd, i.e. community
|
||||
# strings, etc.
|
||||
#
|
||||
# 2) Install the following script. Note that if you changed the
|
||||
# OID string above, then you'll need to change the value for
|
||||
# $root in this file, too. Be sure that $datafile is set to
|
||||
# the location of the .CSV output from dhcpd-pools. NOTE: if
|
||||
# you set $dbg to 1 then output will be generated in /tmp.
|
||||
|
||||
use strict;
|
||||
use NetSNMP::OID;
|
||||
|
||||
# Version info:
|
||||
my $SNMPver = "snmp1.1";
|
||||
my $DHCPver = "dhcp1.0";
|
||||
my $VERSION = "$SNMPver/$DHCPver";
|
||||
#
|
||||
# set $dbg to a non-zero value to get debug output in /tmp
|
||||
#
|
||||
my $dbg=0;
|
||||
|
||||
#
|
||||
# Here's an example entry for snmpd.conf:
|
||||
# pass_persist .1.3.6.1.4.1.2021.250.255 /path/to/this/script.pl
|
||||
# so in this case $root should be '.1.3.6.1.4.1.2021.250.255'
|
||||
#
|
||||
# $root.1.x : shared network name for index x
|
||||
# $root.2.x : IP range name for index x
|
||||
# $root.3.x : Range Contained-In for index x
|
||||
# $root.4.x : Shared Net Stats for index x
|
||||
# $root.5.x : IP range stats for index x
|
||||
#
|
||||
# $root.4.1.x : 'max' value for shared network at index=x
|
||||
# $root.4.2.x : 'cur' value for shared network at index=x
|
||||
# $root.4.3.x : 'tou' value for shared network at index=x
|
||||
#
|
||||
# $root.5.1.x : 'max' value for IP range at index=x
|
||||
# $root.5.2.x : 'cur' value for IP range at index=x
|
||||
# $root.5.3.x : 'tou' value for IP range at index=x
|
||||
|
||||
#
|
||||
# $root must match pass_persis entry in snmpd.conf
|
||||
#
|
||||
my $root='.1.3.6.1.4.1.2021.250.255';
|
||||
|
||||
#
|
||||
# $datafile is the location of the .CSV file created by dhcpd-pools.
|
||||
# NOTE: It is assumed that this file is routinely updated, i.e. at least
|
||||
# every 5 minutes, by some other process, i.e. cron.
|
||||
#
|
||||
my $datafile='/var/lib/dhcp/dhcpstats.csv';
|
||||
|
||||
#
|
||||
# $cachetime determines how long we can cache parse data from $datafile. If
|
||||
# more than $cachetime has elapsed we'll re-read $datafile, otherwise we'll
|
||||
# just send back the last-parsed data
|
||||
#
|
||||
# Generally 60 seconds seems pretty reasonable, but any positive value is
|
||||
# permitted.
|
||||
#
|
||||
my $cachetime = 60;
|
||||
|
||||
#
|
||||
# global variables for DHCP
|
||||
#
|
||||
my %SharedNetwork;
|
||||
my %RangeName;
|
||||
my %RangeContained;
|
||||
my @SNNindex;
|
||||
my @IPRNindex;
|
||||
|
||||
#
|
||||
# global variables for SNMP
|
||||
#
|
||||
my @validoidlist;
|
||||
|
||||
########## BEGIN UNIQUE-CODE FOR YOUR SNMP-QUERY NEEDS
|
||||
#
|
||||
# ParseDataFile does just that, and stores info in %SharedNetwork for later
|
||||
# processing.
|
||||
#
|
||||
# The routine ParseDataFile is calls at invocation to initialize all
|
||||
# datasets and also periodically (based on $cachetime).
|
||||
#
|
||||
my @where = qw( unknown Ranges SharedNets SumData );
|
||||
sub ParseDataFile () {
|
||||
print DBG "ParseDataFile\n" if $dbg;
|
||||
my $where = 0; # location in file unknown
|
||||
# used to generate ifIndex-like values for each Shared network
|
||||
my $shareindex = 1;
|
||||
# used to generate ifIndex-like values for each Shared network
|
||||
my $rangeindex = 1;
|
||||
|
||||
undef %SharedNetwork;
|
||||
undef %RangeName;
|
||||
undef %RangeContained;
|
||||
undef @SNNindex;
|
||||
undef @IPRNindex;
|
||||
@validoidlist = ();
|
||||
|
||||
open(IN, $datafile) || return undef;
|
||||
while (<IN>) {
|
||||
chomp;
|
||||
print DBG "...Read: $_\n" if $dbg;
|
||||
next if /^\s*$/; # skip blank lines
|
||||
next if /^"shared net name"/; # skip titles
|
||||
next if /^"name","max","cur"/; # skip titles
|
||||
if (/^"Ranges/) { $where = 1; next; }
|
||||
if (/^"Shared/) { $where = 2; next; }
|
||||
if (/^"Sum of/) { $where = 3; next; }
|
||||
print DBG "...Found data for @where[$where]: $_\n" if $dbg;
|
||||
#
|
||||
# "Ranges:"
|
||||
# 0 1 2 3 4 5 6 7 8
|
||||
# "shared net name","1stIP","lastIP","max","cur","%","touch","t+c","t+c %"
|
||||
#
|
||||
# "Shared networks:" and "Sum of all ranges:"
|
||||
# 0 1 2 3 4 5 6
|
||||
# "name","max","cur","%","touch","t+c","t+c %"
|
||||
#
|
||||
my @data = split /,/;
|
||||
my ($nam, $max, $cur, $tou, $fir);
|
||||
($nam = @data[0]) =~ s/"//g; # shared net name
|
||||
|
||||
($fir = @data[1]) =~ s/"//g if ($where == 1); # Range ID (1st IP)
|
||||
|
||||
($max = @data[3]) =~ s/"//g if ($where == 1); # max # of IPs
|
||||
($max = @data[1]) =~ s/"//g if ($where > 1); # max # of IPs
|
||||
|
||||
($cur = @data[4]) =~ s/"//g if ($where == 1); # cur # of IPs
|
||||
($cur = @data[2]) =~ s/"//g if ($where > 1); # cur # of IPs
|
||||
|
||||
($tou = @data[6]) =~ s/"//g if ($where == 1); # touched IP's
|
||||
($tou = @data[4]) =~ s/"//g if ($where > 1); # touched IP's
|
||||
|
||||
|
||||
print DBG "...idx sh/rg=$shareindex/$rangeindex : nam=$nam : max=$max : cur=$cur : tou=$tou\n" if $dbg;
|
||||
|
||||
#
|
||||
# Summary data for each IP range
|
||||
#
|
||||
if ($where == 1) { # Store IP range data
|
||||
if (defined($RangeName{$fir})) {
|
||||
print DBG "...WARNING: duplicate name '$fir'\n" if $dbg
|
||||
}
|
||||
$IPRNindex[$rangeindex] = $fir;
|
||||
$RangeName{$fir} = pack("LLLL", $rangeindex, $max, $cur, $tou);
|
||||
$RangeContained{$fir} = $nam;
|
||||
push @validoidlist, "$root.2.$rangeindex"; # IP range name
|
||||
push @validoidlist, "$root.3.$rangeindex"; # Contained In
|
||||
push @validoidlist, "$root.5.1.$rangeindex"; # range stats
|
||||
push @validoidlist, "$root.5.2.$rangeindex"; # range stats
|
||||
push @validoidlist, "$root.5.3.$rangeindex"; # range stats
|
||||
$rangeindex++;
|
||||
}
|
||||
|
||||
#
|
||||
# Summary data for each Shared network
|
||||
#
|
||||
if ($where == 2) { # Store Shared network summary data
|
||||
if (defined($SharedNetwork{$nam})) {
|
||||
print DBG "...WARNING: duplicate name '$nam'\n" if $dbg
|
||||
}
|
||||
$SNNindex[$shareindex] = $nam;
|
||||
$SharedNetwork{$nam} = pack("LLLL", $shareindex, $max, $cur, $tou);
|
||||
push @validoidlist, "$root.1.$shareindex"; # shared name
|
||||
push @validoidlist, "$root.4.1.$shareindex"; # shared stats
|
||||
push @validoidlist, "$root.4.2.$shareindex"; # shared stats
|
||||
push @validoidlist, "$root.4.3.$shareindex"; # shared stats
|
||||
$shareindex++;
|
||||
}
|
||||
|
||||
#
|
||||
# Summary data for everything
|
||||
#
|
||||
if ($where == 3) { # Store "All" network summary data
|
||||
print DBG "...We don't store 'All' info yet!\n" if $dbg;
|
||||
}
|
||||
}
|
||||
close IN;
|
||||
if ($dbg) {
|
||||
foreach (sort Oidcmp @validoidlist) { print DBG "ValidOID: $_\n"; }
|
||||
}
|
||||
|
||||
if ($dbg) {
|
||||
foreach (@IPRNindex) {
|
||||
print DBG "IP range $_\n";
|
||||
}
|
||||
foreach (@SNNindex) {
|
||||
print DBG "Shared Net $_\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
#############################################################################
|
||||
#############################################################################
|
||||
# Forward Declarations
|
||||
#
|
||||
sub SendReturnNone ();
|
||||
sub SendReturn($$$);
|
||||
|
||||
#
|
||||
# GetData gets data, but will leverage caching of data if last parse was
|
||||
# over 60 seconds ago
|
||||
#
|
||||
my $lasttime = 0;
|
||||
sub GetData ($) {
|
||||
my $oid = shift;
|
||||
|
||||
(my $suboid = $oid) =~ s/$root//;
|
||||
|
||||
#
|
||||
# If enough time has elapsed, go fetch fresh data, otherwise use cached
|
||||
# data
|
||||
#
|
||||
print DBG "GetData: Time is: ", time, " : oid $oid->$suboid\n" if $dbg;
|
||||
if ((time - $lasttime) > $cachetime) {
|
||||
ParseDataFile();
|
||||
$lasttime = time;
|
||||
}
|
||||
|
||||
#
|
||||
# Quick sanity check of OID string:
|
||||
#
|
||||
if ( (!($oid =~ /^$root/)) ||
|
||||
($suboid eq '') ) {
|
||||
SendReturnNone();
|
||||
return;
|
||||
}
|
||||
|
||||
#
|
||||
# split the remaining OID pieces to analyse
|
||||
#
|
||||
my @oidlist = split(/\./, $suboid);
|
||||
|
||||
###################### EDIT THIS FOR YOUR APPLICATION ######################
|
||||
#
|
||||
# If we only get a single value, then barf (we need 2)
|
||||
#
|
||||
my $good = 0;
|
||||
$good = 1 if (($oidlist[1] eq '1') && ($#oidlist == 2)); # shared name
|
||||
$good = 1 if (($oidlist[1] eq '2') && ($#oidlist == 2)); # ip range name
|
||||
$good = 1 if (($oidlist[1] eq '3') && ($#oidlist == 2)); # contained in
|
||||
$good = 1 if (($oidlist[1] eq '4') && ($#oidlist == 3)); # shared-range stats
|
||||
$good = 1 if (($oidlist[1] eq '5') && ($#oidlist == 3)); # ip-range stats
|
||||
|
||||
if (!$good) {
|
||||
print DBG "oidlistcount = $#oidlist and oidlist1 is ", $oidlist[1], "\n" if $dbg;
|
||||
SendReturnNone();
|
||||
return;
|
||||
}
|
||||
|
||||
# $oidlist[1] = 1-5
|
||||
# $oidlist[2] = index for shared-name or range-name
|
||||
# or datatype to return
|
||||
# $oidlist[3] = index for datatype
|
||||
#
|
||||
if ($oidlist[1] eq '1') { # looking for name associated with shared net
|
||||
SendReturn($oid, 'string', $SNNindex[$oidlist[2]]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($oidlist[1] eq '2') { # looking for name associated with ip range
|
||||
print DBG "Responding with IPRNindex[$oidlist[2]]\n" if $dbg;
|
||||
SendReturn($oid, 'string', $IPRNindex[$oidlist[2]]);
|
||||
return;
|
||||
}
|
||||
|
||||
if ($oidlist[1] eq '3') { # looking for contained-in info
|
||||
if (defined($IPRNindex[$oidlist[2]])) { # valid subnet!
|
||||
my $fir = $IPRNindex[$oidlist[2]];
|
||||
my $con = $RangeContained{$fir};
|
||||
my @vals= unpack("LLLL", $SharedNetwork{$con});
|
||||
print DBG "fir=$fir : con=$con : vals=@vals : vals0=$vals[0]\n" if $dbg;
|
||||
SendReturn($oid, 'integer', @vals[0]);
|
||||
return;
|
||||
} else {
|
||||
SendReturnNone();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($oidlist[1] eq '4') {
|
||||
if (defined($SNNindex[$oidlist[3]])) { # valid subnet!
|
||||
my $nam = $SNNindex[$oidlist[3]];
|
||||
my @vals= unpack("LLLL", $SharedNetwork{$nam});
|
||||
print DBG "nam=$nam, vals=@vals, oidlist[2]=$oidlist[2]\n" if $dbg;
|
||||
SendReturn($oid, 'integer', @vals[$oidlist[2]]);
|
||||
return;
|
||||
} else {
|
||||
print DBG "invalid subnet SNN $oidlist[3]\n" if $dbg;
|
||||
SendReturnNone();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if ($oidlist[1] eq '5') {
|
||||
if (defined($IPRNindex[$oidlist[3]])) { # valid subnet!
|
||||
my $fir = $IPRNindex[$oidlist[3]];
|
||||
my @vals= unpack("LLLL", $RangeName{$fir});
|
||||
print DBG "fir=$fir, vals=@vals, oidlist[2]=", $oidlist[2], "\n" if $dbg;
|
||||
SendReturn($oid, 'integer', @vals[$oidlist[2]]);
|
||||
return;
|
||||
} else {
|
||||
print DBG "invalid subnet IPRN $oidlist[3]\n" if $dbg;
|
||||
SendReturnNone();
|
||||
return;
|
||||
}
|
||||
}
|
||||
################## END EDIT THIS FOR YOUR APPLICATION ######################
|
||||
}
|
||||
|
||||
#############################################################################
|
||||
#############################################################################
|
||||
#############################################################################
|
||||
#
|
||||
# From here down the routines should NEVER change
|
||||
#
|
||||
#
|
||||
# SNMP-specific routines
|
||||
#
|
||||
|
||||
{ ######## limit scope for some variable
|
||||
#
|
||||
# Compare looks at the OID validoid and userquery
|
||||
# and returns +1 if userquery > validoid
|
||||
# and returns -1 if userquery < validoid
|
||||
# and returns 0 if userquery = validoid
|
||||
#
|
||||
my @validoid;
|
||||
my @userquery;
|
||||
sub Compare () {
|
||||
my $i=1;
|
||||
while (($i <= $#validoid) && ($i <= $#userquery)) {
|
||||
# print DBG "Comparing $validoid[$i] vs $userquery[$i]\n" if $dbg;
|
||||
if ($userquery[$i] > $validoid[$i]) { return +1; }
|
||||
if ($userquery[$i] < $validoid[$i]) { return -1; }
|
||||
$i++;
|
||||
}
|
||||
$i--;
|
||||
my $returnval = 0;
|
||||
$returnval = +1 if (($i < $#userquery) && ($i == $#validoid));
|
||||
$returnval = -1 if (($i == $#userquery) && ($i < $#validoid));
|
||||
return $returnval;
|
||||
}
|
||||
|
||||
#
|
||||
# FindNext looks through the list of validoid's trying to find the Next
|
||||
# oid after $oid (aka @userquery)
|
||||
#
|
||||
sub FindNext ($) {
|
||||
my $userqueryoid = shift;
|
||||
print DBG "FindNext($userqueryoid)\n" if $dbg;
|
||||
my $next = $validoidlist[0];
|
||||
|
||||
@userquery = split (/\./, $userqueryoid);
|
||||
my $found = 0;
|
||||
foreach (sort Oidcmp @validoidlist) {
|
||||
$next = $_;
|
||||
print DBG "Comparing $userqueryoid vs. $_\n" if $dbg;
|
||||
@validoid = split (/\./, $_);
|
||||
my $x = Compare();
|
||||
if ($x < 0) {
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
if (!$found) { return undef; }
|
||||
|
||||
print DBG "Returning $next as next valid OID\n" if $dbg;
|
||||
return $next;
|
||||
}
|
||||
|
||||
} ######### end scope limit
|
||||
|
||||
sub SendReturnNone () {
|
||||
print "NONE\n";
|
||||
print DBG "Sent NONE\n" if $dbg;
|
||||
}
|
||||
|
||||
sub SendReturn($$$) {
|
||||
printf "%s\n%s\n%s\n", shift, shift, shift;
|
||||
}
|
||||
|
||||
my $line=0;
|
||||
sub Get ($$) {
|
||||
my $cmd = shift;
|
||||
my $oid = shift;
|
||||
GetData($oid);
|
||||
$line = 0;
|
||||
}
|
||||
|
||||
sub GetNext ($$) {
|
||||
my $cmd = shift;
|
||||
my $oid = shift;
|
||||
$oid = FindNext($oid);
|
||||
if (defined($oid)) {
|
||||
GetData($oid);
|
||||
} else {
|
||||
SendReturnNone();
|
||||
}
|
||||
$line = 0;
|
||||
}
|
||||
|
||||
sub Set ($$$) {
|
||||
my $cmd = shift;
|
||||
my $oid = shift;
|
||||
my $tv = shift;
|
||||
print "not-writable\n"; # we don't support snmpset
|
||||
print DBG "Sent not-writable\n" if $dbg;
|
||||
$line = 0;
|
||||
}
|
||||
|
||||
sub Pong {
|
||||
print "PONG\n";
|
||||
print DBG "PONG Sent\n" if $dbg;
|
||||
$line = 0;
|
||||
}
|
||||
|
||||
sub Oidcmp {
|
||||
my $oida = new NetSNMP::OID($a);
|
||||
my $oidb = new NetSNMP::OID($b);
|
||||
snmp_oid_compare($oida, $oidb);
|
||||
}
|
||||
|
||||
################################## START ##################################
|
||||
#
|
||||
# Main
|
||||
#
|
||||
|
||||
select((select(STDOUT), $| = 1)[0]);
|
||||
|
||||
if ($dbg) {
|
||||
open(DBG, ">/tmp/snmp.dbg") || die ("Can't open debug!");
|
||||
select((select(DBG), $| = 1)[0]);
|
||||
print DBG "Version $VERSION\n";
|
||||
}
|
||||
|
||||
# Initialize Data
|
||||
ParseDataFile();
|
||||
|
||||
my $cmd;
|
||||
my $oid;
|
||||
my $tv;
|
||||
while (<STDIN>) {
|
||||
$line++;
|
||||
chomp;
|
||||
s/ //g;
|
||||
tr/A-Z/a-z/;
|
||||
printf DBG "%3d '%s'\n", $line, $_ if $dbg;
|
||||
last if ($_ eq '');
|
||||
$cmd = $_ if ($line == 1);
|
||||
$oid = $_ if ($line == 2);
|
||||
$tv = $_ if ($line == 3);
|
||||
Pong() if ($cmd eq 'ping');
|
||||
Get($cmd, $oid) if (($cmd eq 'get') && ($line == 2));
|
||||
GetNext($cmd, $oid) if (($cmd eq 'getnext') && ($line == 2));
|
||||
Set($cmd, $oid, $tv) if (($cmd eq 'set') && ($line == 3));
|
||||
}
|
||||
|
||||
print DBG "Clean Exit\n" if $dbg;
|
||||
close DBG if $dbg;
|
||||
exit 0;
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
Zabbix 5 template, and instructions how to use it, can be found from
|
||||
Mathieu's repository.
|
||||
|
||||
https://github.com/mmorier86/dhcpd-pools-zabbix-template
|
||||
530
depcomp
Executable file
530
depcomp
Executable file
|
|
@ -0,0 +1,530 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2005-07-09.11
|
||||
|
||||
# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, 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 Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by `PROGRAMS ARGS'.
|
||||
object Object file output by `PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputing dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say).
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
|
||||
## The second -e expression handles DOS-style file names with drive letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the `deleted header file' problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" |
|
||||
## Some versions of gcc put a space before the `:'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like `#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
|
||||
tr '
|
||||
' ' ' >> $depfile
|
||||
echo >> $depfile
|
||||
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> $depfile
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts `$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
|
||||
tmpdepfile="$stripped.u"
|
||||
if test "$libtool" = yes; then
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
|
||||
if test -f "$tmpdepfile"; then :
|
||||
else
|
||||
stripped=`echo "$stripped" | sed 's,^.*/,,'`
|
||||
tmpdepfile="$stripped.u"
|
||||
fi
|
||||
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
if test -f "$tmpdepfile"; then
|
||||
outname="$stripped.o"
|
||||
# Each line is of the form `foo.o: dependent.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
# The sourcefile does not contain any dependencies, so just
|
||||
# store a dummy comment line, to avoid errors with the Makefile
|
||||
# "include basename.Plo" scheme.
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
icc)
|
||||
# Intel's C compiler understands `-MD -MF file'. However on
|
||||
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
|
||||
# ICC 7.0 will fill foo.d with something like
|
||||
# foo.o: sub/foo.c
|
||||
# foo.o: sub/foo.h
|
||||
# which is wrong. We want:
|
||||
# sub/foo.o: sub/foo.c
|
||||
# sub/foo.o: sub/foo.h
|
||||
# sub/foo.c:
|
||||
# sub/foo.h:
|
||||
# ICC 7.1 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using \ :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
|
||||
sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in `foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
|
||||
test "x$dir" = "x$object" && dir=
|
||||
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# With Tru64 cc, shared objects can also be used to make a
|
||||
# static library. This mecanism is used in libtool 1.4 series to
|
||||
# handle both shared and static libraries in a single compilation.
|
||||
# With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
|
||||
#
|
||||
# With libtool 1.5 this exception was removed, and libtool now
|
||||
# generates 2 separate objects for the 2 libraries. These two
|
||||
# compilations output dependencies in in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
|
||||
tmpdepfile2=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
|
||||
tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.o.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
tmpdepfile4=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -eq 0; then :
|
||||
else
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
|
||||
# That's a tab and a space in the [].
|
||||
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
echo "#dummy" > "$depfile"
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for `:'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
tr ' ' '
|
||||
' < "$tmpdepfile" | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no
|
||||
for arg in "$@"; do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix="`echo $object | sed 's/^.*\././'`"
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
sed '1,2d' "$tmpdepfile" | tr ' ' '
|
||||
' | \
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test $1 != '--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove `-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E |
|
||||
sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
|
||||
sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o,
|
||||
# because we must use -o when running libtool.
|
||||
"$@" || exit $?
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
|
||||
echo " " >> "$depfile"
|
||||
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
3
doc/.gitignore
vendored
3
doc/.gitignore
vendored
|
|
@ -1,3 +0,0 @@
|
|||
/doxy.conf
|
||||
/doxyfile.stamp
|
||||
/html
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
PATHFILES += \
|
||||
doc/doxy.conf
|
||||
nodist_noinst_DATA = \
|
||||
doc/doxy.conf
|
||||
|
||||
EXTRA_DIST += \
|
||||
doc/introduction.dox
|
||||
|
||||
if ENABLE_DOXYGEN
|
||||
|
||||
doc/doxyfile.stamp:
|
||||
$(DOXYGEN) doc/doxy.conf
|
||||
date > doc/doxyfile.stamp
|
||||
|
||||
CLEANFILES += doc/doxyfile.stamp
|
||||
|
||||
all-local: doc/doxyfile.stamp
|
||||
|
||||
clean-local-doc:
|
||||
-rm -rf doc/*html
|
||||
|
||||
CLEAN_LOCALS += clean-local-doc
|
||||
|
||||
endif
|
||||
2424
doc/doxy.conf.in
2424
doc/doxy.conf.in
File diff suppressed because it is too large
Load diff
|
|
@ -1,49 +0,0 @@
|
|||
/*!
|
||||
@mainpage
|
||||
@section introduction Introduction
|
||||
|
||||
This is dhcpd-pools ISC dhcp shared network and pool range usage
|
||||
analysis. Purpose of command is to count usage ratio of each IP range
|
||||
and shared network pool which ISC dhcpd is in control of. Users of the
|
||||
command are most likely ISPs and other organizations that have large IP
|
||||
space.
|
||||
|
||||
Program is written C. Design goal is to get analysis done quickly where
|
||||
there is lots of data. On cheap laptop the speed of analysis is roughly
|
||||
100k leases per second. Number of ranges, or shared networks, does not
|
||||
make any significant difference in getting analysis done.
|
||||
|
||||
@section main-copyright Copyright Policy
|
||||
|
||||
The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
BSD License" or "FreeBSD License".
|
||||
|
||||
Copyright 2006- Sami Kerola. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
The views and conclusions contained in the software and documentation are
|
||||
those of the authors and should not be interpreted as representing
|
||||
official policies, either expressed or implied, of Sami Kerola.
|
||||
|
||||
*/
|
||||
323
install-sh
Executable file
323
install-sh
Executable file
|
|
@ -0,0 +1,323 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2005-05-14.22
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# `make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch. 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}"
|
||||
|
||||
chmodcmd="$chmodprog 0755"
|
||||
chowncmd=
|
||||
chgrpcmd=
|
||||
stripcmd=
|
||||
rmcmd="$rmprog -f"
|
||||
mvcmd="$mvprog"
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dstarg=
|
||||
no_target_directory=
|
||||
|
||||
usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
-c (ignored)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test -n "$1"; do
|
||||
case $1 in
|
||||
-c) shift
|
||||
continue;;
|
||||
|
||||
-d) dir_arg=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) chmodcmd="$chmodprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-s) stripcmd=$stripprog
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-t) dstarg=$2
|
||||
shift
|
||||
shift
|
||||
continue;;
|
||||
|
||||
-T) no_target_directory=true
|
||||
shift
|
||||
continue;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
*) # When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
test -n "$dir_arg$dstarg" && break
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dstarg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dstarg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dstarg=$arg
|
||||
done
|
||||
break;;
|
||||
esac
|
||||
done
|
||||
|
||||
if test -z "$1"; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call `install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names starting with `-'.
|
||||
case $src in
|
||||
-*) src=./$src ;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
src=
|
||||
|
||||
if test -d "$dst"; then
|
||||
mkdircmd=:
|
||||
chmodcmd=
|
||||
else
|
||||
mkdircmd=$mkdirprog
|
||||
fi
|
||||
else
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dstarg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dst=$dstarg
|
||||
# Protect names starting with `-'.
|
||||
case $dst in
|
||||
-*) dst=./$dst ;;
|
||||
esac
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dstarg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst/`basename "$src"`
|
||||
fi
|
||||
fi
|
||||
|
||||
# This sed command emulates the dirname command.
|
||||
dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'`
|
||||
|
||||
# Make sure that the destination directory exists.
|
||||
|
||||
# Skip lots of stat calls in the usual case.
|
||||
if test ! -d "$dstdir"; then
|
||||
defaultIFS='
|
||||
'
|
||||
IFS="${IFS-$defaultIFS}"
|
||||
|
||||
oIFS=$IFS
|
||||
# Some sh's can't handle IFS=/ for some reason.
|
||||
IFS='%'
|
||||
set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
|
||||
shift
|
||||
IFS=$oIFS
|
||||
|
||||
pathcomp=
|
||||
|
||||
while test $# -ne 0 ; do
|
||||
pathcomp=$pathcomp$1
|
||||
shift
|
||||
if test ! -d "$pathcomp"; then
|
||||
$mkdirprog "$pathcomp"
|
||||
# mkdir can fail with a `File exist' error in case several
|
||||
# install-sh are creating the directory concurrently. This
|
||||
# is OK.
|
||||
test -d "$pathcomp" || exit
|
||||
fi
|
||||
pathcomp=$pathcomp/
|
||||
done
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
$doit $mkdircmd "$dst" \
|
||||
&& { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
|
||||
|
||||
else
|
||||
dstfile=`basename "$dst"`
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
trap '(exit $?); exit' 1 2 13 15
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
$doit $cpprog "$src" "$dsttmp" &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
|
||||
&& { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
|
||||
&& { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
|
||||
&& { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
{ $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| {
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
if test -f "$dstdir/$dstfile"; then
|
||||
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
|
||||
|| $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
|
||||
|| {
|
||||
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
else
|
||||
:
|
||||
fi
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
|
||||
}
|
||||
}
|
||||
fi || { (exit 1); exit 1; }
|
||||
done
|
||||
|
||||
# The final little trick to "correctly" pass the exit status to the exit trap.
|
||||
{
|
||||
(exit 0); exit 0
|
||||
}
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
262
lib/.gitignore
vendored
262
lib/.gitignore
vendored
|
|
@ -1,262 +0,0 @@
|
|||
/alloca.h
|
||||
/alloca.in.h
|
||||
/arg-nonnull.h
|
||||
/arpa/
|
||||
/arpa_inet.c
|
||||
/arpa_inet.in.h
|
||||
/assert.in.h
|
||||
/attribute.h
|
||||
/basename-lgpl.c
|
||||
/basename-lgpl.h
|
||||
/c32is-impl.h
|
||||
/c32isprint.c
|
||||
/calloc.c
|
||||
/c-ctype.c
|
||||
/c-ctype.h
|
||||
/c++defs.h
|
||||
/cdefs.h
|
||||
/cloexec.c
|
||||
/cloexec.h
|
||||
/close.c
|
||||
/closeout.c
|
||||
/closeout.h
|
||||
/close-stream.c
|
||||
/close-stream.h
|
||||
/c-strcasecmp.c
|
||||
/c-strcaseeq.h
|
||||
/c-strcase.h
|
||||
/c-strncasecmp.c
|
||||
/dup2.c
|
||||
/errno.in.h
|
||||
/error.c
|
||||
/error.h
|
||||
/error.in.h
|
||||
/exitfail.c
|
||||
/exitfail.h
|
||||
/fclose.c
|
||||
/fcntl.c
|
||||
/fcntl.h
|
||||
/fcntl.in.h
|
||||
/fd-hook.c
|
||||
/fd-hook.h
|
||||
/fdopen.c
|
||||
/fflush.c
|
||||
/filename.h
|
||||
/flexmember.h
|
||||
/float.c
|
||||
/float+.h
|
||||
/float.h
|
||||
/float.in.h
|
||||
/fopen.c
|
||||
/fpending.c
|
||||
/fpending.h
|
||||
/fpurge.c
|
||||
/freading.c
|
||||
/freading.h
|
||||
/free.c
|
||||
/fseek.c
|
||||
/fseeko.c
|
||||
/fstat.c
|
||||
/ftell.c
|
||||
/ftello.c
|
||||
/getdtablesize.c
|
||||
/getlocalename_l-unsafe.c
|
||||
/getlocalename_l-unsafe.h
|
||||
/getopt1.c
|
||||
/getopt.c
|
||||
/getopt-cdefs.in.h
|
||||
/getopt-core.h
|
||||
/getopt-ext.h
|
||||
/getopt.in.h
|
||||
/getopt_int.h
|
||||
/getopt-pfx-core.h
|
||||
/getopt-pfx-ext.h
|
||||
/getprogname.c
|
||||
/getprogname.h
|
||||
/gettext.h
|
||||
/hard-locale.c
|
||||
/hard-locale.h
|
||||
/ialloc.c
|
||||
/ialloc.h
|
||||
/idx.h
|
||||
/inet_pton.c
|
||||
/intprops.h
|
||||
/intprops-internal.h
|
||||
/inttypes.h
|
||||
/inttypes.in.h
|
||||
/isnan.c
|
||||
/isnand.c
|
||||
/isnanf.c
|
||||
/isnanl.c
|
||||
/itold.c
|
||||
/lc-charset-dispatch.c
|
||||
/lc-charset-dispatch.h
|
||||
/libc-config.h
|
||||
/libdhcpd_pools.la
|
||||
/libdhcpd_pools_la-arpa_inet.lo
|
||||
/libdhcpd_pools_la-basename-lgpl.lo
|
||||
/libdhcpd_pools_la-c32isprint.lo
|
||||
/libdhcpd_pools_la-c-ctype.lo
|
||||
/libdhcpd_pools_la-cloexec.lo
|
||||
/libdhcpd_pools_la-closeout.lo
|
||||
/libdhcpd_pools_la-close-stream.lo
|
||||
/libdhcpd_pools_la-c-strcasecmp.lo
|
||||
/libdhcpd_pools_la-exitfail.lo
|
||||
/libdhcpd_pools_la-fclose.lo
|
||||
/libdhcpd_pools_la-fcntl.lo
|
||||
/libdhcpd_pools_la-fd-hook.lo
|
||||
/libdhcpd_pools_la-fflush.lo
|
||||
/libdhcpd_pools_la-float.lo
|
||||
/libdhcpd_pools_la-fopen.lo
|
||||
/libdhcpd_pools_la-fpurge.lo
|
||||
/libdhcpd_pools_la-freading.lo
|
||||
/libdhcpd_pools_la-fseek.lo
|
||||
/libdhcpd_pools_la-fseeko.lo
|
||||
/libdhcpd_pools_la-getprogname.lo
|
||||
/libdhcpd_pools_la-hard-locale.lo
|
||||
/libdhcpd_pools_la-ialloc.lo
|
||||
/libdhcpd_pools_la-localcharset.lo
|
||||
/libdhcpd_pools_la-malloca.lo
|
||||
/libdhcpd_pools_la-math.lo
|
||||
/libdhcpd_pools_la-mbrtoc32.lo
|
||||
/libdhcpd_pools_la-mbrtowc.lo
|
||||
/libdhcpd_pools_la-mbszero.lo
|
||||
/libdhcpd_pools_la-mktime.lo
|
||||
/libdhcpd_pools_la-nstrftime.lo
|
||||
/libdhcpd_pools_la-progname.lo
|
||||
/libdhcpd_pools_la-quotearg.lo
|
||||
/libdhcpd_pools_la-reallocarray.lo
|
||||
/libdhcpd_pools_la-realloc.lo
|
||||
/libdhcpd_pools_la-setlocale_null.lo
|
||||
/libdhcpd_pools_la-setlocale_null-unlocked.lo
|
||||
/libdhcpd_pools_la-stat-time.lo
|
||||
/libdhcpd_pools_la-stdlib.lo
|
||||
/libdhcpd_pools_la-sys_socket.lo
|
||||
/libdhcpd_pools_la-timegm.lo
|
||||
/libdhcpd_pools_la-time_rz.lo
|
||||
/libdhcpd_pools_la-unistd.lo
|
||||
/libdhcpd_pools_la-wctype-h.lo
|
||||
/libdhcpd_pools_la-xalloc-die.lo
|
||||
/libdhcpd_pools_la-xmalloc.lo
|
||||
/.libs/
|
||||
/limits.h
|
||||
/limits.in.h
|
||||
/localcharset.c
|
||||
/localcharset.h
|
||||
/locale.h
|
||||
/locale.in.h
|
||||
/localename.h
|
||||
/localename-unsafe.c
|
||||
/lseek.c
|
||||
/Makefile.am
|
||||
/malloca.c
|
||||
/malloca.h
|
||||
/malloc.c
|
||||
/math.c
|
||||
/math.h
|
||||
/math.in.h
|
||||
/mbrtoc32.c
|
||||
/mbrtowc.c
|
||||
/mbrtowc-impl.h
|
||||
/mbrtowc-impl-utf8.h
|
||||
/mbsinit.c
|
||||
/mbszero.c
|
||||
/mbtowc-lock.c
|
||||
/mbtowc-lock.h
|
||||
/memchr.c
|
||||
/memchr.valgrind
|
||||
/minmax.h
|
||||
/mktime.c
|
||||
/mktime-internal.h
|
||||
/msvc-inval.c
|
||||
/msvc-inval.h
|
||||
/msvc-nothrow.c
|
||||
/msvc-nothrow.h
|
||||
/netinet_in.in.h
|
||||
/_Noreturn.h
|
||||
/nstrftime.c
|
||||
/open.c
|
||||
/pathmax.h
|
||||
/progname.c
|
||||
/progname.h
|
||||
/quotearg.c
|
||||
/quotearg.h
|
||||
/quote.h
|
||||
/reallocarray.c
|
||||
/realloc.c
|
||||
/setenv.c
|
||||
/setlocale-lock.c
|
||||
/setlocale_null.c
|
||||
/setlocale_null.h
|
||||
/setlocale_null-unlocked.c
|
||||
/stat.c
|
||||
/stat-time.c
|
||||
/stat-time.h
|
||||
/stat-w32.c
|
||||
/stat-w32.h
|
||||
/stdckdint.h
|
||||
/stdckdint.in.h
|
||||
/stddef.h
|
||||
/stddef.in.h
|
||||
/stdint.in.h
|
||||
/stdio.h
|
||||
/stdio-impl.h
|
||||
/stdio.in.h
|
||||
/stdio-read.c
|
||||
/stdio-write.c
|
||||
/stdlib.c
|
||||
/stdlib.h
|
||||
/stdlib.in.h
|
||||
/stpncpy.c
|
||||
/strdup.c
|
||||
/streq.h
|
||||
/strerror.c
|
||||
/strerror-override.c
|
||||
/strerror-override.h
|
||||
/strftime.c
|
||||
/strftime.h
|
||||
/string.h
|
||||
/string.in.h
|
||||
/strstr.c
|
||||
/strtod.c
|
||||
/str-two-way.h
|
||||
/sys/
|
||||
/sys_socket.c
|
||||
/sys_socket.in.h
|
||||
/sys_stat.in.h
|
||||
/sys_types.in.h
|
||||
/sys_uio.in.h
|
||||
/timegm.c
|
||||
/time.h
|
||||
/time.in.h
|
||||
/time-internal.h
|
||||
/time_r.c
|
||||
/time_rz.c
|
||||
/tzset.c
|
||||
/uchar.h
|
||||
/uchar.in.h
|
||||
/unictype/
|
||||
/unictype/bitmap.h
|
||||
/unictype/ctype_print.c
|
||||
/unictype/ctype_print.h
|
||||
/unictype/.gitignore
|
||||
/unictype.h
|
||||
/unictype.in.h
|
||||
/unistd.c
|
||||
/unistd.h
|
||||
/unistd.in.h
|
||||
/unitypes.h
|
||||
/unitypes.in.h
|
||||
/unsetenv.c
|
||||
/verify.h
|
||||
/warn-on-use.h
|
||||
/wchar.h
|
||||
/wchar.in.h
|
||||
/wctype.h
|
||||
/wctype-h.c
|
||||
/wctype.in.h
|
||||
/windows-initguard.h
|
||||
/xalloc-die.c
|
||||
/xalloc.h
|
||||
/xalloc-oversized.h
|
||||
/xmalloc.c
|
||||
12
man/Makefile.am
Normal file
12
man/Makefile.am
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
## Process this file with automake to produce Makefile.in
|
||||
|
||||
man_MANS = dhcpd-pools.1
|
||||
HELP2MAN = help2man
|
||||
noinst_SCRIPTS = $(HELP2MAN)
|
||||
|
||||
EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) # $(man_aux)
|
||||
|
||||
dhcpd-pools.1: ../src/dhcpd-pools $(HELP2MAN)
|
||||
$(PERL) $(HELP2MAN) --name="Friendly Greeting Program" ../src/dhcpd-pools >$@
|
||||
|
||||
MAINTAINERCLEANFILES = $(man_MANS)
|
||||
341
man/Makefile.in
Normal file
341
man/Makefile.in
Normal file
|
|
@ -0,0 +1,341 @@
|
|||
# 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@
|
||||
|
||||
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 = :
|
||||
subdir = man
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SCRIPTS = $(noinst_SCRIPTS)
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
man1dir = $(mandir)/man1
|
||||
am__installdirs = "$(DESTDIR)$(man1dir)"
|
||||
NROFF = nroff
|
||||
MANS = $(man_MANS)
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
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@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
dhcpd_conf = @dhcpd_conf@
|
||||
dhcpd_leases = @dhcpd_leases@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
output_format = @output_format@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
man_MANS = dhcpd-pools.1
|
||||
HELP2MAN = help2man
|
||||
noinst_SCRIPTS = $(HELP2MAN)
|
||||
EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) # $(man_aux)
|
||||
MAINTAINERCLEANFILES = $(man_MANS)
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign man/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: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-man1: $(man1_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)"
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) 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 \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
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)$(man1dir)/$$inst'"; \
|
||||
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
|
||||
done
|
||||
uninstall-man1:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
case "$$i" in \
|
||||
*.1*) list="$$list $$i" ;; \
|
||||
esac; \
|
||||
done; \
|
||||
for i in $$list; do \
|
||||
ext=`echo $$i | sed -e 's/^.*\\.//'`; \
|
||||
case "$$ext" in \
|
||||
1*) ;; \
|
||||
*) ext='1' ;; \
|
||||
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)$(man1dir)/$$inst'"; \
|
||||
rm -f "$(DESTDIR)$(man1dir)/$$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 $(SCRIPTS) $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man1dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(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)
|
||||
|
||||
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-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-man1
|
||||
|
||||
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-man1
|
||||
|
||||
.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-man1 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-man1
|
||||
|
||||
|
||||
dhcpd-pools.1: ../src/dhcpd-pools $(HELP2MAN)
|
||||
$(PERL) $(HELP2MAN) --name="Friendly Greeting Program" ../src/dhcpd-pools >$@
|
||||
# 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:
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
man_MANS = man/dhcpd-pools.1
|
||||
PATHFILES += man/dhcpd-pools.1
|
||||
61
man/dhcpd-pools.1
Normal file
61
man/dhcpd-pools.1
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
.\" Sami Kerola
|
||||
.\" http://www.iki.fi/kerolasa/
|
||||
.\" kerolasa@iki.fi
|
||||
.\"
|
||||
.TH DHCPD-POOLS 1 "Apr 20 2008 - version 2.3"
|
||||
.SH NAME
|
||||
dhcpd-pools \- ISC dhcp pools usage analysis
|
||||
.SH SYNOPSIS
|
||||
.B dhcpd-pools
|
||||
[-c file] [-l file] [-f thc] [-o file] [-v] [-h]
|
||||
.SH DESCRIPTION
|
||||
The program counts ISC dhcp shared network and pool usage
|
||||
analysis and outputs it in choosen format.
|
||||
.SH ARGUMENTS
|
||||
.TP
|
||||
.I "\-c, \-\-config"
|
||||
Path to the dhcpd.conf file.
|
||||
.TP
|
||||
.I "\-l, \-\-leases"
|
||||
Path to the dhcpd.leases file.
|
||||
.TP
|
||||
.I "\-f, \-\-format"
|
||||
Output format. Currently there is text, html and csv
|
||||
(comma-separated values). Default is text.
|
||||
.TP
|
||||
.I "\-o, \-\-output"
|
||||
File where output is directed. Default is stdout.
|
||||
.TP
|
||||
.I "\-L, \-\-limit"
|
||||
Limit what is printed. Syntax is similar to chmod permission
|
||||
string. This limit string has two meaningful digits which can be
|
||||
between 0 and 7. First digit limits output of headers and second
|
||||
numeric analysis tables.
|
||||
.TP
|
||||
.I "\-v, \-\-version"
|
||||
Print version information to standard output and exit successfully.
|
||||
.TP
|
||||
.I "\-h, \-\-help"
|
||||
Print help to standard output and exit successfully.
|
||||
.SH FILES
|
||||
.if n .ta 2.8i
|
||||
.if t .ta 2.1i
|
||||
/etc/dhcpd.conf
|
||||
.br
|
||||
ISC dhcpd configuration file.
|
||||
.br
|
||||
.br
|
||||
/var/lib/dhcp/dhcpd.leases
|
||||
.br
|
||||
ISC dhcpd lease file.
|
||||
.SH BUGS
|
||||
Not known but plenty of missing features. See TODO file in source
|
||||
distribution.
|
||||
.SH AUTHOR
|
||||
Sami Kerola <kerolasa@iki.fi>
|
||||
.br
|
||||
http://dhcpd-pools.sourceforge.net/
|
||||
.SH "SEE ALSO"
|
||||
.BR dhcpd.leases (5),
|
||||
.BR dhcpd.conf (5),
|
||||
.BR chmod (1)
|
||||
|
|
@ -1,329 +0,0 @@
|
|||
'\" t
|
||||
.TH DHCPD-POOLS "1" "2024-08-09" "@VERSION@" "User Commands"
|
||||
.SH NAME
|
||||
dhcpd-pools \- ISC dhcpd pools usage analysis
|
||||
.SH SYNOPSIS
|
||||
.SY dhcpd-pools
|
||||
.OP \-\-config file
|
||||
.OP \-\-leases file
|
||||
.OP \-\-sort nimcptTe
|
||||
.OP \-\-reverse
|
||||
.OP \-\-format tHcxXjJ
|
||||
.OP \-\-mustach template
|
||||
.OP \-\-output file
|
||||
.OP \-\-limit nr
|
||||
.OP \-\-color when
|
||||
.OP \-\-warning percent
|
||||
.OP \-\-critical percent
|
||||
.OP \-\-warn\-count number
|
||||
.OP \-\-crit\-count number
|
||||
.OP \-\-snet\-alarms
|
||||
.OP \-\-minsize size
|
||||
.OP \-\-perfdata
|
||||
.OP \-\-version
|
||||
.OP \-\-help
|
||||
.YS
|
||||
.SH DESCRIPTION
|
||||
The program analyses ISC dhcpd shared network and pool usage and outputs the
|
||||
results in a format selected by user.
|
||||
.SH OUTPUT FIELDS
|
||||
.TP
|
||||
.I "shared net name"
|
||||
Name of the shared-network for the range.
|
||||
.TP
|
||||
.I "first ip"
|
||||
First IP in lease pool range.
|
||||
.TP
|
||||
.I "last ip"
|
||||
Last IP in lease pool range.
|
||||
.TP
|
||||
.I "max"
|
||||
Number of IPs which exist in a pool, shared network or all together.
|
||||
.TP
|
||||
.I "cur"
|
||||
Number of leases currently in use.
|
||||
.TP
|
||||
.I "percent"
|
||||
Percent of IPs currently in use compared to max.
|
||||
.TP
|
||||
.I "touch"
|
||||
Number of IP's which appear in the lease file, but who's leases have expired.
|
||||
A touched IP is either expired or abandoned. The touched IP count is
|
||||
somewhat misleading when you try to determine if an IP pool is big enough; it
|
||||
is a better indicator of whether a pool is too large.
|
||||
.TP
|
||||
.I "t+c"
|
||||
The sum of Touched and Currently in-use leases.
|
||||
.TP
|
||||
.I "t+c perc"
|
||||
Percent of IPs either touched or currently in use, compared to max.
|
||||
.TP
|
||||
.I "bu"
|
||||
Failover pair can allocate these addresses. The count appears only if there
|
||||
is failover configuration.
|
||||
.TP
|
||||
.I "bu perc"
|
||||
Percent of addresses that failover pair can allocate. The percent appears
|
||||
only if there is failover configuration.
|
||||
.SH OPTIONS
|
||||
.TP
|
||||
\fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
|
||||
Path to the dhcpd.conf file. If the dhcpd.conf has include files they
|
||||
can be analysed separately, that can be useful when trying to understand
|
||||
or monitor subset of data.
|
||||
.TP
|
||||
\fB\-l\fR, \fB\-\-leases\fR=\fIFILE\fR
|
||||
Path to the dhcpd.leases file.
|
||||
.TP
|
||||
\fB\-s\fR, \fB\-\-sort\fR=\fI[nimcptTe]\fR
|
||||
Sort ranges by chosen fields as a sorting keys. Keys weight from left to
|
||||
right, i.e., if more weighting keys are equal next one is used. The IP
|
||||
field is default sort key.
|
||||
.TP
|
||||
\fB\-r\fR, \fB\-\-reverse\fR
|
||||
Sort results in reverse order.
|
||||
.TP
|
||||
\fB\-f\fR, \fB\-\-format\fR=\fI[tHcxXjJ]\fR
|
||||
Output format.
|
||||
Text
|
||||
.RI ( t ).
|
||||
Full-html
|
||||
.RI ( H )
|
||||
page output. In html page critical and warning thresholds can be visualized
|
||||
with \-\-color=always option. The
|
||||
.RI ( c )
|
||||
stands for comma-separated values. Output format xml
|
||||
.RI ( x )
|
||||
is similar to the dhcpstatus Perl module output. The extended xml
|
||||
.RI ( X )
|
||||
format will print ethernet address details. The
|
||||
.RI ( j )
|
||||
will output in json format, which can be extended with
|
||||
.RI ( J )
|
||||
to include ethernet address.
|
||||
.IP
|
||||
The default format is
|
||||
.IR @OUTPUT_FORMAT@ .
|
||||
.TP
|
||||
\fB\-\-mustach\fR=\fITEMPLATE\fR
|
||||
Output using mustach
|
||||
.I template
|
||||
file. This is useful when the native output formats controlled with
|
||||
.B \-\-format
|
||||
option do not provide what you need. See below example mustach template
|
||||
that is using all available {{tags}} to demonstrate what can be displayed
|
||||
and how.
|
||||
.IP
|
||||
@bindir@/dhcpd-pools --config @docdir@/dhcpd.conf --leases
|
||||
@docdir@/dhcpd.leases --mustach @docdir@/mustach.template
|
||||
.TP
|
||||
\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
|
||||
.I File
|
||||
where output is written. Default is stdout.
|
||||
.TP
|
||||
\fB\-L\fR, \fB\-\-limit\fR=\fINR\fR
|
||||
The
|
||||
.I NR
|
||||
will limit what will be printed. Syntax is similar to
|
||||
.IR chmod (1)
|
||||
permission string. The
|
||||
.I NR
|
||||
limit string uses two digits which vary between
|
||||
.IR 0 \ to \ 7 .
|
||||
The first digit determines which headers to display, and the second digit
|
||||
determines which numeric analysis tables to include in the output. The
|
||||
following values are "OR'd" together to create the desired output. The
|
||||
default is
|
||||
.IR @OUTPUT_LIMIT@ .
|
||||
.IP
|
||||
.TS
|
||||
tab(:);
|
||||
ll.
|
||||
0\fI1\fR:Print ranges
|
||||
0\fI2\fR:Print shared networks
|
||||
0\fI4\fR:Print total summary
|
||||
\fI1\fR0:Print range header
|
||||
\fI2\fR0:Print shared network header
|
||||
\fI4\fR0:Print total summary header
|
||||
.TE
|
||||
.IP
|
||||
The output limit for total summary has special meaning in
|
||||
.B \-\-warning
|
||||
and
|
||||
.B \-\-critical
|
||||
alarming context. When the alarming is in use, and total is not wanted
|
||||
to be seen then in the case of alarming returning success nothing is
|
||||
printed.
|
||||
.TP
|
||||
\fB\-\-color\fR=\fIwhen\fR
|
||||
Use yellow for warning, red for critical, green for suppressed by \-\-minsize
|
||||
and blue when \-\-snet\-alarms is the cause of suppression or shared network
|
||||
does not have any ranges. The
|
||||
.I when
|
||||
string can be
|
||||
.BR always ,
|
||||
.BR never ,
|
||||
or
|
||||
.BR auto .
|
||||
Default is auto, that uses colors when command is running in interactive
|
||||
terminal. With use of
|
||||
.B \-\-warning
|
||||
or
|
||||
.B \-\-critical
|
||||
coloring thresholds can be changed, but one must also use
|
||||
.B \-\-format=text
|
||||
to avoid turning on alarting mode.
|
||||
.TP
|
||||
\fB\-\-skip\fR=\fIwhen\fR
|
||||
The
|
||||
.I when
|
||||
can be one of the following:
|
||||
.IR ok ,
|
||||
.IR warning ,
|
||||
.IR critical ,
|
||||
.IR minsize ,
|
||||
or
|
||||
.IR suppressed .
|
||||
The skipping criteria is exact match with colors in \-\-color option.
|
||||
.TP
|
||||
\fB\-\-warning\fR=\fIpercent\fR
|
||||
Turn on alarm output format, and specify percentage number which will
|
||||
cause an alarm. If either a range or shared network will exceed
|
||||
warning level return value of the command is
|
||||
.BR 1 .
|
||||
If only range monitoring is needed one can use limit option for scoping,
|
||||
for example
|
||||
.IR \-L10 .
|
||||
To monitor shared network only the limit would be
|
||||
.IR \-L20 .
|
||||
If warning percentage is not specified it defaults to
|
||||
.BR @ALARM_WARN@ .
|
||||
The
|
||||
.I percent
|
||||
argument allows fractions, e.g., 88.8, to be used.
|
||||
.TP
|
||||
\fB\-\-critical\fR=\fIpercent\fR
|
||||
The option is similar to warning, with exception of return value which
|
||||
is
|
||||
.BR 2 .
|
||||
If critical percentage is not specified it defaults to
|
||||
.BR @ALARM_CRIT@ .
|
||||
.TP
|
||||
\fB\-\-warn\-count\fR=\fInumber\fR
|
||||
A
|
||||
.I number
|
||||
of free leases before alarm is raised. When specified both \-\-warning
|
||||
.I percent
|
||||
and count
|
||||
.I number
|
||||
are required to be exceeded in order to alarm criteria being fulfilled.
|
||||
.IP
|
||||
This option is intended to be used in setup where very large and small
|
||||
shared-networks and ranges co-exists. In such environments percent based
|
||||
alarming can lead to either flood of alarms about small ranges, or way too
|
||||
great overhead of free addresses in large shared-networks. Suggested usage
|
||||
is to set percentage to a level that makes small ranges to ring, and set the
|
||||
count to match level when an enormous shared-network is too few free leases.
|
||||
.IP
|
||||
Defaults to 2^32, that is size of entire IPv4 address space.
|
||||
.TP
|
||||
\fB\-\-crit\-count\fR=\fInumber\fR
|
||||
Same as \-\-warn\-count, but for critical alarms.
|
||||
.TP
|
||||
\fB\-\-snet\-alarms
|
||||
Suppress range alarms that are part of shared networks. Use of this option
|
||||
will keep alarm criteria applied to ranges that are not part of shared-net
|
||||
along with shared-net alarms. This option may help reducing alarm noise for
|
||||
configurations that has lots of small ranges in big shared-networks.
|
||||
.TP
|
||||
\fB\-\-minsize\fR=\fIsize\fR
|
||||
Ignore ranges and shared networks that are smaller or equal to the
|
||||
defined size. This option is meaningful only in context of alarming, and
|
||||
will intended to suppress for example single host ranges. By default this
|
||||
option is not in use.
|
||||
.TP
|
||||
\fB\-p\fR, \fB\-\-perfdata\fR
|
||||
Print additional performance data, like lease count, touched leases and
|
||||
backup leases. This option is meaningful only in context of alarming and
|
||||
will print lots of data, if there are many networks. By default this option
|
||||
is not in use.
|
||||
.TP
|
||||
\fB\-A\fR, \fB\-\-all\-as\-shared\fR
|
||||
Treat all stand-alone subnets as shared-network with named formed from it's
|
||||
CIDR. By default this option is not in use for backwards compatibility.
|
||||
.TP
|
||||
\fB\-\-ip\-version\fR=\fI4|6\fR
|
||||
Force command to read configuration and leases files in IPv4 or IPv6 mode.
|
||||
Notice that when inputs do not match with what is forced analysis output is
|
||||
garbage. This option should not be necessary to use, and exists only to
|
||||
allow debugging.
|
||||
.TP
|
||||
\fB\-v\fR, \fB\-\-version\fR
|
||||
Print version information to standard output and exit successfully.
|
||||
.TP
|
||||
\fB\-h\fR, \fB\-\-help\fR
|
||||
Print help to standard output and exit successfully.
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
Print ranges header, and analysis.
|
||||
$ dhcpd-pools \-L 11 \-c dhcpd.conf \-l dhcpd.leases
|
||||
.br
|
||||
Ranges:
|
||||
.br
|
||||
shared net name [...]
|
||||
.TP
|
||||
Print shared networks and totals, both headers and results
|
||||
$ dhcpd-pools \-L 66 \-c dhcpd.conf \-l dhcpd.leases shared net name
|
||||
.br
|
||||
[...]
|
||||
.TP
|
||||
Alarming
|
||||
$ dhcpd-pools \-c dhcpd.conf \-l dhcpd.leases \-\-critical 80.1 \-\-warning 75
|
||||
.br
|
||||
CRITICAL: dhcpd-pools: Ranges; crit: 14 warn: 22 ok: 220 Shared nets; crit: 1 warn: 0 ok: 4
|
||||
.IP
|
||||
$ dhcpd-pools \-c dhcpd.conf \-l dhcpd.leases \-L 22 \-\-critical 70 \-\-warning 50
|
||||
.br
|
||||
[no-output]
|
||||
.br
|
||||
Suppress printing OK, and make alarm only to go off if shared networks
|
||||
exceed critial or warning levels.
|
||||
.SH FILES
|
||||
.TP
|
||||
@DHCPDCONF_FILE@
|
||||
ISC dhcpd configuration file.
|
||||
.TP
|
||||
@DHCPDLEASE_FILE@
|
||||
ISC dhcpd lease file.
|
||||
.TP
|
||||
@docdir@/prometheus.template
|
||||
Prometheus text file collector mustach template.
|
||||
.SH AUTHORS
|
||||
Original design by Sami Kerola.
|
||||
.br
|
||||
uthash by Troy D. Hanson.
|
||||
.br
|
||||
XML support by Dominic Germain, Sogetel inc.
|
||||
.br
|
||||
IPv6 support by Cheer Xiao.
|
||||
.br
|
||||
Mustache templating support by José Bollo.
|
||||
.SH LICENSE
|
||||
The dhcpd-pools uses FreeBSD License, uthash uses BSD license, the mustache
|
||||
uses Apache License, and the gnulib modules are mostly, but not entirely,
|
||||
GPL.
|
||||
.SH "REPORTING BUGS"
|
||||
Report bugs to
|
||||
.MT @PACKAGE_BUGREPORT@
|
||||
@PACKAGE_MAINTAINER@
|
||||
.ME
|
||||
.br
|
||||
.UR @PACKAGE_URL@
|
||||
Home page
|
||||
.UE
|
||||
.SH "SEE ALSO"
|
||||
.BR dhcpd.leases (5),
|
||||
.BR dhcpd.conf (5),
|
||||
.BR chmod (1),
|
||||
.UR https://mustache.github.io/
|
||||
.UE
|
||||
530
man/help2man
Executable file
530
man/help2man
Executable file
|
|
@ -0,0 +1,530 @@
|
|||
#!/usr/bin/perl -w
|
||||
|
||||
# Generate a short man page from --help and --version output.
|
||||
# Copyright © 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation,
|
||||
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Written by Brendan O'Dea <bod@compusol.com.au>
|
||||
# Available from ftp://ftp.gnu.org/gnu/help2man/
|
||||
|
||||
use 5.004;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use Text::Tabs qw(expand);
|
||||
use POSIX qw(strftime setlocale LC_TIME);
|
||||
|
||||
my $this_program = 'help2man';
|
||||
my $this_version = '1.24';
|
||||
my $version_info = <<EOT;
|
||||
GNU $this_program $this_version
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2000 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.
|
||||
|
||||
Written by Brendan O'Dea <bod\@compusol.com.au>
|
||||
EOT
|
||||
|
||||
my $help_info = <<EOT;
|
||||
`$this_program' generates a man page out of `--help' and `--version' output.
|
||||
|
||||
Usage: $this_program [OPTION]... EXECUTABLE
|
||||
|
||||
-n, --name=STRING use `STRING' as the description for the NAME paragraph
|
||||
-s, --section=SECTION use `SECTION' as the section for the man page
|
||||
-i, --include=FILE include material from `FILE'
|
||||
-I, --opt-include=FILE include material from `FILE' if it exists
|
||||
-o, --output=FILE send output to `FILE'
|
||||
-N, --no-info suppress pointer to Texinfo manual
|
||||
--help print this help, then exit
|
||||
--version print version number, then exit
|
||||
|
||||
EXECUTABLE should accept `--help' and `--version' options.
|
||||
|
||||
Report bugs to <bug-help2man\@gnu.org>.
|
||||
EOT
|
||||
|
||||
my $section = 1;
|
||||
my ($opt_name, @opt_include, $opt_output, $opt_no_info);
|
||||
my %opt_def = (
|
||||
'n|name=s' => \$opt_name,
|
||||
's|section=s' => \$section,
|
||||
'i|include=s' => sub { push @opt_include, [ pop, 1 ] },
|
||||
'I|opt-include=s' => sub { push @opt_include, [ pop, 0 ] },
|
||||
'o|output=s' => \$opt_output,
|
||||
'N|no-info' => \$opt_no_info,
|
||||
);
|
||||
|
||||
# Parse options.
|
||||
Getopt::Long::config('bundling');
|
||||
GetOptions (%opt_def,
|
||||
help => sub { print $help_info; exit },
|
||||
version => sub { print $version_info; exit },
|
||||
) or die $help_info;
|
||||
|
||||
die $help_info unless @ARGV == 1;
|
||||
|
||||
my %include = ();
|
||||
my %append = ();
|
||||
my @include = (); # retain order given in include file
|
||||
|
||||
# Provide replacement `quote-regex' operator for pre-5.005.
|
||||
BEGIN { eval q(sub qr { '' =~ $_[0]; $_[0] }) if $] < 5.005 }
|
||||
|
||||
# Process include file (if given). Format is:
|
||||
#
|
||||
# [section name]
|
||||
# verbatim text
|
||||
#
|
||||
# or
|
||||
#
|
||||
# /pattern/
|
||||
# verbatim text
|
||||
#
|
||||
|
||||
while (@opt_include)
|
||||
{
|
||||
my ($inc, $required) = @{shift @opt_include};
|
||||
|
||||
next unless -f $inc or $required;
|
||||
die "$this_program: can't open `$inc' ($!)\n"
|
||||
unless open INC, $inc;
|
||||
|
||||
my $key;
|
||||
my $hash = \%include;
|
||||
|
||||
while (<INC>)
|
||||
{
|
||||
# [section]
|
||||
if (/^\[([^]]+)\]/)
|
||||
{
|
||||
$key = uc $1;
|
||||
$key =~ s/^\s+//;
|
||||
$key =~ s/\s+$//;
|
||||
$hash = \%include;
|
||||
push @include, $key unless $include{$key};
|
||||
next;
|
||||
}
|
||||
|
||||
# /pattern/
|
||||
if (m!^/(.*)/([ims]*)!)
|
||||
{
|
||||
my $pat = $2 ? "(?$2)$1" : $1;
|
||||
|
||||
# Check pattern.
|
||||
eval { $key = qr($pat) };
|
||||
if ($@)
|
||||
{
|
||||
$@ =~ s/ at .*? line \d.*//;
|
||||
die "$inc:$.:$@";
|
||||
}
|
||||
|
||||
$hash = \%append;
|
||||
next;
|
||||
}
|
||||
|
||||
# Check for options before the first section--anything else is
|
||||
# silently ignored, allowing the first for comments and
|
||||
# revision info.
|
||||
unless ($key)
|
||||
{
|
||||
# handle options
|
||||
if (/^-/)
|
||||
{
|
||||
local @ARGV = split;
|
||||
GetOptions %opt_def;
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
$hash->{$key} ||= '';
|
||||
$hash->{$key} .= $_;
|
||||
}
|
||||
|
||||
close INC;
|
||||
|
||||
die "$this_program: no valid information found in `$inc'\n"
|
||||
unless $key;
|
||||
}
|
||||
|
||||
# Compress trailing blank lines.
|
||||
for my $hash (\(%include, %append))
|
||||
{
|
||||
for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
|
||||
}
|
||||
|
||||
# Turn off localisation of executable's ouput.
|
||||
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
|
||||
|
||||
# Turn off localisation of date (for strftime).
|
||||
setlocale LC_TIME, 'C';
|
||||
|
||||
# Grab help and version info from executable.
|
||||
my ($help_text, $version_text) = map {
|
||||
join '', map { s/ +$//; expand $_ } `$ARGV[0] --$_ 2>/dev/null`
|
||||
or die "$this_program: can't get `--$_' info from $ARGV[0]\n"
|
||||
} qw(help version);
|
||||
|
||||
my $date = strftime "%B %Y", localtime;
|
||||
(my $program = $ARGV[0]) =~ s!.*/!!;
|
||||
my $package = $program;
|
||||
my $version;
|
||||
|
||||
if ($opt_output)
|
||||
{
|
||||
unlink $opt_output
|
||||
or die "$this_program: can't unlink $opt_output ($!)\n"
|
||||
if -e $opt_output;
|
||||
|
||||
open STDOUT, ">$opt_output"
|
||||
or die "$this_program: can't create $opt_output ($!)\n";
|
||||
}
|
||||
|
||||
# The first line of the --version information is assumed to be in one
|
||||
# of the following formats:
|
||||
#
|
||||
# <version>
|
||||
# <program> <version>
|
||||
# {GNU,Free} <program> <version>
|
||||
# <program> ({GNU,Free} <package>) <version>
|
||||
# <program> - {GNU,Free} <package> <version>
|
||||
#
|
||||
# and seperated from any copyright/author details by a blank line.
|
||||
|
||||
($_, $version_text) = split /\n+/, $version_text, 2;
|
||||
|
||||
if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
|
||||
/^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
|
||||
{
|
||||
$program = $1;
|
||||
$package = $2;
|
||||
$version = $3;
|
||||
}
|
||||
elsif (/^((?:GNU|Free) +)?(\S+) +(.*)/)
|
||||
{
|
||||
$program = $2;
|
||||
$package = $1 ? "$1$2" : $2;
|
||||
$version = $3;
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = $_;
|
||||
}
|
||||
|
||||
$program =~ s!.*/!!;
|
||||
|
||||
# No info for `info' itself.
|
||||
$opt_no_info = 1 if $program eq 'info';
|
||||
|
||||
# --name overrides --include contents.
|
||||
$include{NAME} = "$program \\- $opt_name\n" if $opt_name;
|
||||
|
||||
# Default (useless) NAME paragraph.
|
||||
$include{NAME} ||= "$program \\- manual page for $program $version\n";
|
||||
|
||||
# Man pages traditionally have the page title in caps.
|
||||
my $PROGRAM = uc $program;
|
||||
|
||||
# Extract usage clause(s) [if any] for SYNOPSIS.
|
||||
if ($help_text =~ s/^Usage:( +(\S+))(.*)((?:\n(?: {6}\1| *or: +\S).*)*)//m)
|
||||
{
|
||||
my @syn = $2 . $3;
|
||||
|
||||
if ($_ = $4)
|
||||
{
|
||||
s/^\n//;
|
||||
for (split /\n/) { s/^ *(or: +)?//; push @syn, $_ }
|
||||
}
|
||||
|
||||
my $synopsis = '';
|
||||
for (@syn)
|
||||
{
|
||||
$synopsis .= ".br\n" if $synopsis;
|
||||
s!^\S*/!!;
|
||||
s/^(\S+) *//;
|
||||
$synopsis .= ".B $1\n";
|
||||
s/\s+$//;
|
||||
s/(([][]|\.\.+)+)/\\fR$1\\fI/g;
|
||||
s/^/\\fI/ unless s/^\\fR//;
|
||||
$_ .= '\fR';
|
||||
s/(\\fI)( *)/$2$1/g;
|
||||
s/\\fI\\fR//g;
|
||||
s/^\\fR//;
|
||||
s/\\fI$//;
|
||||
s/^\./\\&./;
|
||||
|
||||
$synopsis .= "$_\n";
|
||||
}
|
||||
|
||||
$include{SYNOPSIS} ||= $synopsis;
|
||||
}
|
||||
|
||||
# Process text, initial section is DESCRIPTION.
|
||||
my $sect = 'DESCRIPTION';
|
||||
$_ = "$help_text\n\n$version_text";
|
||||
|
||||
# Normalise paragraph breaks.
|
||||
s/^\n+//;
|
||||
s/\n*$/\n/;
|
||||
s/\n\n+/\n\n/g;
|
||||
|
||||
# Temporarily exchange leading dots, apostrophes and backslashes for
|
||||
# tokens.
|
||||
s/^\./\x80/mg;
|
||||
s/^'/\x81/mg;
|
||||
s/\\/\x82/g;
|
||||
|
||||
# Start a new paragraph (if required) for these.
|
||||
s/([^\n])\n(Report +bugs|Email +bug +reports +to|Written +by)/$1\n\n$2/g;
|
||||
|
||||
sub convert_option;
|
||||
|
||||
while (length)
|
||||
{
|
||||
# Convert some standard paragraph names.
|
||||
if (s/^(Options|Examples): *\n//)
|
||||
{
|
||||
$sect = uc $1;
|
||||
next;
|
||||
}
|
||||
|
||||
# Copyright section
|
||||
if (/^Copyright +[(\xa9]/)
|
||||
{
|
||||
$sect = 'COPYRIGHT';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
|
||||
my $copy;
|
||||
($copy, $_) = split /\n\n/, $_, 2;
|
||||
|
||||
for ($copy)
|
||||
{
|
||||
# Add back newline
|
||||
s/\n*$/\n/;
|
||||
|
||||
# Convert iso9959-1 copyright symbol or (c) to nroff
|
||||
# character.
|
||||
s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
|
||||
|
||||
# Insert line breaks before additional copyright messages
|
||||
# and the disclaimer.
|
||||
s/(.)\n(Copyright |This +is +free +software)/$1\n.br\n$2/g;
|
||||
|
||||
# Join hyphenated lines.
|
||||
s/([A-Za-z])-\n */$1/g;
|
||||
}
|
||||
|
||||
$include{$sect} .= $copy;
|
||||
$_ ||= '';
|
||||
next;
|
||||
}
|
||||
|
||||
# Catch bug report text.
|
||||
if (/^(Report +bugs|Email +bug +reports +to) /)
|
||||
{
|
||||
$sect = 'REPORTING BUGS';
|
||||
}
|
||||
|
||||
# Author section.
|
||||
elsif (/^Written +by/)
|
||||
{
|
||||
$sect = 'AUTHOR';
|
||||
}
|
||||
|
||||
# Examples, indicated by an indented leading $, % or > are
|
||||
# rendered in a constant width font.
|
||||
if (/^( +)([\$\%>] )\S/)
|
||||
{
|
||||
my $indent = $1;
|
||||
my $prefix = $2;
|
||||
my $break = '.IP';
|
||||
$include{$sect} ||= '';
|
||||
while (s/^$indent\Q$prefix\E(\S.*)\n*//)
|
||||
{
|
||||
$include{$sect} .= "$break\n\\f(CW$prefix$1\\fR\n";
|
||||
$break = '.br';
|
||||
}
|
||||
|
||||
next;
|
||||
}
|
||||
|
||||
my $matched = '';
|
||||
$include{$sect} ||= '';
|
||||
|
||||
# Sub-sections have a trailing colon and the second line indented.
|
||||
if (s/^(\S.*:) *\n / /)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$include{$sect} .= qq(.SS "$1"\n);
|
||||
}
|
||||
|
||||
my $indent = 0;
|
||||
my $content = '';
|
||||
|
||||
# Option with description.
|
||||
if (s/^( {1,10}([+-]\S.*?))(?:( +)|\n( {20,}))(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length ($4 || "$1$3");
|
||||
$content = ".TP\n\x83$2\n\x83$5\n";
|
||||
unless ($4)
|
||||
{
|
||||
# Indent may be different on second line.
|
||||
$indent = length $& if /^ {20,}/;
|
||||
}
|
||||
}
|
||||
|
||||
# Option without description.
|
||||
elsif (s/^ {1,10}([+-]\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content = ".HP\n\x83$1\n";
|
||||
$indent = 80; # not continued
|
||||
}
|
||||
|
||||
# Indented paragraph with tag.
|
||||
elsif (s/^( +(\S.*?) +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".TP\n\x83$2\n\x83$3\n";
|
||||
}
|
||||
|
||||
# Indented paragraph.
|
||||
elsif (s/^( +)(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$indent = length $1;
|
||||
$content = ".IP\n\x83$2\n";
|
||||
}
|
||||
|
||||
# Left justified paragraph.
|
||||
else
|
||||
{
|
||||
s/(.*)\n//;
|
||||
$matched .= $& if %append;
|
||||
$content = ".PP\n" if $include{$sect};
|
||||
$content .= "$1\n";
|
||||
}
|
||||
|
||||
# Append continuations.
|
||||
while (s/^ {$indent}(\S.*)\n//)
|
||||
{
|
||||
$matched .= $& if %append;
|
||||
$content .= "\x83$1\n"
|
||||
}
|
||||
|
||||
# Move to next paragraph.
|
||||
s/^\n+//;
|
||||
|
||||
for ($content)
|
||||
{
|
||||
# Leading dot and apostrophe protection.
|
||||
s/\x83\./\x80/g;
|
||||
s/\x83'/\x81/g;
|
||||
s/\x83//g;
|
||||
|
||||
# Convert options.
|
||||
s/(^| )(-[][\w=-]+)/$1 . convert_option $2/mge;
|
||||
}
|
||||
|
||||
# Check if matched paragraph contains /pat/.
|
||||
if (%append)
|
||||
{
|
||||
for my $pat (keys %append)
|
||||
{
|
||||
if ($matched =~ $pat)
|
||||
{
|
||||
$content .= ".PP\n" unless $append{$pat} =~ /^\./;
|
||||
$content .= $append{$pat};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$include{$sect} .= $content;
|
||||
}
|
||||
|
||||
# Refer to the real documentation.
|
||||
unless ($opt_no_info)
|
||||
{
|
||||
$sect = 'SEE ALSO';
|
||||
$include{$sect} ||= '';
|
||||
$include{$sect} .= ".PP\n" if $include{$sect};
|
||||
$include{$sect} .= <<EOT;
|
||||
The full documentation for
|
||||
.B $program
|
||||
is maintained as a Texinfo manual. If the
|
||||
.B info
|
||||
and
|
||||
.B $program
|
||||
programs are properly installed at your site, the command
|
||||
.IP
|
||||
.B info $program
|
||||
.PP
|
||||
should give you access to the complete manual.
|
||||
EOT
|
||||
}
|
||||
|
||||
# Output header.
|
||||
print <<EOT;
|
||||
.\\" DO NOT MODIFY THIS FILE! It was generated by $this_program $this_version.
|
||||
.TH $PROGRAM "$section" "$date" "$package $version" GNU
|
||||
EOT
|
||||
|
||||
# Section ordering.
|
||||
my @pre = qw(NAME SYNOPSIS DESCRIPTION OPTIONS EXAMPLES);
|
||||
my @post = ('AUTHOR', 'REPORTING BUGS', 'COPYRIGHT', 'SEE ALSO');
|
||||
my $filter = join '|', @pre, @post;
|
||||
|
||||
# Output content.
|
||||
for (@pre, (grep ! /^($filter)$/o, @include), @post)
|
||||
{
|
||||
if ($include{$_})
|
||||
{
|
||||
my $quote = /\W/ ? '"' : '';
|
||||
print ".SH $quote$_$quote\n";
|
||||
|
||||
for ($include{$_})
|
||||
{
|
||||
# Replace leading dot, apostrophe and backslash tokens.
|
||||
s/\x80/\\&./g;
|
||||
s/\x81/\\&'/g;
|
||||
s/\x82/\\e/g;
|
||||
print;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
# Convert option dashes to \- to stop nroff from hyphenating 'em, and
|
||||
# embolden. Option arguments get italicised.
|
||||
sub convert_option
|
||||
{
|
||||
local $_ = '\fB' . shift;
|
||||
|
||||
s/-/\\-/g;
|
||||
unless (s/\[=(.*)\]$/\\fR[=\\fI$1\\fR]/)
|
||||
{
|
||||
s/=(.)/\\fR=\\fI$1/;
|
||||
s/ (.)/ \\fI$1/;
|
||||
$_ .= '\fR';
|
||||
}
|
||||
|
||||
$_;
|
||||
}
|
||||
360
missing
Executable file
360
missing
Executable file
|
|
@ -0,0 +1,360 @@
|
|||
#! /bin/sh
|
||||
# Common stub for a few missing GNU programs while installing.
|
||||
|
||||
scriptversion=2005-06-08.21
|
||||
|
||||
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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., 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.
|
||||
|
||||
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
|
||||
|
||||
msg="missing on your system"
|
||||
|
||||
case "$1" in
|
||||
--run)
|
||||
# Try to run requested program, and just exit if it succeeds.
|
||||
run=
|
||||
shift
|
||||
"$@" && exit 0
|
||||
# Exit code 63 means version mismatch. This often happens
|
||||
# when the user try to use an ancient version of a tool on
|
||||
# a file that requires a minimum version. In this case we
|
||||
# we should proceed has if the program had been absent, or
|
||||
# if --run hadn't been passed.
|
||||
if test $? = 63; then
|
||||
run=:
|
||||
msg="probably too old"
|
||||
fi
|
||||
;;
|
||||
|
||||
-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]
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: Unknown \`$1' option"
|
||||
echo 1>&2 "Try \`$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Now exit if we have it, but it failed. Also exit now if we
|
||||
# don't have it and --version was passed (most likely to detect
|
||||
# the program).
|
||||
case "$1" in
|
||||
lex|yacc)
|
||||
# Not GNU programs, they don't have --version.
|
||||
;;
|
||||
|
||||
tar)
|
||||
if test -n "$run"; then
|
||||
echo 1>&2 "ERROR: \`tar' requires --run"
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
|
||||
# We have it, but it failed.
|
||||
exit 1
|
||||
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
|
||||
# Could not run --version or --help. This is probably someone
|
||||
# running `$TOOL --version' or `$TOOL --help' to check whether
|
||||
# $TOOL exists and not knowing $TOOL uses missing.
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# If it does not exist, or fails to run (possibly an outdated version),
|
||||
# try to emulate it.
|
||||
case "$1" in
|
||||
aclocal*)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. 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 $msg. 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 $msg. 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 $msg. 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
|
||||
;;
|
||||
|
||||
autom4te)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is needed, but is $msg.
|
||||
You might have modified some files without having the
|
||||
proper tools for further handling them.
|
||||
You can get \`$1' as part of \`Autoconf' from any GNU
|
||||
archive site."
|
||||
|
||||
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
|
||||
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
|
||||
if test -f "$file"; then
|
||||
touch $file
|
||||
else
|
||||
test -z "$file" || exec >$file
|
||||
echo "#! /bin/sh"
|
||||
echo "# Created by GNU Automake missing as a replacement of"
|
||||
echo "# $ $@"
|
||||
echo "exit 0"
|
||||
chmod +x $file
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
|
||||
bison|yacc)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' $msg. 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 $msg. 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 $msg. 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)
|
||||
echo 1>&2 "\
|
||||
WARNING: \`$1' is $msg. 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."
|
||||
# The file to touch is that specified with -o ...
|
||||
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
|
||||
if test -z "$file"; then
|
||||
# ... or it is the one specified with @setfilename ...
|
||||
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
|
||||
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
|
||||
# ... or it is derived from the source name (dir/f.texi becomes f.info)
|
||||
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
|
||||
fi
|
||||
# If the file does not exist, the user really needs makeinfo;
|
||||
# let's fail without touching anything.
|
||||
test -f $file || exit 1
|
||||
touch $file
|
||||
;;
|
||||
|
||||
tar)
|
||||
shift
|
||||
|
||||
# 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 "$@" && exit 0
|
||||
fi
|
||||
if (gtar --version > /dev/null 2>&1); then
|
||||
gtar "$@" && exit 0
|
||||
fi
|
||||
firstarg="$1"
|
||||
if shift; then
|
||||
case "$firstarg" in
|
||||
*o*)
|
||||
firstarg=`echo "$firstarg" | sed s/o//`
|
||||
tar "$firstarg" "$@" && exit 0
|
||||
;;
|
||||
esac
|
||||
case "$firstarg" in
|
||||
*h*)
|
||||
firstarg=`echo "$firstarg" | sed s/h//`
|
||||
tar "$firstarg" "$@" && 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 is $msg.
|
||||
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 prerequisites 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
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-end: "$"
|
||||
# End:
|
||||
38
project.doap
38
project.doap
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<rdf:RDF xml:lang="en" xmlns="http://usefulinc.com/ns/doap#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
|
||||
xmlns:foaf="http://xmlns.com/foaf/0.1/">
|
||||
<Project rdf:about="https://dhcpd-pools.sourceforge.net/">
|
||||
<name>dhcpd-pools</name>
|
||||
<homepage rdf:resource="https://dhcpd-pools.sourceforge.net/" />
|
||||
<shortdesc>This is dhcpd-pools ISC dhcp shared network and pool
|
||||
range usage analysis tool.</shortdesc>
|
||||
<description>Purpose of command is to count usage ratio of each
|
||||
IP range and shared network pool which ISC dhcpd is in control
|
||||
of. Program is written C. Design goal is to get analysis done
|
||||
quickly where there is lots of data. On cheap laptop the speed
|
||||
of analysis is more than 100k leases per second. Number of
|
||||
ranges, or shared networks, does not make any significant
|
||||
difference in getting analysis done.</description>
|
||||
<mailing-list rdf:resource="https://lists.sourceforge.net/lists/listinfo/dhcpd-pools-announce" />
|
||||
<download-page rdf:resource="https://sourceforge.net/projects/dhcpd-pools/files/" />
|
||||
<programming-language>C</programming-language>
|
||||
<repository>
|
||||
<GitRepository>
|
||||
<location rdf:resource="git://git.code.sf.net/p/dhcpd-pools/code" />
|
||||
<browse rdf:resource="https://sourceforge.net/p/dhcpd-pools/code/ci/master/tree/" />
|
||||
</GitRepository>
|
||||
</repository>
|
||||
<License>
|
||||
<rdfs:label>BSD 2-Clause license</rdfs:label>
|
||||
<rdfs:seeAlso rdf:resource="https://sourceforge.net/p/dhcpd-pools/code/ci/master/tree/COPYING?format=raw" />
|
||||
</License>
|
||||
<maintainer>
|
||||
<foaf:Person>
|
||||
<foaf:name>Sami Kerola</foaf:name>
|
||||
<foaf:mbox rdf:resource="mailto:kerolasa@iki.fi" />
|
||||
</foaf:Person>
|
||||
</maintainer>
|
||||
</Project>
|
||||
</rdf:RDF>
|
||||
17
reconf
Executable file
17
reconf
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
# Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
#
|
||||
# This file is free software; as a special exception the author
|
||||
# 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.
|
||||
|
||||
#!/bin/sh
|
||||
rm -f config.cache
|
||||
|
||||
aclocal
|
||||
autoconf
|
||||
automake --add-missing
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
dist_doc_DATA = \
|
||||
samples/dhcpd.conf \
|
||||
samples/dhcpd.leases \
|
||||
samples/mustach.template \
|
||||
samples/prometheus.template
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
shared-network example1 {
|
||||
subnet 10.0.0.0 netmask 255.255.255.0 {
|
||||
pool {
|
||||
range 10.0.0.1 10.0.0.20;
|
||||
}
|
||||
}
|
||||
subnet 10.1.0.0 netmask 255.255.255.0 {
|
||||
pool {
|
||||
range 10.1.0.1 10.1.0.20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
shared-network example2 {
|
||||
subnet 10.2.0.0 netmask 255.255.255.0 {
|
||||
pool {
|
||||
range 10.2.0.1 10.2.0.20;
|
||||
}
|
||||
}
|
||||
subnet 10.3.0.0 netmask 255.255.255.0 {
|
||||
pool {
|
||||
range 10.3.0.1 10.3.0.20;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
subnet 10.4.0.0 netmask 255.255.255.0 {
|
||||
pool {
|
||||
range 10.4.0.1 10.4.0.20;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,210 +0,0 @@
|
|||
lease 10.0.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:00;
|
||||
}
|
||||
lease 10.0.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:01;
|
||||
}
|
||||
lease 10.0.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:02;
|
||||
}
|
||||
lease 10.0.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:03;
|
||||
}
|
||||
lease 10.0.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:04;
|
||||
}
|
||||
lease 10.0.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:05;
|
||||
}
|
||||
lease 10.0.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:06;
|
||||
}
|
||||
lease 10.0.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:07;
|
||||
}
|
||||
lease 10.0.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:08;
|
||||
}
|
||||
lease 10.0.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:09;
|
||||
}
|
||||
lease 10.0.0.10 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:10;
|
||||
}
|
||||
lease 10.0.0.11 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:00:11;
|
||||
}
|
||||
lease 10.0.0.12 {
|
||||
binding state backup;
|
||||
hardware ethernet 00:00:00:00:00:12;
|
||||
}
|
||||
|
||||
|
||||
lease 10.1.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:00;
|
||||
}
|
||||
lease 10.1.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:01;
|
||||
}
|
||||
lease 10.1.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:02;
|
||||
}
|
||||
lease 10.1.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:03;
|
||||
}
|
||||
lease 10.1.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:04;
|
||||
}
|
||||
lease 10.1.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:05;
|
||||
}
|
||||
lease 10.1.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:06;
|
||||
}
|
||||
lease 10.1.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:07;
|
||||
}
|
||||
lease 10.1.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:08;
|
||||
}
|
||||
lease 10.1.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:09;
|
||||
}
|
||||
lease 10.1.0.10 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:01:10;
|
||||
}
|
||||
|
||||
|
||||
lease 10.2.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:00;
|
||||
}
|
||||
lease 10.2.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:01;
|
||||
}
|
||||
lease 10.2.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:02;
|
||||
}
|
||||
lease 10.2.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:03;
|
||||
}
|
||||
lease 10.2.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:04;
|
||||
}
|
||||
lease 10.2.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:05;
|
||||
}
|
||||
lease 10.2.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:06;
|
||||
}
|
||||
lease 10.2.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:07;
|
||||
}
|
||||
lease 10.2.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:02:08;
|
||||
}
|
||||
|
||||
lease 10.3.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:00;
|
||||
}
|
||||
lease 10.3.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:01;
|
||||
}
|
||||
lease 10.3.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:02;
|
||||
}
|
||||
lease 10.3.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:03;
|
||||
}
|
||||
lease 10.3.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:04;
|
||||
}
|
||||
lease 10.3.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:05;
|
||||
}
|
||||
lease 10.3.0.6 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:06;
|
||||
}
|
||||
lease 10.3.0.7 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:07;
|
||||
}
|
||||
lease 10.3.0.8 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:08;
|
||||
}
|
||||
lease 10.3.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:09;
|
||||
}
|
||||
lease 10.3.0.9 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:03:09;
|
||||
}
|
||||
|
||||
lease 10.4.0.0 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:00;
|
||||
}
|
||||
lease 10.4.0.1 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:01;
|
||||
}
|
||||
lease 10.4.0.2 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:02;
|
||||
}
|
||||
lease 10.4.0.3 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:03;
|
||||
}
|
||||
lease 10.4.0.4 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:04;
|
||||
}
|
||||
lease 10.4.0.5 {
|
||||
binding state active;
|
||||
hardware ethernet 00:00:00:00:04:05;
|
||||
}
|
||||
lease 10.4.0.6 {
|
||||
binding state backup;
|
||||
hardware ethernet 00:00:00:00:04:06;
|
||||
}
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
Ethernets:{{#active_lease}}
|
||||
macaddress: {{macaddress}} ip: {{ip}}{{/active_lease}}
|
||||
|
||||
Subnets:{{#subnets}}
|
||||
location: {{location}}
|
||||
range: {{range}}
|
||||
first_ip: {{first_ip}}
|
||||
last_ip: {{last_ip}}
|
||||
used: {{used}}
|
||||
touched: {{touched}}
|
||||
defined: {{defined}}
|
||||
free: {{free}}
|
||||
percent: {{percent}}
|
||||
touch_count: {{touch_count}}
|
||||
touch_percent: {{touch_percent}}
|
||||
backup_count: {{backup_count}}
|
||||
backup_percent: {{backup_percent}}
|
||||
status: {{status}}
|
||||
gettimeofday: {{gettimeofday}}
|
||||
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
|
||||
{{/subnets}}
|
||||
|
||||
Shared-networks:{{#shared-networks}}
|
||||
location: {{location}}
|
||||
defined: {{defined}}
|
||||
used: {{used}}
|
||||
touched: {{touched}}
|
||||
free: {{free}}
|
||||
percent: {{percent}}
|
||||
touch_count: {{touch_count}}
|
||||
touch_percent: {{touch_percent}}
|
||||
backup_count: {{backup_count}}
|
||||
backup_percent: {{backup_percent}}
|
||||
status: {{status}}
|
||||
gettimeofday: {{gettimeofday}}
|
||||
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
|
||||
{{/shared-networks}}
|
||||
|
||||
Summary:{{#summary}}
|
||||
location: {{location}}
|
||||
defined: {{defined}}
|
||||
used: {{used}}
|
||||
touched: {{touched}}
|
||||
free: {{free}}
|
||||
percent: {{percent}}
|
||||
touch_count: {{touch_count}}
|
||||
touch_percent: {{touch_percent}}
|
||||
backup_count: {{backup_count}}
|
||||
backup_percent: {{backup_percent}}
|
||||
status: {{status}}
|
||||
gettimeofday: {{gettimeofday}}
|
||||
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
|
||||
{{/summary}}
|
||||
|
||||
localtime: {{localtime}}
|
||||
number_of_ranges: {{number_of_ranges}}
|
||||
number_of_shared_networks: {{number_of_shared_networks}}
|
||||
version: {{version}}
|
||||
|
||||
conf_file_path: {{conf_file_path}}
|
||||
conf_file_local_mtime: {{conf_file_local_mtime}}
|
||||
conf_file_epoch_mtime: {{conf_file_epoch_mtime}}
|
||||
|
||||
lease_file_path: {{lease_file_path}}
|
||||
lease_file_local_mtime: {{lease_file_local_mtime}}
|
||||
lease_file_epoch_mtime: {{lease_file_epoch_mtime}}
|
||||
|
||||
template_file_path: {{template_file_path}}
|
||||
template_file_local_mtime: {{template_file_local_mtime}}
|
||||
template_file_epoch_mtime: {{template_file_epoch_mtime}}
|
||||
|
||||
number_of_ranges_warning: {{number_of_ranges_warning}}
|
||||
number_of_ranges_critical: {{number_of_ranges_critical}}
|
||||
number_of_shared_networks: {{number_of_shared_networks}}
|
||||
number_of_shared_networks_warning: {{number_of_shared_networks_warning}}
|
||||
number_of_shared_networks_critical: {{number_of_shared_networks_critical}}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
# This mustach template can be used as Prometheus text file.
|
||||
# https://prometheus.io/
|
||||
# HELP dhcpd_pools ISC dhcpd statistics
|
||||
# TYPE dhcpd_pools gauge
|
||||
{{#subnets}}dhcpd_pools{location="{{location}}",range="{{first_ip}}",used="1"} {{used}} {{gettimeofday}}000
|
||||
dhcpd_pools{location="{{location}}",range="{{first_ip}}",touched="1"} {{touched}} {{gettimeofday}}000
|
||||
dhcpd_pools{location="{{location}}",range="{{first_ip}}",defined="1"} {{defined}} {{gettimeofday}}000
|
||||
dhcpd_pools{location="{{location}}",range="{{first_ip}}",free="1"} {{free}} {{gettimeofday}}000
|
||||
dhcpd_pools{location="{{location}}",range="{{first_ip}}",touch_count="1"} {{touch_count}} {{gettimeofday}}000
|
||||
dhcpd_pools{location="{{location}}",range="{{first_ip}}",status="1"} {{status}} {{gettimeofday}}000
|
||||
{{/subnets}}
|
||||
5
snippet/.gitignore
vendored
5
snippet/.gitignore
vendored
|
|
@ -1,5 +0,0 @@
|
|||
/_Noreturn.h
|
||||
/arg-nonnull.h
|
||||
/c++defs.h
|
||||
/unused-parameter.h
|
||||
/warn-on-use.h
|
||||
16
src/.indent.pro
vendored
16
src/.indent.pro
vendored
|
|
@ -1,16 +0,0 @@
|
|||
-linux
|
||||
-TFILE
|
||||
-Tconf_t
|
||||
-Tipaddr_t
|
||||
-Tleases_t
|
||||
-Toff_t
|
||||
-Trange_t
|
||||
-Tsize_t
|
||||
-Ttime_t
|
||||
-Tuintmax_t
|
||||
--blank-lines-after-declarations
|
||||
--format-all-comments
|
||||
--line-length100
|
||||
--preprocessor-indentation1
|
||||
--start-left-side-of-comments
|
||||
--swallow-optional-blank-lines
|
||||
8
src/Makefile.am
Normal file
8
src/Makefile.am
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = dhcpd-pools
|
||||
AC_PROG_RANLIB = resolv
|
||||
|
||||
dhcpd_pools_SOURCES = dhcpd-pools.c analyze.c getdata.c getopt1.c getopt.c other.c output.c getopt.h
|
||||
|
||||
INCLUDES = -I.
|
||||
403
src/Makefile.in
Normal file
403
src/Makefile.in
Normal file
|
|
@ -0,0 +1,403 @@
|
|||
# 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@
|
||||
|
||||
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 = :
|
||||
bin_PROGRAMS = dhcpd-pools$(EXEEXT)
|
||||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am_dhcpd_pools_OBJECTS = dhcpd-pools.$(OBJEXT) analyze.$(OBJEXT) \
|
||||
getdata.$(OBJEXT) getopt1.$(OBJEXT) getopt.$(OBJEXT) \
|
||||
other.$(OBJEXT) output.$(OBJEXT)
|
||||
dhcpd_pools_OBJECTS = $(am_dhcpd_pools_OBJECTS)
|
||||
dhcpd_pools_LDADD = $(LDADD)
|
||||
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
SOURCES = $(dhcpd_pools_SOURCES)
|
||||
DIST_SOURCES = $(dhcpd_pools_SOURCES)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
ALLOCA = @ALLOCA@
|
||||
AMDEP_FALSE = @AMDEP_FALSE@
|
||||
AMDEP_TRUE = @AMDEP_TRUE@
|
||||
AMTAR = @AMTAR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJEXT = @OBJEXT@
|
||||
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@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build_alias = @build_alias@
|
||||
datadir = @datadir@
|
||||
dhcpd_conf = @dhcpd_conf@
|
||||
dhcpd_leases = @dhcpd_leases@
|
||||
exec_prefix = @exec_prefix@
|
||||
host_alias = @host_alias@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
output_format = @output_format@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
AC_PROG_RANLIB = resolv
|
||||
dhcpd_pools_SOURCES = dhcpd-pools.c analyze.c getdata.c getopt1.c getopt.c other.c output.c getopt.h
|
||||
INCLUDES = -I.
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .obj
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign src/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: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
|
||||
if test -f $$p \
|
||||
; then \
|
||||
f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
|
||||
else :; fi; \
|
||||
done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; for p in $$list; do \
|
||||
f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
|
||||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
|
||||
clean-binPROGRAMS:
|
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
|
||||
dhcpd-pools$(EXEEXT): $(dhcpd_pools_OBJECTS) $(dhcpd_pools_DEPENDENCIES)
|
||||
@rm -f dhcpd-pools$(EXEEXT)
|
||||
$(LINK) $(dhcpd_pools_LDFLAGS) $(dhcpd_pools_OBJECTS) $(dhcpd_pools_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analyze.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dhcpd-pools.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdata.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/other.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Po@am__quote@
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
|
||||
@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
|
||||
uninstall-info-am:
|
||||
|
||||
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: $(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; }'`; \
|
||||
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: $(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)
|
||||
@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 $(PROGRAMS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)"; 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:
|
||||
|
||||
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-binPROGRAMS clean-generic mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
|
||||
clean-generic ctags distclean distclean-compile \
|
||||
distclean-generic distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-binPROGRAMS \
|
||||
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-compile \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS uninstall-info-am
|
||||
|
||||
# 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:
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
## Makefile.am -- Process this file with automake to produce Makefile.in
|
||||
|
||||
bin_PROGRAMS = dhcpd-pools
|
||||
AC_PROG_RANLIB = resolv
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/lib -I$(top_builddir)/lib
|
||||
|
||||
dhcpd_pools_LDADD = $(top_builddir)/lib/libdhcpd_pools.la $(MATH_LIBS)
|
||||
|
||||
dhcpd_pools_SOURCES = \
|
||||
src/analyze.c \
|
||||
src/dhcpd-pools.c \
|
||||
src/dhcpd-pools.h \
|
||||
src/getdata.c \
|
||||
src/hash.c \
|
||||
src/other.c \
|
||||
src/output.c \
|
||||
src/sort.c
|
||||
|
||||
if ENABLE_MUSTACH
|
||||
dhcpd_pools_SOURCES += \
|
||||
src/mustach-dhcpd-pools.c \
|
||||
src/mustach.c \
|
||||
src/mustach.h
|
||||
endif
|
||||
200
src/analyze.c
200
src/analyze.c
|
|
@ -1,106 +1,124 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file analyze.c
|
||||
* \brief Data analysis functions.
|
||||
*/
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
/*! \brief Prepare data for analysis. The function will sort leases and
|
||||
* ranges. */
|
||||
void prepare_data(struct conf_t *state)
|
||||
/* A simple (predicate-like) integer comparison function (for qsort) */
|
||||
int
|
||||
intcomp (const void *x, const void *y)
|
||||
{
|
||||
/* Sort leases */
|
||||
HASH_SORT(state->leases, leasecomp);
|
||||
/* Sort ranges */
|
||||
qsort(state->ranges, state->num_ranges, sizeof(struct range_t), &rangecomp);
|
||||
if (*(unsigned long int *) x < *(unsigned long int *) y)
|
||||
return -1;
|
||||
else if (*(unsigned long int *) y < *(unsigned long int *) x)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!\brief Perform counting. Join leases with ranges, and update range and
|
||||
* shared network counters. */
|
||||
void do_counting(struct conf_t *state)
|
||||
/* A simple (predicate-like) range structure comparison function
|
||||
* (for qsort) */
|
||||
int
|
||||
rangecomp (const void *r1, const void *r2)
|
||||
{
|
||||
struct range_t *restrict range_p = state->ranges;
|
||||
const struct leases_t *restrict l = state->leases;
|
||||
unsigned long i;
|
||||
double block_size;
|
||||
if ((((struct range_t *) r1)->first_ip) <
|
||||
(((struct range_t *) r2)->first_ip))
|
||||
return -1;
|
||||
else if ((((struct range_t *) r2)->first_ip) <
|
||||
(((struct range_t *) r1)->first_ip))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Walk through ranges */
|
||||
for (i = 0; i < state->num_ranges; i++, range_p++) {
|
||||
while (l != NULL && ipcomp(&range_p->first_ip, &l->ip) < 0)
|
||||
l = l->hh.prev; /* rewind */
|
||||
if (l == NULL)
|
||||
l = state->leases;
|
||||
for (; l != NULL && ipcomp(&l->ip, &range_p->last_ip) <= 0; l = l->hh.next) {
|
||||
if (unlikely(ipcomp(&l->ip, &range_p->first_ip) < 0))
|
||||
continue; /* cannot happen? */
|
||||
/* IP in range */
|
||||
switch (l->type) {
|
||||
case FREE:
|
||||
range_p->touched++;
|
||||
break;
|
||||
case ACTIVE:
|
||||
range_p->count++;
|
||||
break;
|
||||
case BACKUP:
|
||||
range_p->backups++;
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
/* Size of range size. */
|
||||
block_size = get_range_size(range_p);
|
||||
/* Count together ranges within shared network block. */
|
||||
range_p->shared_net->available += block_size;
|
||||
range_p->shared_net->used += range_p->count;
|
||||
range_p->shared_net->touched += range_p->touched;
|
||||
range_p->shared_net->backups += range_p->backups;
|
||||
/* When shared network is not 'all networks' add it as well. */
|
||||
if (range_p->shared_net != state->shared_net_root) {
|
||||
state->shared_net_root->available += block_size;
|
||||
state->shared_net_root->used += range_p->count;
|
||||
state->shared_net_root->touched += range_p->touched;
|
||||
state->shared_net_root->backups += range_p->backups;
|
||||
}
|
||||
/* Clean up data */
|
||||
int
|
||||
prepare_data (void)
|
||||
{
|
||||
unsigned long int i, j, k;
|
||||
|
||||
/* Sort leases */
|
||||
qsort (leases, (size_t) num_leases, sizeof (long int), &intcomp);
|
||||
|
||||
/* Get rid of dublicates */
|
||||
for (k = j = i = 0; i < num_leases; i++)
|
||||
{
|
||||
if (j != leases[i])
|
||||
{
|
||||
leases[k] = leases[i];
|
||||
j = leases[i];
|
||||
k++;
|
||||
}
|
||||
}
|
||||
num_leases = k;
|
||||
|
||||
/* Sort ranges */
|
||||
qsort (ranges, (size_t) num_ranges, sizeof (struct range_t), &rangecomp);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Join leases and ranges into couter structs */
|
||||
int
|
||||
do_counting (void)
|
||||
{
|
||||
struct range_t *range_p;
|
||||
unsigned int i, block_size;
|
||||
|
||||
range_p = ranges;
|
||||
|
||||
for (i = 0; i < num_leases; i++)
|
||||
{
|
||||
/* IP with in range */
|
||||
if (range_p->first_ip < leases[i] && range_p->last_ip > leases[i])
|
||||
{
|
||||
range_p->count++;
|
||||
if (range_p->shared_net)
|
||||
{
|
||||
range_p->shared_net->used++;
|
||||
}
|
||||
shared_networks->used++;
|
||||
}
|
||||
/* IP out of range */
|
||||
if (range_p->last_ip < leases[i])
|
||||
{
|
||||
range_p++;
|
||||
/* Break loop before trying to access memorory that is
|
||||
* not allocated. */
|
||||
if (range_p - ranges > num_ranges)
|
||||
{
|
||||
break;
|
||||
}
|
||||
block_size = range_p->last_ip - range_p->first_ip - 1;
|
||||
if (range_p->shared_net)
|
||||
{
|
||||
range_p->shared_net->available += block_size;
|
||||
}
|
||||
shared_networks->available += block_size;
|
||||
i--;
|
||||
}
|
||||
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
51
src/defaults.h
Normal file
51
src/defaults.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef DEFAULTS_H
|
||||
# define DEFAULTS_H 1
|
||||
|
||||
/* Default file locations */
|
||||
#ifndef DHCPDCONF_FILE
|
||||
# define DHCPDCONF_FILE "/etc/dhcpd.conf"
|
||||
#endif
|
||||
#ifndef DHCPDLEASE_FILE
|
||||
# define DHCPDLEASE_FILE "/var/lib/dhcp/dhcpd.leases"
|
||||
#endif
|
||||
|
||||
/* Default output style
|
||||
* possible formats are the same as you can see from --help */
|
||||
#ifndef OUTPUT_FORMAT
|
||||
# define OUTPUT_FORMAT "text"
|
||||
#endif
|
||||
#ifndef OUTPUT_LIMIT
|
||||
# define OUTPUT_LIMIT "77"
|
||||
#endif
|
||||
|
||||
/* Maximum line length in dhcpd.conf and dhcpd.leases */
|
||||
static const int MAXLEN = 1024;
|
||||
|
||||
/* Total number of characters in all shared network names */
|
||||
static const int SHARED_NETWORKS_NAMES = 24576;
|
||||
|
||||
/* Maximum number of shared networks */
|
||||
static const int SHARED_NETWORKS = 1024;
|
||||
|
||||
/* Maximum number of ranges */
|
||||
static const int RANGES = 65536;
|
||||
|
||||
#endif /* DEFAULTS_H */
|
||||
|
|
@ -1,368 +1,248 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file dhcpd-pools.c
|
||||
* \brief The main(), and core initialization.
|
||||
*/
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include "close-stream.h"
|
||||
#include "closeout.h"
|
||||
#include "error.h"
|
||||
#include "progname.h"
|
||||
#include "quote.h"
|
||||
#include "xalloc.h"
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
extern void exit ();
|
||||
extern char *malloc ();
|
||||
#endif /* STDC_HEADERS */
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#include <getopt.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
#include "defaults.h"
|
||||
|
||||
/* Function pointers */
|
||||
int (*parse_ipaddr) (struct conf_t *state, const char *restrict src, union ipaddr_t *restrict dst);
|
||||
void (*copy_ipaddr) (union ipaddr_t *restrict dst, const union ipaddr_t *restrict src);
|
||||
const char *(*ntop_ipaddr) (const union ipaddr_t *ip);
|
||||
double (*get_range_size) (const struct range_t *r);
|
||||
int (*xstrstr) (struct conf_t *state, const char *restrict str);
|
||||
int (*ipcomp) (const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
int (*leasecomp) (const struct leases_t *restrict a, const struct leases_t *restrict b);
|
||||
void (*add_lease) (struct conf_t *state, union ipaddr_t *ip, enum ltype type);
|
||||
struct leases_t *(*find_lease) (struct conf_t *state, union ipaddr_t *ip);
|
||||
|
||||
/*! \brief An option argument parser to populate state header_limit and
|
||||
* number_limit values.
|
||||
*/
|
||||
static int return_limit(const char c)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
if ('0' <= c && c < '8')
|
||||
return c - '0';
|
||||
error(EXIT_FAILURE, 0, "return_limit: output mask %s is illegal", quote(optarg));
|
||||
return 0;
|
||||
}
|
||||
int c;
|
||||
char *tmp;
|
||||
FILE *fopen_test;
|
||||
|
||||
/*! \brief Run time initialization. Global allocations, counter
|
||||
* initializations, etc are here. */
|
||||
static void prepare_memory(struct conf_t *state)
|
||||
{
|
||||
state->ranges = xmalloc(sizeof(struct range_t) * state->ranges_size);
|
||||
/* First shared network entry is all networks */
|
||||
state->shared_net_root = xcalloc(sizeof(struct shared_network_t), 1);
|
||||
state->shared_net_root->name = xstrdup("All networks");
|
||||
state->shared_net_head = state->shared_net_root;
|
||||
}
|
||||
/* Options for getopt_long */
|
||||
static struct option const long_options[] = {
|
||||
{"config", required_argument, 0, (int) 'c'},
|
||||
{"leases", required_argument, 0, (int) 'l'},
|
||||
{"format", required_argument, 0, (int) 'f'},
|
||||
{"output", required_argument, 0, (int) 'o'},
|
||||
{"limit", required_argument, 0, (int) 'L'},
|
||||
{"version", no_argument, 0, (int) 'v'},
|
||||
{"help", no_argument, 0, (int) 'h'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
/*! \brief The --skip option argument parser. */
|
||||
static void skip_arg_parse(struct conf_t *state, char *arg)
|
||||
{
|
||||
enum {
|
||||
OPT_ARG_OK = 0,
|
||||
OPT_ARG_WARNING,
|
||||
OPT_ARG_CRITICAL,
|
||||
OPT_ARG_MINSIZE,
|
||||
OPT_ARG_SUPPRESSED
|
||||
};
|
||||
program_name = argv[0];
|
||||
|
||||
char *const tokens[] = {
|
||||
[OPT_ARG_OK] = "ok",
|
||||
[OPT_ARG_WARNING] = "warning",
|
||||
[OPT_ARG_CRITICAL] = "critical",
|
||||
[OPT_ARG_MINSIZE] = "minsize",
|
||||
[OPT_ARG_SUPPRESSED] = "suppressed",
|
||||
NULL
|
||||
};
|
||||
char *value;
|
||||
config.dhcpdconf_file = safe_malloc (sizeof (char) * MAXLEN);
|
||||
config.dhcpdlease_file = safe_malloc (sizeof (char) * MAXLEN);
|
||||
config.output_file = safe_malloc (sizeof (char) * MAXLEN);
|
||||
|
||||
while (*arg != '\0') {
|
||||
switch (getsubopt(&arg, tokens, &value)) {
|
||||
case OPT_ARG_OK:
|
||||
state->skip_ok = 1;
|
||||
break;
|
||||
case OPT_ARG_WARNING:
|
||||
state->skip_warning = 1;
|
||||
break;
|
||||
case OPT_ARG_CRITICAL:
|
||||
state->skip_critical = 1;
|
||||
break;
|
||||
case OPT_ARG_MINSIZE:
|
||||
state->skip_minsize = 1;
|
||||
break;
|
||||
case OPT_ARG_SUPPRESSED:
|
||||
state->skip_suppressed = 1;
|
||||
break;
|
||||
default:
|
||||
error(EXIT_FAILURE, 0, "unknown --skip specifier: %s", value);
|
||||
/* Make sure string has zero lenght if there is no command line
|
||||
* option */
|
||||
config.output_file[0] = '\0';
|
||||
|
||||
strncpy (config.dhcpdconf_file, DHCPDCONF_FILE, MAXLEN - 1);
|
||||
strncpy (config.dhcpdlease_file, DHCPDLEASE_FILE, MAXLEN - 1);
|
||||
tmp = OUTPUT_LIMIT;
|
||||
config.output_limit[0] = (int) (*tmp - '0');
|
||||
tmp++;
|
||||
config.output_limit[1] = (int) (*tmp - '0');
|
||||
|
||||
/* Make sure some output format is selected by default */
|
||||
strncpy (config.output_format, OUTPUT_FORMAT, 1);
|
||||
|
||||
/* Parse command line options */
|
||||
while (1)
|
||||
{
|
||||
c = getopt_long (argc, argv, "clfoLvh", long_options, (int *) 0);
|
||||
|
||||
if (c == EOF)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 'c':
|
||||
if (argv[optind] != NULL)
|
||||
{
|
||||
strncpy (config.dhcpdconf_file, argv[optind], MAXLEN - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: for argument -c parameter not set");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'l':
|
||||
if (argv[optind] != NULL)
|
||||
{
|
||||
strncpy (config.dhcpdlease_file, argv[optind], MAXLEN - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: for argument -l parameter not set");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'f':
|
||||
if (argv[optind] != NULL)
|
||||
{
|
||||
strncpy (config.output_format, argv[optind], 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: for argument -f parameter not set");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'o':
|
||||
if (argv[optind] != NULL)
|
||||
{
|
||||
strncpy (config.output_file, argv[optind], (size_t) MAXLEN - 1);
|
||||
/* Test that output file really works */
|
||||
fopen_test = fopen (config.output_file, "w+");
|
||||
if (fopen_test == NULL)
|
||||
{
|
||||
eprintf ("main: %s:", config.output_file);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Command line options parser. */
|
||||
static void parse_command_line_opts(struct conf_t *state, int argc, char **argv)
|
||||
{
|
||||
enum {
|
||||
OPT_SNET_ALARMS = CHAR_MAX + 1,
|
||||
OPT_WARN,
|
||||
OPT_CRIT,
|
||||
OPT_MINSIZE,
|
||||
OPT_WARN_COUNT,
|
||||
OPT_CRIT_COUNT,
|
||||
OPT_COLOR,
|
||||
OPT_SKIP,
|
||||
OPT_SET_IPV,
|
||||
OPT_MUSTACH
|
||||
};
|
||||
|
||||
static struct option const long_options[] = {
|
||||
{"config", required_argument, NULL, 'c'},
|
||||
{"leases", required_argument, NULL, 'l'},
|
||||
{"color", required_argument, NULL, OPT_COLOR},
|
||||
{"skip", required_argument, NULL, OPT_SKIP},
|
||||
{"format", required_argument, NULL, 'f'},
|
||||
{"sort", required_argument, NULL, 's'},
|
||||
{"reverse", no_argument, NULL, 'r'},
|
||||
{"output", required_argument, NULL, 'o'},
|
||||
{"limit", required_argument, NULL, 'L'},
|
||||
{"mustach", required_argument, NULL, OPT_MUSTACH},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"snet-alarms", no_argument, NULL, OPT_SNET_ALARMS},
|
||||
{"warning", required_argument, NULL, OPT_WARN},
|
||||
{"critical", required_argument, NULL, OPT_CRIT},
|
||||
{"warn-count", required_argument, NULL, OPT_WARN_COUNT},
|
||||
{"crit-count", required_argument, NULL, OPT_CRIT_COUNT},
|
||||
{"minsize", required_argument, NULL, OPT_MINSIZE},
|
||||
{"perfdata", no_argument, NULL, 'p'},
|
||||
{"all-as-shared", no_argument, NULL, 'A'},
|
||||
{"ip-version", required_argument, NULL, OPT_SET_IPV},
|
||||
{NULL, 0, NULL, 0}
|
||||
};
|
||||
int alarming = 0;
|
||||
|
||||
while (1) {
|
||||
int c;
|
||||
|
||||
c = getopt_long(argc, argv, "c:l:f:o:s:rL:pAvh", long_options, NULL);
|
||||
if (c == EOF)
|
||||
break;
|
||||
switch (c) {
|
||||
case 'c':
|
||||
/* config file */
|
||||
state->dhcpdconf_file = optarg;
|
||||
break;
|
||||
case 'l':
|
||||
/* lease file */
|
||||
state->dhcpdlease_file = optarg;
|
||||
break;
|
||||
case 'f':
|
||||
/* Output format */
|
||||
state->output_format = optarg[0];
|
||||
break;
|
||||
case 's':
|
||||
{
|
||||
/* Output sorting option */
|
||||
struct output_sort *p = state->sorts;
|
||||
char *ptr = optarg;
|
||||
|
||||
while (p && p->next)
|
||||
p = p->next;
|
||||
while (*ptr) {
|
||||
if (state->sorts == NULL) {
|
||||
state->sorts =
|
||||
xcalloc(1, sizeof(struct output_sort));
|
||||
p = state->sorts;
|
||||
} else {
|
||||
p->next = xcalloc(1, sizeof(struct output_sort));
|
||||
p = p->next;
|
||||
}
|
||||
p->func = field_selector(*ptr++);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'r':
|
||||
/* What ever sort in reverse order */
|
||||
state->reverse_order = 1;
|
||||
break;
|
||||
case 'o':
|
||||
/* Output file */
|
||||
state->output_file = optarg;
|
||||
break;
|
||||
case 'L':
|
||||
/* Specification what will be printed */
|
||||
state->header_limit = return_limit(optarg[0]);
|
||||
state->number_limit = return_limit(optarg[1]);
|
||||
break;
|
||||
case OPT_MUSTACH:
|
||||
#ifdef BUILD_MUSTACH
|
||||
state->mustach_template = optarg;
|
||||
state->output_format = 'm';
|
||||
state->print_mac_addreses = 1;
|
||||
#else
|
||||
error(EXIT_FAILURE, 0, "compiled without mustach support");
|
||||
#endif
|
||||
break;
|
||||
case OPT_COLOR:
|
||||
state->color_mode = parse_color_mode(optarg);
|
||||
if (state->color_mode == color_unknown)
|
||||
error(EXIT_FAILURE, errno, "unknown color mode: %s", quote(optarg));
|
||||
break;
|
||||
case OPT_SKIP:
|
||||
skip_arg_parse(state, optarg);
|
||||
break;
|
||||
case OPT_SNET_ALARMS:
|
||||
state->snet_alarms = 1;
|
||||
break;
|
||||
case OPT_WARN:
|
||||
alarming = 1;
|
||||
state->warning = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_CRIT:
|
||||
alarming = 1;
|
||||
state->critical = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_WARN_COUNT:
|
||||
alarming = 1;
|
||||
state->warn_count = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_CRIT_COUNT:
|
||||
alarming = 1;
|
||||
state->crit_count = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_MINSIZE:
|
||||
state->minsize = strtod_or_err(optarg, "illegal argument");
|
||||
break;
|
||||
case OPT_SET_IPV:
|
||||
switch (optarg[0]) {
|
||||
case '4':
|
||||
set_ipv_functions(state, IPv4);
|
||||
break;
|
||||
case '6':
|
||||
set_ipv_functions(state, IPv6);
|
||||
break;
|
||||
default:
|
||||
error(EXIT_FAILURE, 0, "unknown --ip-version argument: %s", optarg);
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
/* Print additional performance data in alarming mode */
|
||||
state->perfdata = 1;
|
||||
break;
|
||||
case 'A':
|
||||
/* Treat single networks as shared with network CIDR as name */
|
||||
state->all_as_shared = 1;
|
||||
break;
|
||||
case 'v':
|
||||
/* Print version */
|
||||
print_version();
|
||||
case 'h':
|
||||
/* Print help */
|
||||
usage(EXIT_SUCCESS);
|
||||
default:
|
||||
error(EXIT_FAILURE, 0, "Try %s --help for more information.", program_name);
|
||||
fclose (fopen_test);
|
||||
if (errno)
|
||||
{
|
||||
eprintf ("main: %s:", config.output_file);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Use default dhcpd.conf when user did not define anything. */
|
||||
if (state->dhcpdconf_file == NULL)
|
||||
state->dhcpdconf_file = DHCPDCONF_FILE;
|
||||
/* Use default dhcpd.leases when user did not define anything. */
|
||||
if (state->dhcpdlease_file == NULL)
|
||||
state->dhcpdlease_file = DHCPDLEASE_FILE;
|
||||
/* Use default limits when user did not define anything. */
|
||||
if (state->header_limit == 8) {
|
||||
char const *default_limit = OUTPUT_LIMIT;
|
||||
|
||||
state->header_limit = return_limit(default_limit[0]);
|
||||
state->number_limit = return_limit(default_limit[1]);
|
||||
}
|
||||
/* Output format is not defined, if alarm thresholds are then it's alarming, else use the
|
||||
* default. */
|
||||
if (state->output_format == '\0') {
|
||||
if (alarming == 1)
|
||||
state->output_format = 'a';
|
||||
else {
|
||||
const char *const default_format = OUTPUT_FORMAT;
|
||||
|
||||
state->output_format = default_format[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: for argument -o parameter not set");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'L':
|
||||
if (argv[optind] != NULL)
|
||||
{
|
||||
if (argv[optind][0] >= '0' && argv[optind][0] < '8')
|
||||
{
|
||||
config.output_limit[0] = (int) argv[optind][0] - '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: output limit mask %s illegal",
|
||||
argv[optind]);
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (argv[optind][1] >= '0' && argv[optind][1] < '8')
|
||||
{
|
||||
config.output_limit[1] = (int) argv[optind][1] - '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: output limit mask %s illegal",
|
||||
argv[optind]);
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
eprintf ("main: for argument -L parameter not set");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
break;
|
||||
case 'v':
|
||||
print_version ();
|
||||
exit (EXIT_SUCCESS);
|
||||
case 'h':
|
||||
print_help ();
|
||||
exit (EXIT_SUCCESS);
|
||||
default:
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
if (state->output_format == 'X' || state->output_format == 'J') {
|
||||
state->print_mac_addreses = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* Output function selection */
|
||||
switch (config.output_format[0])
|
||||
{
|
||||
case 't':
|
||||
output_analysis = output_txt;
|
||||
break;
|
||||
case 'h':
|
||||
output_analysis = output_html;
|
||||
break;
|
||||
case 'c':
|
||||
output_analysis = output_csv;
|
||||
break;
|
||||
case 's':
|
||||
/* output_analysis = output_snmp; */
|
||||
output_analysis = output_txt;
|
||||
break;
|
||||
default:
|
||||
eprintf ("main: unknown ouput format");
|
||||
print_help ();
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* Do actual job */
|
||||
prepare_storage ();
|
||||
parse_config (config.dhcpdconf_file);
|
||||
parse_leases ();
|
||||
prepare_data ();
|
||||
do_counting ();
|
||||
output_analysis ();
|
||||
clean_up ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*!\brief Start of execution. This will mostly call other functions one
|
||||
* after another.
|
||||
*
|
||||
* \return Return value indicates success or fail or analysis, unless
|
||||
* either --warning or --critical options are in use, which makes the
|
||||
* return value in some cases to match with Nagios expectations about
|
||||
* alarming. */
|
||||
int main(int argc, char **argv)
|
||||
/* Global allocations, counter resets etc */
|
||||
int
|
||||
prepare_storage ()
|
||||
{
|
||||
struct conf_t state = {
|
||||
.warning = ALARM_WARN,
|
||||
.critical = ALARM_CRIT,
|
||||
.warn_count = 0x100000000, /* == 2^32 that is the entire IPv4 space */
|
||||
.crit_count = 0x100000000, /* basically turns off the count criteria */
|
||||
.header_limit = 8,
|
||||
.ranges_size = 64,
|
||||
.ip_version = IPvUNKNOWN,
|
||||
.color_mode = color_auto
|
||||
};
|
||||
int ret_val;
|
||||
num_ranges = num_shared_networks = 0;
|
||||
shared_networks =
|
||||
safe_malloc (sizeof (struct shared_network_t) * SHARED_NETWORKS);
|
||||
shared_net_names = safe_malloc (sizeof (char) * SHARED_NETWORKS_NAMES);
|
||||
|
||||
atexit(close_stdout);
|
||||
set_program_name(argv[0]);
|
||||
prepare_memory(&state);
|
||||
set_ipv_functions(&state, IPvUNKNOWN);
|
||||
parse_command_line_opts(&state, argc, argv);
|
||||
ranges = safe_malloc (sizeof (struct range_t) * RANGES);
|
||||
|
||||
/* Do the job */
|
||||
parse_config(&state, 1, state.dhcpdconf_file, state.shared_net_root);
|
||||
parse_leases(&state);
|
||||
prepare_data(&state);
|
||||
do_counting(&state);
|
||||
if (state.sorts != NULL)
|
||||
mergesort_ranges(&state, state.ranges, state.num_ranges, NULL, 1);
|
||||
if (state.reverse_order == 1)
|
||||
flip_ranges(&state);
|
||||
ret_val = output_analysis(&state);
|
||||
clean_up(&state);
|
||||
return (ret_val);
|
||||
/* First shared network entry is all networks */
|
||||
strcpy (shared_net_names, "All networks");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,372 +1,94 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file dhcpd-pools.h
|
||||
* \brief Global definitions of structures, enums, and function prototypes.
|
||||
*/
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef DHCPD_POOLS_H
|
||||
# define DHCPD_POOLS_H 1
|
||||
|
||||
# include <config.h>
|
||||
# include <arpa/inet.h>
|
||||
# include <stddef.h>
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <uthash.h>
|
||||
/* Feature test switches */
|
||||
#define _POSIX_SOURCE 1
|
||||
#define POSIXLY_CORRECT 1
|
||||
|
||||
/*! \def likely(x)
|
||||
* \brief Symbolic call to __builtin_expect'ed branch.
|
||||
*/
|
||||
/*! \def unlikely(x)
|
||||
* \brief Symbolic call to not-__builtin_expect'ed branch.
|
||||
*/
|
||||
# ifdef HAVE_BUILTIN_EXPECT
|
||||
# define likely(x) __builtin_expect(!!(x), 1)
|
||||
# define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
# else
|
||||
# define likely(x) (x)
|
||||
# define unlikely(x) (x)
|
||||
# endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
extern void exit ();
|
||||
extern char *malloc ();
|
||||
#endif /* STDC_HEADERS */
|
||||
|
||||
/*! \def _DP_ATTRIBUTE_HOT
|
||||
* \brief The function attribute __hot__ was added in gcc 4.3. See gnu
|
||||
* documentation for further information.
|
||||
* https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-hot-function-attribute
|
||||
*/
|
||||
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
# define _DP_ATTRIBUTE_HOT __attribute__ ((__hot__))
|
||||
# else
|
||||
# define _DP_ATTRIBUTE_HOT /* empty */
|
||||
# endif
|
||||
|
||||
/*! \union ipaddr_t
|
||||
* \brief Memory space for a binary IP address saving. */
|
||||
union ipaddr_t {
|
||||
uint32_t v4;
|
||||
unsigned char v6[16];
|
||||
/* Structures and unions */
|
||||
struct configuration_t
|
||||
{
|
||||
char *dhcpdconf_file;
|
||||
char *dhcpdlease_file;
|
||||
char output_format[2];
|
||||
char *output_file;
|
||||
int output_limit[2];
|
||||
};
|
||||
struct shared_network_t
|
||||
{
|
||||
char *name;
|
||||
unsigned long int available;
|
||||
unsigned long int used;
|
||||
};
|
||||
struct range_t
|
||||
{
|
||||
struct shared_network_t *shared_net;
|
||||
unsigned long int first_ip;
|
||||
unsigned long int last_ip;
|
||||
unsigned long int count;
|
||||
};
|
||||
|
||||
/*! \enum dhcp_version
|
||||
* \brief The IP version, IPv4 or IPv6, served by the dhcpd.
|
||||
*/
|
||||
enum dhcp_version {
|
||||
IPvUNKNOWN,
|
||||
IPv4,
|
||||
IPv6
|
||||
};
|
||||
/* External variables */
|
||||
char *program_name;
|
||||
static const float version_number = 2.3;
|
||||
struct configuration_t config;
|
||||
|
||||
/*! \enum prefix_t
|
||||
* \brief Enumeration of interesting data in dhcpd.leases file, that has to
|
||||
* be further examined, and saved. Functions xstrstr_v4() and xstrstr_v6()
|
||||
* return one of these values to parse_leases().
|
||||
*/
|
||||
enum prefix_t {
|
||||
PREFIX_LEASE,
|
||||
PREFIX_BINDING_STATE_FREE,
|
||||
PREFIX_BINDING_STATE_ABANDONED,
|
||||
PREFIX_BINDING_STATE_EXPIRED,
|
||||
PREFIX_BINDING_STATE_RELEASED,
|
||||
PREFIX_BINDING_STATE_ACTIVE,
|
||||
PREFIX_BINDING_STATE_BACKUP,
|
||||
PREFIX_HARDWARE_ETHERNET,
|
||||
PREFIX_STARTS,
|
||||
PREFIX_ENDS,
|
||||
PREFIX_HOSTNAME,
|
||||
NUM_OF_PREFIX
|
||||
};
|
||||
static int output_limit_bit_1 = 1;
|
||||
static int output_limit_bit_2 = 2;
|
||||
static int output_limit_bit_3 = 4;
|
||||
|
||||
/*! \enum color_mode
|
||||
* \brief Enumeration whether to use or not color output.
|
||||
*/
|
||||
enum color_mode {
|
||||
color_unknown,
|
||||
color_off,
|
||||
color_on,
|
||||
color_auto /*!< Default, use colors when output terminal is interactive. */
|
||||
};
|
||||
struct shared_network_t *shared_networks;
|
||||
char *shared_net_names;
|
||||
unsigned int num_shared_networks;
|
||||
|
||||
/*! \struct shared_network_t
|
||||
* \brief Counters for an individual shared network. This data entry is
|
||||
* also used for 'all networks' counting.
|
||||
*/
|
||||
struct shared_network_t {
|
||||
char *name;
|
||||
double available;
|
||||
double used;
|
||||
double touched;
|
||||
double backups;
|
||||
struct shared_network_t *next;
|
||||
int netmask;
|
||||
};
|
||||
struct range_t *ranges;
|
||||
unsigned int num_ranges;
|
||||
|
||||
/*! \struct range_t
|
||||
* \brief Counters for an individual range.
|
||||
*/
|
||||
struct range_t {
|
||||
struct shared_network_t *shared_net;
|
||||
union ipaddr_t first_ip;
|
||||
union ipaddr_t last_ip;
|
||||
double count;
|
||||
double touched;
|
||||
double backups;
|
||||
};
|
||||
|
||||
/*! \struct output_helper_t
|
||||
* \brief Various per range and shared net temporary calculation results.
|
||||
*/
|
||||
struct output_helper_t {
|
||||
double range_size;
|
||||
double percent;
|
||||
double tc;
|
||||
double tcp;
|
||||
double bup;
|
||||
int status;
|
||||
};
|
||||
|
||||
/*! \struct status_counts_t
|
||||
* \brief Range and shared network alarming status counts.
|
||||
*/
|
||||
struct status_counts_t {
|
||||
unsigned int warning;
|
||||
unsigned int critical;
|
||||
unsigned int ok;
|
||||
unsigned int ignored;
|
||||
};
|
||||
|
||||
/*! \enum ltype
|
||||
* \brief Lease state types. These are the possible values in struct leases_t.
|
||||
*/
|
||||
enum ltype {
|
||||
ACTIVE,
|
||||
FREE,
|
||||
BACKUP
|
||||
};
|
||||
|
||||
/*! \struct leases_t
|
||||
* \brief An individual lease. These leaases are hashed.
|
||||
*/
|
||||
struct leases_t {
|
||||
union ipaddr_t ip; /* ip as key */
|
||||
char *ethernet;
|
||||
UT_hash_handle hh;
|
||||
enum ltype type;
|
||||
char *ends;
|
||||
char *starts;
|
||||
char *hostname;
|
||||
};
|
||||
|
||||
/*! \enum limbits
|
||||
* \brief Output limit bits.
|
||||
*/
|
||||
enum limbits {
|
||||
R_BIT = (1 << 0), /*!< Range limit. */
|
||||
S_BIT = (1 << 1), /*!< Shared networks limit. */
|
||||
A_BIT = (1 << 2) /*!< All networks summary limit. */
|
||||
};
|
||||
|
||||
/*! \def STATE_OK
|
||||
* \brief Nagios alarm exit value.
|
||||
*/
|
||||
# define STATE_OK 0
|
||||
# define STATE_WARNING 1
|
||||
# define STATE_CRITICAL 2
|
||||
|
||||
/*! \var comparer_t
|
||||
* \brief Function pointer holding sort algorithm.
|
||||
*/
|
||||
typedef int (*comparer_t) (struct range_t *r1, struct range_t *r2);
|
||||
|
||||
/*! \struct output_sort
|
||||
* \brief Linked list of sort functions.
|
||||
*/
|
||||
struct output_sort {
|
||||
comparer_t func;
|
||||
struct output_sort *next;
|
||||
};
|
||||
|
||||
/*! \struct conf_t
|
||||
* \brief Runtime configuration state.
|
||||
*/
|
||||
struct conf_t {
|
||||
struct shared_network_t *shared_net_root; /*!< First entry in shared network linked list, that is the 'all networks', */
|
||||
struct shared_network_t *shared_net_head; /*!< Last entry in shared network linked list. */
|
||||
struct range_t *ranges; /*!< Array of ranges. */
|
||||
unsigned int num_ranges; /*!< Number of ranges in the ranges array. */
|
||||
enum dhcp_version ip_version; /*!< Designator if the dhcpd is running in IPv4 or IPv6 mode. */
|
||||
size_t ranges_size; /*!< Size of the ranges array. */
|
||||
struct leases_t *leases; /*!< An array of individual leases from dhcpd.leases file. */
|
||||
const char *dhcpdconf_file; /*!< Path to dhcpd.conf file. */
|
||||
const char *dhcpdlease_file; /*!< Path to dhcpd.leases file. */
|
||||
struct output_sort *sorts; /*!< Linked list how to sort ranges. */
|
||||
const char *output_file; /*!< Output file path. */
|
||||
const char *mustach_template; /*!< Mustach template file path. */
|
||||
double warning; /*!< Warning percent threshold. */
|
||||
double critical; /*!< Critical percent threshold. */
|
||||
double warn_count; /*!< Maximum number of free IP's before warning. */
|
||||
double crit_count; /*!< Maximum number of free IP's before critical. */
|
||||
double minsize; /*!< Minimum size of range or shared network to be considered exceeding threshold. */
|
||||
int color_format; /*!< Column to use in color_tags array. */
|
||||
char output_format; /*!< Output format, such as text, json, xml, .... */
|
||||
uint32_t
|
||||
print_mac_addreses:1, /*!< Print mac address in xml or json. */
|
||||
reverse_order:1, /*!< Reverse sort order. */
|
||||
backups_found:1, /*!< Indicator if dhcpd.leases file has leases in backup state. */
|
||||
snet_alarms:1, /*!< Suppress alarming thresholds for ranges that are part of a shared network. */
|
||||
perfdata:1, /*!< Include performance statistics when using Nagios alarm output format. */
|
||||
all_as_shared:1, /*!< Treat stand-alone subnets as a shared network. */
|
||||
header_limit:4, /*!< Bits to suppress header output. */
|
||||
number_limit:3, /*!< Bits to suppress value output. */
|
||||
skip_ok:1, /*!< Skip none-alarming values from output. */
|
||||
skip_warning:1, /*!< Skip warning values from output. */
|
||||
skip_critical:1, /*!< Skip critical values from output. */
|
||||
skip_minsize:1, /*!< Skip alarming values that are below minsize from output. */
|
||||
skip_suppressed:1, /*!< Skip alarming values that are suppressed with --snet-alarms option, or they are shared networks without IP availability. */
|
||||
color_mode:2; /*!< Indicator if colors should be used in output. */
|
||||
};
|
||||
unsigned long int *leases;
|
||||
unsigned long int num_leases;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/* analyze.c */
|
||||
extern void prepare_data(struct conf_t *state);
|
||||
extern void do_counting(struct conf_t *state);
|
||||
|
||||
/* getdata.c */
|
||||
extern int parse_leases(struct conf_t *state);
|
||||
extern void parse_config(struct conf_t *state, const int is_include,
|
||||
const char *restrict config_file,
|
||||
struct shared_network_t *restrict shared_p);
|
||||
|
||||
/* hash.c */
|
||||
extern void (*add_lease) (struct conf_t *state, union ipaddr_t *addr, enum ltype type);
|
||||
extern void add_lease_init(struct conf_t *state, union ipaddr_t *addr, enum ltype type);
|
||||
extern void add_lease_v4(struct conf_t *state, union ipaddr_t *addr, enum ltype type);
|
||||
extern void add_lease_v6(struct conf_t *state, union ipaddr_t *addr, enum ltype type);
|
||||
|
||||
extern struct leases_t *(*find_lease) (struct conf_t *state, union ipaddr_t *addr);
|
||||
extern struct leases_t *find_lease_init(struct conf_t *state, union ipaddr_t *addr);
|
||||
extern struct leases_t *find_lease_v4(struct conf_t *state, union ipaddr_t *addr);
|
||||
extern struct leases_t *find_lease_v6(struct conf_t *state, union ipaddr_t *addr);
|
||||
|
||||
extern void delete_lease(struct conf_t *state, struct leases_t *lease);
|
||||
extern void delete_all_leases(struct conf_t *state);
|
||||
|
||||
/* mustach-dhcpd-pools.c */
|
||||
extern int mustach_dhcpd_pools(struct conf_t *state);
|
||||
|
||||
/* other.c */
|
||||
extern void set_ipv_functions(struct conf_t *state, int version);
|
||||
extern void flip_ranges(struct conf_t *state);
|
||||
extern void clean_up(struct conf_t *state);
|
||||
extern void parse_cidr(struct conf_t *state, struct range_t *range_p, const char *word);
|
||||
extern int parse_color_mode(const char *restrict arg);
|
||||
extern double strtod_or_err(const char *restrict str, const char *restrict errmesg);
|
||||
extern void __attribute__ ((noreturn)) print_version(void);
|
||||
extern void __attribute__ ((noreturn)) usage(int status);
|
||||
extern void dp_time_tool(FILE *file, const char *path, int epoch);
|
||||
|
||||
extern int (*parse_ipaddr) (struct conf_t *state, const char *restrict src,
|
||||
union ipaddr_t *restrict dst);
|
||||
extern int parse_ipaddr_init(struct conf_t *state, const char *restrict src,
|
||||
union ipaddr_t *restrict dst);
|
||||
extern int parse_ipaddr_v4(struct conf_t *state, const char *restrict src,
|
||||
union ipaddr_t *restrict dst);
|
||||
extern int parse_ipaddr_v6(struct conf_t *state, const char *restrict src,
|
||||
union ipaddr_t *restrict dst);
|
||||
|
||||
extern int (*xstrstr) (struct conf_t *state, const char *restrict str);
|
||||
extern int xstrstr_init(struct conf_t *state, const char *restrict str);
|
||||
extern int xstrstr_v4(struct conf_t *state, const char *restrict str);
|
||||
extern int xstrstr_v6(struct conf_t *state, const char *restrict str);
|
||||
|
||||
extern void (*copy_ipaddr) (union ipaddr_t *restrict dst, const union ipaddr_t *restrict src);
|
||||
extern void copy_ipaddr_init(union ipaddr_t *restrict dst, const union ipaddr_t *restrict src);
|
||||
extern void copy_ipaddr_v4(union ipaddr_t *restrict dst, const union ipaddr_t *restrict src);
|
||||
extern void copy_ipaddr_v6(union ipaddr_t *restrict dst, const union ipaddr_t *restrict src);
|
||||
|
||||
extern const char *(*ntop_ipaddr) (const union ipaddr_t *ip);
|
||||
extern const char *ntop_ipaddr_init(const union ipaddr_t *ip);
|
||||
extern const char *ntop_ipaddr_v4(const union ipaddr_t *ip);
|
||||
extern const char *ntop_ipaddr_v6(const union ipaddr_t *ip);
|
||||
|
||||
extern double (*get_range_size) (const struct range_t *r);
|
||||
extern double get_range_size_init(const struct range_t *r);
|
||||
extern double get_range_size_v4(const struct range_t *r);
|
||||
extern double get_range_size_v6(const struct range_t *r);
|
||||
|
||||
/* output.c */
|
||||
extern int range_output_helper(struct conf_t *state, struct output_helper_t *oh,
|
||||
struct range_t *range_p);
|
||||
extern int shnet_output_helper(struct conf_t *state, struct output_helper_t *oh,
|
||||
struct shared_network_t *shared_p);
|
||||
extern int output_analysis(struct conf_t *state);
|
||||
extern void range_alarms(struct conf_t *state, struct status_counts_t *rangstat);
|
||||
extern void shared_net_alarms(struct conf_t *state, struct status_counts_t *sharstat);
|
||||
|
||||
/* sort.c */
|
||||
extern void mergesort_ranges(struct conf_t *state,
|
||||
struct range_t *restrict orig, unsigned int size,
|
||||
struct range_t *restrict temp, const int root_call);
|
||||
|
||||
extern int (*leasecomp) (const struct leases_t *restrict a, const struct leases_t *restrict b);
|
||||
extern int leasecomp_init(const struct leases_t *restrict a
|
||||
__attribute__ ((unused)),
|
||||
const struct leases_t *restrict b __attribute__ ((unused)));
|
||||
extern int leasecomp_v4(const struct leases_t *restrict a, const struct leases_t *restrict b);
|
||||
extern int leasecomp_v6(const struct leases_t *restrict a, const struct leases_t *restrict b);
|
||||
|
||||
extern int (*ipcomp) (const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
extern int ipcomp_init(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
extern int ipcomp_v4(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
extern int ipcomp_v6(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b);
|
||||
|
||||
extern int rangecomp(const void *restrict r1, const void *restrict r2)
|
||||
__attribute__ ((nonnull(1, 2)));
|
||||
|
||||
extern int comp_cur(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_double(double f1, double f2);
|
||||
extern int comp_ip(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_max(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_percent(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_tc(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_tcperc(struct range_t *r1, struct range_t *r2);
|
||||
extern int comp_touched(struct range_t *r1, struct range_t *r2);
|
||||
|
||||
extern comparer_t field_selector(char c);
|
||||
extern double ret_percent(struct range_t r);
|
||||
extern double ret_tc(struct range_t r);
|
||||
extern double ret_tcperc(struct range_t r);
|
||||
int prepare_storage (void);
|
||||
int parse_leases (void);
|
||||
int parse_config (char *);
|
||||
int do_counting (void);
|
||||
int intcomp (const void *x, const void *y);
|
||||
int rangecomp (const void *r1, const void *r2);
|
||||
int prepare_data (void);
|
||||
void *safe_malloc (size_t size);
|
||||
void eprintf (char *, ...);
|
||||
void print_version (void);
|
||||
void print_help (void);
|
||||
int nth_field (int n, char *dest, const char *src);
|
||||
int (*output_analysis) (void);
|
||||
int output_txt (void);
|
||||
int output_html (void);
|
||||
int output_csv (void);
|
||||
void clean_up (void);
|
||||
|
||||
#endif /* DHCPD_POOLS_H */
|
||||
|
|
|
|||
763
src/getdata.c
763
src/getdata.c
|
|
@ -1,483 +1,324 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file getdata.c
|
||||
* \brief Functions to read data from dhcpd.conf and dhcdp.leases files.
|
||||
*/
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
extern void exit ();
|
||||
extern char *malloc ();
|
||||
#define EXIT_FAILURE 1 /* Failing exit status. */
|
||||
#define EXIT_SUCCESS 0 /* Successful exit status. */
|
||||
#endif /* STDC_HEADERS */
|
||||
|
||||
#include "error.h"
|
||||
#include "xalloc.h"
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
#include "defaults.h"
|
||||
|
||||
/*! \enum dhcpd_magic_numbers
|
||||
* \brief MAXLEN is maximum expected line length in dhcpd.conf and
|
||||
* dhcpd.leases.
|
||||
*/
|
||||
enum dhcpd_magic_numbers {
|
||||
MAXLEN = 1024
|
||||
};
|
||||
|
||||
/*! \enum isc_conf_parser
|
||||
* \brief Configuration file parsing state flags. The
|
||||
* is_interesting_config_clause() will return one of these to parse_config().
|
||||
*/
|
||||
enum isc_conf_parser {
|
||||
ITS_NOTHING_INTERESTING,
|
||||
ITS_A_RANGE_FIRST_IP,
|
||||
ITS_A_RANGE_SECOND_IP,
|
||||
ITS_A_SHAREDNET,
|
||||
ITS_AN_INCLUDE,
|
||||
ITS_A_SUBNET,
|
||||
ITS_A_NETMASK
|
||||
};
|
||||
|
||||
/*! \brief Lease file parser. The parser can only read ISC DHCPD
|
||||
* dhcpd.leases file format. */
|
||||
int parse_leases(struct conf_t *state)
|
||||
/* Parser for dhcpd.conf */
|
||||
int
|
||||
parse_config (char *config_file)
|
||||
{
|
||||
FILE *dhcpd_leases;
|
||||
char *line, *ipstring, macstring[20], *stop, endsstr[30], startsstr[30], hostnamestr[MAXLEN];
|
||||
union ipaddr_t addr;
|
||||
struct leases_t *lease;
|
||||
FILE *dhcpd_config;
|
||||
char *line, *shared_name_p, *last_shared, *tmp, *matchp;
|
||||
unsigned int braces = 0, linelen, i;
|
||||
struct in_addr inp;
|
||||
struct range_t *range_p;
|
||||
struct shared_network_t *shared_p;
|
||||
|
||||
dhcpd_leases = fopen(state->dhcpdlease_file, "r");
|
||||
if (dhcpd_leases == NULL)
|
||||
error(EXIT_FAILURE, errno, "parse_leases: %s", state->dhcpdlease_file);
|
||||
#ifdef HAVE_POSIX_FADVISE
|
||||
# ifdef POSIX_FADV_SEQUENTIAL
|
||||
if (posix_fadvise(fileno(dhcpd_leases), 0, 0, POSIX_FADV_SEQUENTIAL) != 0)
|
||||
error(EXIT_FAILURE, errno, "parse_leases: fadvise %s", state->dhcpdlease_file);
|
||||
# endif /* POSIX_FADV_SEQUENTIAL */
|
||||
#endif /* HAVE_POSIX_FADVISE */
|
||||
line = xmalloc(sizeof(char) * MAXLEN);
|
||||
line[0] = '\0';
|
||||
ipstring = xmalloc(sizeof(char) * MAXLEN);
|
||||
ipstring[0] = '\0';
|
||||
endsstr[0] = '\0';
|
||||
startsstr[0] = '\0';
|
||||
hostnamestr[0] = '\0';
|
||||
while (!feof(dhcpd_leases)) {
|
||||
if (!fgets(line, MAXLEN, dhcpd_leases) && ferror(dhcpd_leases))
|
||||
error(EXIT_FAILURE, errno, "parse_leases: %s", state->dhcpdlease_file);
|
||||
switch (xstrstr(state, line)) {
|
||||
/* It's a lease, save IP */
|
||||
case PREFIX_LEASE:
|
||||
stop =
|
||||
memccpy(ipstring,
|
||||
line + (state->ip_version ==
|
||||
IPv4 ? 6 : 9), ' ', strlen(line));
|
||||
if (stop != NULL) {
|
||||
--stop;
|
||||
*stop = '\0';
|
||||
}
|
||||
parse_ipaddr(state, ipstring, &addr);
|
||||
break;
|
||||
case PREFIX_BINDING_STATE_FREE:
|
||||
case PREFIX_BINDING_STATE_ABANDONED:
|
||||
case PREFIX_BINDING_STATE_EXPIRED:
|
||||
case PREFIX_BINDING_STATE_RELEASED:
|
||||
if ((lease = find_lease(state, &addr)) != NULL)
|
||||
delete_lease(state, lease);
|
||||
add_lease(state, &addr, FREE);
|
||||
break;
|
||||
case PREFIX_BINDING_STATE_ACTIVE:
|
||||
/* remove old entry, if exists */
|
||||
if ((lease = find_lease(state, &addr)) != NULL)
|
||||
delete_lease(state, lease);
|
||||
add_lease(state, &addr, ACTIVE);
|
||||
break;
|
||||
case PREFIX_BINDING_STATE_BACKUP:
|
||||
/* remove old entry, if exists */
|
||||
if ((lease = find_lease(state, &addr)) != NULL)
|
||||
delete_lease(state, lease);
|
||||
add_lease(state, &addr, BACKUP);
|
||||
state->backups_found = 1;
|
||||
break;
|
||||
case PREFIX_HARDWARE_ETHERNET:
|
||||
if (state->print_mac_addreses == 0)
|
||||
break;
|
||||
memcpy(macstring, line + 20, 17);
|
||||
macstring[17] = '\0';
|
||||
if ((lease = find_lease(state, &addr)) != NULL) {
|
||||
lease->ethernet = xstrdup(macstring);
|
||||
lease->starts = xstrdup(startsstr);
|
||||
startsstr[0] = '\0';
|
||||
lease->ends = xstrdup(endsstr);
|
||||
endsstr[0] = '\0';
|
||||
}
|
||||
break;
|
||||
case PREFIX_ENDS:
|
||||
if (state->print_mac_addreses == 0)
|
||||
break;
|
||||
strncpy(endsstr, line + 7, sizeof(endsstr)-1);
|
||||
endsstr[strlen(endsstr)-2] = '\0';
|
||||
break;
|
||||
case PREFIX_STARTS:
|
||||
if (state->print_mac_addreses == 0)
|
||||
break;
|
||||
strncpy(startsstr, line + 9, sizeof(startsstr)-1);
|
||||
startsstr[strlen(startsstr)-2] = '\0';
|
||||
break;
|
||||
case PREFIX_HOSTNAME:
|
||||
if (state->print_mac_addreses == 0)
|
||||
break;
|
||||
strncpy(hostnamestr, line + 19, sizeof(hostnamestr)-1);
|
||||
hostnamestr[strlen(hostnamestr)-3] = '\0';
|
||||
if ((lease = find_lease(state, &addr)) != NULL) {
|
||||
lease->hostname = xstrdup(hostnamestr);
|
||||
}
|
||||
hostnamestr[0] = '\0';
|
||||
break;
|
||||
default:
|
||||
/* do nothing */ ;
|
||||
}
|
||||
line = safe_malloc (sizeof (char) * MAXLEN);
|
||||
tmp = safe_malloc (sizeof (char) * MAXLEN);
|
||||
|
||||
shared_p = shared_networks;
|
||||
range_p = ranges;
|
||||
last_shared = SHARED_NETWORKS_NAMES + shared_net_names;
|
||||
shared_name_p = shared_net_names;
|
||||
|
||||
/* Save and skip all networks name */
|
||||
shared_p->name = shared_net_names;
|
||||
shared_name_p += strlen (shared_name_p) + 1;
|
||||
shared_p++;
|
||||
|
||||
dhcpd_config = fopen (config_file, "r");
|
||||
if (dhcpd_config == NULL)
|
||||
{
|
||||
eprintf ("parse_config: %s:", config_file);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
while (!feof (dhcpd_config))
|
||||
{
|
||||
fgets (line, MAXLEN, dhcpd_config);
|
||||
matchp = strchr (line, '#');
|
||||
if (matchp)
|
||||
{
|
||||
*matchp = '\0';
|
||||
}
|
||||
#undef HAS_PREFIX
|
||||
free(line);
|
||||
free(ipstring);
|
||||
fclose(dhcpd_leases);
|
||||
return 0;
|
||||
matchp = strchr (line, ';');
|
||||
if (matchp)
|
||||
{
|
||||
*matchp = '\0';
|
||||
}
|
||||
matchp = strchr (line, '\n');
|
||||
if (matchp)
|
||||
{
|
||||
*matchp = '\0';
|
||||
}
|
||||
linelen = strlen (line);
|
||||
if (linelen == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Count braces. What a crappy way to "know" is range in
|
||||
* shared defined in network declaration or not. I must
|
||||
* fix this some day. */
|
||||
for (i = 0; i < linelen; i++)
|
||||
{
|
||||
if (line[i] == '{')
|
||||
{
|
||||
braces++;
|
||||
}
|
||||
else if (line[i] == '}')
|
||||
{
|
||||
braces--;
|
||||
}
|
||||
}
|
||||
|
||||
/* Smells like line that defines range. */
|
||||
matchp = strstr (line, "range");
|
||||
if (matchp)
|
||||
{
|
||||
/* Match "range" that part of some other text. */
|
||||
matchp--;
|
||||
i = matchp[0];
|
||||
if (!isspace(i)) {
|
||||
continue;
|
||||
}
|
||||
matchp = matchp + 6;
|
||||
i = matchp[0];
|
||||
if (!isspace(i)) {
|
||||
continue;
|
||||
}
|
||||
/* shared_p is incremented too early. This glue is
|
||||
* ugly and should be fixed. */
|
||||
if (braces > 1)
|
||||
{
|
||||
range_p->shared_net = shared_p - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
range_p->shared_net = NULL;
|
||||
}
|
||||
|
||||
/* Range declaration is presumed to be single line. If
|
||||
* range written on multiple lines output will be most
|
||||
* likely humorous or crash. This bug needs to be
|
||||
* fixed, even thou I don't expect many people to
|
||||
* complain about this bug. */
|
||||
nth_field (2, tmp, line);
|
||||
inet_aton (tmp, &inp);
|
||||
|
||||
/* Small speed up. Range will be greater than range
|
||||
* small and lesser than range great, equal part in
|
||||
* test can be skipped so test that compares all IP's
|
||||
* is perhaps a little faster. This kludge must be
|
||||
* remembered at output of results */
|
||||
range_p->first_ip = htonl (inp.s_addr) - 1;
|
||||
nth_field (3, tmp, line);
|
||||
|
||||
inet_aton (tmp, &inp);
|
||||
range_p->last_ip = htonl (inp.s_addr) + 1;
|
||||
|
||||
range_p->count = 0;
|
||||
|
||||
range_p++;
|
||||
num_ranges++;
|
||||
|
||||
if (num_ranges > RANGES)
|
||||
{
|
||||
eprintf
|
||||
("parse_config: Range space full! Increase RANGES and recompile.");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else if (strstr (line, "shared-network"))
|
||||
{
|
||||
/* Check is pessimistic but its better this way */
|
||||
linelen = strlen (line);
|
||||
if (shared_name_p + linelen > last_shared)
|
||||
{
|
||||
eprintf
|
||||
("parse_config: Shared network name space full! Increase SHARED_NETWORKS_NAMES and recompile.\n");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* See range declaration bug above. */
|
||||
nth_field (2, shared_name_p, line);
|
||||
shared_p->name = shared_name_p;
|
||||
shared_p->available = 0;
|
||||
shared_p->used = 0;
|
||||
|
||||
shared_p++;
|
||||
num_shared_networks++;
|
||||
shared_name_p += strlen (shared_name_p) + 1;
|
||||
|
||||
if (num_shared_networks > SHARED_NETWORKS)
|
||||
{
|
||||
eprintf
|
||||
("parse_config: Shared network space full! Increase SHARED_NETWORKS and recompile.\n");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* If include files are allowed to write with relative path
|
||||
* this if needs to be fixed. */
|
||||
else if (strstr (line, "include"))
|
||||
{
|
||||
nth_field (2, tmp, line);
|
||||
/* Perhaps quote mark striping could more pretty, but
|
||||
* it isn't - Yours Sincerely lazy author. */
|
||||
matchp = strrchr (tmp, '"');
|
||||
|
||||
if (matchp)
|
||||
{
|
||||
*matchp = '\0';
|
||||
}
|
||||
if (tmp[0] == '"')
|
||||
{
|
||||
parse_config (++tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
parse_config (tmp);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Keyword search in dhcpd.conf file.
|
||||
* \param s A line from the dhcpd.conf file.
|
||||
* \return Indicator what configuration was found. */
|
||||
static int is_interesting_config_clause(struct conf_t *state, char const *restrict s)
|
||||
/* Parse dhcpd.leases file. All performance boosts for this
|
||||
* function are wellcome */
|
||||
int
|
||||
parse_leases (void)
|
||||
{
|
||||
if (strstr(s, "range"))
|
||||
return ITS_A_RANGE_FIRST_IP;
|
||||
if (strstr(s, "shared-network"))
|
||||
return ITS_A_SHAREDNET;
|
||||
if (state->all_as_shared) {
|
||||
if (strstr(s, "subnet"))
|
||||
return ITS_A_SUBNET;
|
||||
if (strstr(s, "netmask"))
|
||||
return ITS_A_NETMASK;
|
||||
FILE *dhcpd_leases;
|
||||
char *line, *ipstring;
|
||||
struct in_addr inp;
|
||||
struct stat lease_file_stats;
|
||||
num_leases = 0;
|
||||
|
||||
dhcpd_leases = fopen (config.dhcpdlease_file, "r");
|
||||
if (dhcpd_leases == NULL)
|
||||
{
|
||||
eprintf ("parse_leases: %s:", config.dhcpdlease_file);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* I found out that there's one lease address per 300 bytes in
|
||||
* dhcpd.leases file. Malloc is little bit pessimistic, but I
|
||||
* think that this way program crashes slightly less frequetly.
|
||||
* If someone has higher density in lease file I'm interested
|
||||
* to hear about that. */
|
||||
if (stat (config.dhcpdlease_file, &lease_file_stats))
|
||||
{
|
||||
eprintf ("parse_leases: %s:", config.dhcpdlease_file);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
leases =
|
||||
safe_malloc (sizeof (long int) *
|
||||
((lease_file_stats.st_size / 250) + MAXLEN));
|
||||
|
||||
line = safe_malloc (sizeof (long int) * MAXLEN);
|
||||
ipstring = safe_malloc (sizeof (long int) * MAXLEN);
|
||||
|
||||
while (!feof (dhcpd_leases))
|
||||
{
|
||||
fgets (line, MAXLEN, dhcpd_leases);
|
||||
/* It's a lease */
|
||||
if (strstr (line, "lease") == line)
|
||||
{
|
||||
strncpy (ipstring, line, MAXLEN - 1);
|
||||
}
|
||||
if (strstr(s, "include"))
|
||||
return ITS_AN_INCLUDE;
|
||||
return ITS_NOTHING_INTERESTING;
|
||||
/* And this is lease state which we are interested about */
|
||||
if (strstr (line, "binding state active"))
|
||||
{
|
||||
nth_field (2, ipstring, ipstring);
|
||||
inet_aton (ipstring, &inp);
|
||||
leases[num_leases] = htonl (inp.s_addr);
|
||||
num_leases++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Flip first and last IP in range if they are in unusual order.
|
||||
*/
|
||||
static void reorder_last_first(struct range_t *range_p)
|
||||
/* Like strcpy but for field which is separated by white spaces.
|
||||
* Number of first field is 1 and not 0 like C programs should
|
||||
* have. Question of semantics, send mail to author if this
|
||||
* annoys. All performance boosts for this function are well
|
||||
* come. */
|
||||
int
|
||||
nth_field (int n, char *dest, const char *src)
|
||||
{
|
||||
if (ipcomp(&range_p->first_ip, &range_p->last_ip) > 0) {
|
||||
union ipaddr_t tmp;
|
||||
int i, j, k, th;
|
||||
i = j = k = th = 0;
|
||||
|
||||
tmp = range_p->first_ip;
|
||||
range_p->first_ip = range_p->last_ip;
|
||||
range_p->last_ip = tmp;
|
||||
for (; i < MAXLEN && th < n; i++)
|
||||
{
|
||||
if (src[i] == ' ' || src[i] == '\t')
|
||||
{
|
||||
if (j == 0 && i != 0)
|
||||
{
|
||||
th++;
|
||||
}
|
||||
j = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief The dhcpd.conf file parser.
|
||||
* FIXME: This spaghetti monster function needs to be rewrote at least
|
||||
* ones more.
|
||||
*/
|
||||
void parse_config(struct conf_t *state, const int is_include, const char *restrict config_file,
|
||||
struct shared_network_t *restrict shared_p)
|
||||
{
|
||||
FILE *dhcpd_config;
|
||||
int newclause = 1, comment = 0, one_ip_range = 0; /* booleans */
|
||||
int quote = 0, braces = 0, argument = ITS_NOTHING_INTERESTING;
|
||||
size_t i = 0;
|
||||
char *word;
|
||||
int braces_shared = 1000;
|
||||
union ipaddr_t addr;
|
||||
struct range_t *range_p = NULL;
|
||||
|
||||
word = xmalloc(sizeof(char) * MAXLEN);
|
||||
if (is_include)
|
||||
/* Default place holder for ranges "All networks". */
|
||||
shared_p->name = state->shared_net_root->name;
|
||||
/* Open configuration file */
|
||||
dhcpd_config = fopen(config_file, "r");
|
||||
if (dhcpd_config == NULL) {
|
||||
if (is_include) {
|
||||
error(0, errno, "cannot open inlude: %s", config_file);
|
||||
return;
|
||||
}
|
||||
/* config if from command line, just exit with error */
|
||||
error(EXIT_FAILURE, errno, "parse_config: %s", config_file);
|
||||
}
|
||||
#ifdef HAVE_POSIX_FADVISE
|
||||
# ifdef POSIX_FADV_SEQUENTIAL
|
||||
if (posix_fadvise(fileno(dhcpd_config), 0, 0, POSIX_FADV_SEQUENTIAL) != 0)
|
||||
error(EXIT_FAILURE, errno, "parse_config: fadvise %s", config_file);
|
||||
# endif /* POSIX_FADV_SEQUENTIAL */
|
||||
#endif /* HAVE_POSIX_FADVISE */
|
||||
/* Very hairy stuff begins. */
|
||||
while (unlikely(!feof(dhcpd_config))) {
|
||||
int c;
|
||||
|
||||
c = fgetc(dhcpd_config);
|
||||
if (CHAR_MAX < c)
|
||||
continue;
|
||||
/* Certain characters are magical */
|
||||
switch (c) {
|
||||
/* Handle comments if they are not quoted */
|
||||
case '#':
|
||||
if (quote == 0)
|
||||
comment = 1;
|
||||
continue;
|
||||
case '"':
|
||||
if (comment == 0) {
|
||||
quote++;
|
||||
/* Either one or zero */
|
||||
quote = quote % 2;
|
||||
}
|
||||
continue;
|
||||
case '\n':
|
||||
/* New line resets comment section, but
|
||||
* not if quoted */
|
||||
if (quote == 0)
|
||||
comment = 0;
|
||||
break;
|
||||
case ';':
|
||||
/* Quoted colon does not mean new clause */
|
||||
if (0 < quote)
|
||||
break;
|
||||
if (comment == 0
|
||||
&& argument != ITS_A_RANGE_FIRST_IP
|
||||
&& argument != ITS_A_RANGE_SECOND_IP && argument != ITS_AN_INCLUDE) {
|
||||
newclause = 1;
|
||||
i = 0;
|
||||
} else if (argument == ITS_A_RANGE_FIRST_IP && one_ip_range == 1) {
|
||||
argument = ITS_A_RANGE_SECOND_IP;
|
||||
c = ' ';
|
||||
} else if (argument == ITS_A_RANGE_SECOND_IP && 0 < i) {
|
||||
/* Range ends to ; and this hair in code
|
||||
* make two ranges wrote together like...
|
||||
*
|
||||
* range 10.20.30.40 10.20.30.41;range 10.20.30.42 10.20.30.43;
|
||||
*
|
||||
* ...to be interpreted correctly. */
|
||||
c = ' ';
|
||||
break;
|
||||
} else if (argument == ITS_A_RANGE_SECOND_IP && i == 0) {
|
||||
if (!range_p) {
|
||||
long int pos;
|
||||
pos = ftell(dhcpd_config);
|
||||
error(EXIT_FAILURE, 0, "parse_config: parsing failed at position: %ld", pos);
|
||||
}
|
||||
range_p->last_ip = range_p->first_ip;
|
||||
goto newrange;
|
||||
}
|
||||
continue;
|
||||
case '{':
|
||||
if (0 < quote)
|
||||
break;
|
||||
if (comment == 0)
|
||||
braces++;
|
||||
/* i == 0 detects word that ends to brace like:
|
||||
*
|
||||
* shared-network DSL{ ... */
|
||||
if (i == 0) {
|
||||
newclause = 1;
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
case '}':
|
||||
if (0 < quote)
|
||||
break;
|
||||
if (comment == 0) {
|
||||
braces--;
|
||||
/* End of shared-network */
|
||||
if (braces_shared == braces) {
|
||||
/* FIXME: Using 1000 is lame, but
|
||||
* works. */
|
||||
braces_shared = 1000;
|
||||
shared_p = state->shared_net_root;
|
||||
}
|
||||
/* Not literally 1, but works for this
|
||||
* program */
|
||||
newclause = 1;
|
||||
}
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/* Either inside comment or Nth word of clause. */
|
||||
if (comment == 1 || (newclause == 0 && argument == ITS_NOTHING_INTERESTING))
|
||||
continue;
|
||||
/* Strip white spaces before new clause word. */
|
||||
if ((newclause == 1 || argument != ITS_NOTHING_INTERESTING)
|
||||
&& isspace(c) && i == 0 && one_ip_range == 0)
|
||||
continue;
|
||||
/* Save to word which clause this is. */
|
||||
if ((newclause == 1 || argument != ITS_NOTHING_INTERESTING)
|
||||
&& (!isspace(c) || 0 < quote)) {
|
||||
word[i] = (char) c;
|
||||
i++;
|
||||
/* Long word which is almost causing overflow. None
|
||||
* of words are this long which the program is
|
||||
* searching. */
|
||||
if (MAXLEN == i) {
|
||||
newclause = 0;
|
||||
i = 0;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
/* See if clause is something that parser is looking for. */
|
||||
else if (newclause == 1) {
|
||||
/* Insert string end & set state */
|
||||
word[i] = '\0';
|
||||
if (word[i - 1] != '{')
|
||||
newclause = 0;
|
||||
i = 0;
|
||||
argument = is_interesting_config_clause(state, word);
|
||||
if (argument == ITS_A_RANGE_FIRST_IP)
|
||||
one_ip_range = 1;
|
||||
}
|
||||
/* words after range, shared-network or include */
|
||||
else if (argument != ITS_NOTHING_INTERESTING) {
|
||||
word[i] = '\0';
|
||||
newclause = 0;
|
||||
i = 0;
|
||||
|
||||
switch (argument) {
|
||||
case ITS_A_RANGE_SECOND_IP:
|
||||
/* printf ("range 2nd ip: %s\n", word); */
|
||||
range_p = state->ranges + state->num_ranges;
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
if (strchr(word, '/')) {
|
||||
parse_cidr(state, range_p, word);
|
||||
one_ip_range = 0;
|
||||
} else {
|
||||
/* not cidr */
|
||||
parse_ipaddr(state, word, &addr);
|
||||
if (one_ip_range == 1) {
|
||||
one_ip_range = 0;
|
||||
copy_ipaddr(&range_p->first_ip, &addr);
|
||||
}
|
||||
copy_ipaddr(&range_p->last_ip, &addr);
|
||||
reorder_last_first(range_p);
|
||||
}
|
||||
newrange:
|
||||
range_p->count = 0;
|
||||
range_p->touched = 0;
|
||||
range_p->backups = 0;
|
||||
range_p->shared_net = shared_p;
|
||||
state->num_ranges++;
|
||||
if (state->ranges_size <= state->num_ranges) {
|
||||
state->ranges_size *= 2;
|
||||
state->ranges = xrealloc(state->ranges, sizeof(struct range_t) * state->ranges_size);
|
||||
range_p = state->ranges + state->num_ranges;
|
||||
}
|
||||
newclause = 1;
|
||||
break;
|
||||
case ITS_A_RANGE_FIRST_IP:
|
||||
/* printf ("range 1st ip: %s\n", word); */
|
||||
range_p = state->ranges + state->num_ranges;
|
||||
if (!(parse_ipaddr(state, word, &addr)))
|
||||
/* word was not ip, try again */
|
||||
break;
|
||||
copy_ipaddr(&range_p->first_ip, &addr);
|
||||
one_ip_range = 0;
|
||||
argument = ITS_A_RANGE_SECOND_IP;
|
||||
break;
|
||||
case ITS_A_SHAREDNET:
|
||||
case ITS_A_SUBNET:
|
||||
/* ignore subnets inside a shared-network */
|
||||
if (argument == ITS_A_SUBNET && shared_p != state->shared_net_root) {
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
break;
|
||||
}
|
||||
state->shared_net_head->next = xcalloc(sizeof(struct shared_network_t), 1);
|
||||
state->shared_net_head = state->shared_net_head->next;
|
||||
shared_p = state->shared_net_head;
|
||||
shared_p->name = xstrdup(word);
|
||||
shared_p->netmask = (argument == ITS_A_SUBNET ? -1 : 0); /* do not fill in netmask */
|
||||
/* record network's mask too */
|
||||
if (argument == ITS_A_SUBNET)
|
||||
newclause = 1;
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
braces_shared = braces;
|
||||
break;
|
||||
case ITS_A_NETMASK:
|
||||
/* fill in only when requested to do so */
|
||||
if (shared_p->netmask) {
|
||||
if (!(parse_ipaddr(state, word, &addr)))
|
||||
break;
|
||||
shared_p->netmask = 32;
|
||||
while ((addr.v4 & 0x01) == 0) {
|
||||
addr.v4 >>= 1;
|
||||
shared_p->netmask--;
|
||||
}
|
||||
snprintf(word, MAXLEN-1, "%s/%d", shared_p->name, shared_p->netmask);
|
||||
if (shared_p->name)
|
||||
free(shared_p->name);
|
||||
shared_p->name = xstrdup(word);
|
||||
}
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
braces_shared = braces;
|
||||
break;
|
||||
case ITS_AN_INCLUDE:
|
||||
/* printf ("include file: %s\n", word); */
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
parse_config(state, 0, word, shared_p);
|
||||
newclause = 1;
|
||||
break;
|
||||
case ITS_NOTHING_INTERESTING:
|
||||
/* printf ("nothing interesting: %s\n", word); */
|
||||
argument = ITS_NOTHING_INTERESTING;
|
||||
break;
|
||||
default:
|
||||
puts("impossible occurred, report a bug");
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
free(word);
|
||||
fclose(dhcpd_config);
|
||||
return;
|
||||
else if (th + 1 == n)
|
||||
{
|
||||
dest[k] = src[i];
|
||||
k++;
|
||||
j = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
j = 0;
|
||||
}
|
||||
}
|
||||
dest[k] = '\0';
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
1066
src/getopt.c
Normal file
1066
src/getopt.c
Normal file
File diff suppressed because it is too large
Load diff
183
src/getopt.h
Normal file
183
src/getopt.h
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
/* Declarations for getopt.
|
||||
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 02111-1307, USA. */
|
||||
|
||||
#ifndef _GETOPT_H
|
||||
|
||||
#ifndef __need_getopt
|
||||
# define _GETOPT_H 1
|
||||
#endif
|
||||
|
||||
/* If __GNU_LIBRARY__ is not already defined, either we are being used
|
||||
standalone, or this is the first header included in the source file.
|
||||
If we are being used with glibc, we need to include <features.h>, but
|
||||
that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
|
||||
not defined, include <ctype.h>, which will pull in <features.h> for us
|
||||
if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
|
||||
doesn't flood the namespace with stuff the way some other headers do.) */
|
||||
#if !defined __GNU_LIBRARY__
|
||||
# include <ctype.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
/* For communication from `getopt' to the caller.
|
||||
When `getopt' finds an option that takes an argument,
|
||||
the argument value is returned here.
|
||||
Also, when `ordering' is RETURN_IN_ORDER,
|
||||
each non-option ARGV-element is returned here. */
|
||||
|
||||
extern char *optarg;
|
||||
|
||||
/* Index in ARGV of the next element to be scanned.
|
||||
This is used for communication to and from the caller
|
||||
and for communication between successive calls to `getopt'.
|
||||
|
||||
On entry to `getopt', zero means this is the first call; initialize.
|
||||
|
||||
When `getopt' returns -1, this is the index of the first of the
|
||||
non-option elements that the caller should itself scan.
|
||||
|
||||
Otherwise, `optind' communicates from one call to the next
|
||||
how much of ARGV has been scanned so far. */
|
||||
|
||||
extern int optind;
|
||||
|
||||
/* Callers store zero here to inhibit the error message `getopt' prints
|
||||
for unrecognized options. */
|
||||
|
||||
extern int opterr;
|
||||
|
||||
/* Set to an option character which was unrecognized. */
|
||||
|
||||
extern int optopt;
|
||||
|
||||
#ifndef __need_getopt
|
||||
/* Describe the long-named options requested by the application.
|
||||
The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
|
||||
of `struct option' terminated by an element containing a name which is
|
||||
zero.
|
||||
|
||||
The field `has_arg' is:
|
||||
no_argument (or 0) if the option does not take an argument,
|
||||
required_argument (or 1) if the option requires an argument,
|
||||
optional_argument (or 2) if the option takes an optional argument.
|
||||
|
||||
If the field `flag' is not NULL, it points to a variable that is set
|
||||
to the value given in the field `val' when the option is found, but
|
||||
left unchanged if the option is not found.
|
||||
|
||||
To have a long-named option do something other than set an `int' to
|
||||
a compiled-in constant, such as set a value from `optarg', set the
|
||||
option's `flag' field to zero and its `val' field to a nonzero
|
||||
value (the equivalent single-letter option character, if there is
|
||||
one). For long options that have a zero `flag' field, `getopt'
|
||||
returns the contents of the `val' field. */
|
||||
|
||||
struct option
|
||||
{
|
||||
# if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
const char *name;
|
||||
# else
|
||||
char *name;
|
||||
# endif
|
||||
/* has_arg can't be an enum because some compilers complain about
|
||||
type mismatches in all the code that assumes it is an int. */
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
/* Names for the values of the `has_arg' field of `struct option'. */
|
||||
|
||||
# define no_argument 0
|
||||
# define required_argument 1
|
||||
# define optional_argument 2
|
||||
#endif /* need getopt */
|
||||
|
||||
|
||||
/* Get definitions and prototypes for functions to process the
|
||||
arguments in ARGV (ARGC of them, minus the program name) for
|
||||
options given in OPTS.
|
||||
|
||||
Return the option character from OPTS just read. Return -1 when
|
||||
there are no more options. For unrecognized options, or options
|
||||
missing arguments, `optopt' is set to the option letter, and '?' is
|
||||
returned.
|
||||
|
||||
The OPTS string is a list of characters which are recognized option
|
||||
letters, optionally followed by colons, specifying that that letter
|
||||
takes an argument, to be placed in `optarg'.
|
||||
|
||||
If a letter in OPTS is followed by two colons, its argument is
|
||||
optional. This behavior is specific to the GNU `getopt'.
|
||||
|
||||
The argument `--' causes premature termination of argument
|
||||
scanning, explicitly telling `getopt' that there are no more
|
||||
options.
|
||||
|
||||
If OPTS begins with `--', then non-option arguments are treated as
|
||||
arguments to the option '\0'. This behavior is specific to the GNU
|
||||
`getopt'. */
|
||||
|
||||
#if (defined __STDC__ && __STDC__) || defined __cplusplus
|
||||
# ifdef __GNU_LIBRARY__
|
||||
/* Many other libraries have conflicting prototypes for getopt, with
|
||||
differences in the consts, in stdlib.h. To avoid compilation
|
||||
errors, only prototype getopt for the GNU C library. */
|
||||
extern int getopt (int __argc, char *const *__argv,
|
||||
const char *__shortopts);
|
||||
# else /* not __GNU_LIBRARY__ */
|
||||
extern int getopt ();
|
||||
# endif /* __GNU_LIBRARY__ */
|
||||
|
||||
# ifndef __need_getopt
|
||||
extern int getopt_long (int __argc, char *const *__argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts, int *__longind);
|
||||
extern int getopt_long_only (int __argc, char *const *__argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts,
|
||||
int *__longind);
|
||||
|
||||
/* Internal only. Users should not call this directly. */
|
||||
extern int _getopt_internal (int __argc, char *const *__argv,
|
||||
const char *__shortopts,
|
||||
const struct option *__longopts,
|
||||
int *__longind, int __long_only);
|
||||
# endif
|
||||
#else /* not __STDC__ */
|
||||
extern int getopt ();
|
||||
# ifndef __need_getopt
|
||||
extern int getopt_long ();
|
||||
extern int getopt_long_only ();
|
||||
|
||||
extern int _getopt_internal ();
|
||||
# endif
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Make sure we later can get all the definitions and declarations. */
|
||||
#undef __need_getopt
|
||||
|
||||
#endif /* getopt.h */
|
||||
186
src/getopt1.c
Normal file
186
src/getopt1.c
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98
|
||||
Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
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 02111-1307, USA. */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
#if !defined __STDC__ || !__STDC__
|
||||
/* This is a separate conditional since some stdc systems
|
||||
reject `defined (const)'. */
|
||||
#ifndef const
|
||||
#define const
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Comment out all this code if we are using the GNU C Library, and are not
|
||||
actually compiling the library itself. This code is part of the GNU C
|
||||
Library, but also included in many other GNU distributions. Compiling
|
||||
and linking in this code is a waste when using the GNU C library
|
||||
(especially if it is a shared library). Rather than having every GNU
|
||||
program understand `configure --with-gnu-libc' and omit the object files,
|
||||
it is simpler to just do this in the source for each such file. */
|
||||
|
||||
#define GETOPT_INTERFACE_VERSION 2
|
||||
#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2
|
||||
#include <gnu-versions.h>
|
||||
#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
|
||||
#define ELIDE_CODE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ELIDE_CODE
|
||||
|
||||
|
||||
/* This needs to come after some library #include
|
||||
to get __GNU_LIBRARY__ defined. */
|
||||
#ifdef __GNU_LIBRARY__
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
#endif
|
||||
|
||||
int
|
||||
getopt_long (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
|
||||
}
|
||||
|
||||
/* Like getopt_long, but '-' as well as '--' can indicate a long option.
|
||||
If an option that starts with '-' (not '--') doesn't match a long option,
|
||||
but does match a short option, it is parsed as a short option
|
||||
instead. */
|
||||
|
||||
int
|
||||
getopt_long_only (argc, argv, options, long_options, opt_index)
|
||||
int argc;
|
||||
char *const *argv;
|
||||
const char *options;
|
||||
const struct option *long_options;
|
||||
int *opt_index;
|
||||
{
|
||||
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
|
||||
}
|
||||
|
||||
|
||||
#endif /* Not ELIDE_CODE. */
|
||||
|
||||
#ifdef TEST
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main (argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
{
|
||||
int c;
|
||||
int digit_optind = 0;
|
||||
|
||||
while (1)
|
||||
{
|
||||
int this_option_optind = optind ? optind : 1;
|
||||
int option_index = 0;
|
||||
static struct option long_options[] = {
|
||||
{"add", 1, 0, 0},
|
||||
{"append", 0, 0, 0},
|
||||
{"delete", 1, 0, 0},
|
||||
{"verbose", 0, 0, 0},
|
||||
{"create", 0, 0, 0},
|
||||
{"file", 1, 0, 0},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
|
||||
c = getopt_long (argc, argv, "abc:d:0123456789",
|
||||
long_options, &option_index);
|
||||
if (c == -1)
|
||||
break;
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case 0:
|
||||
printf ("option %s", long_options[option_index].name);
|
||||
if (optarg)
|
||||
printf (" with arg %s", optarg);
|
||||
printf ("\n");
|
||||
break;
|
||||
|
||||
case '0':
|
||||
case '1':
|
||||
case '2':
|
||||
case '3':
|
||||
case '4':
|
||||
case '5':
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
if (digit_optind != 0 && digit_optind != this_option_optind)
|
||||
printf ("digits occur in two different argv-elements.\n");
|
||||
digit_optind = this_option_optind;
|
||||
printf ("option %c\n", c);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
printf ("option a\n");
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
printf ("option b\n");
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
printf ("option c with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case 'd':
|
||||
printf ("option d with value `%s'\n", optarg);
|
||||
break;
|
||||
|
||||
case '?':
|
||||
break;
|
||||
|
||||
default:
|
||||
printf ("?? getopt returned character code 0%o ??\n", c);
|
||||
}
|
||||
}
|
||||
|
||||
if (optind < argc)
|
||||
{
|
||||
printf ("non-option ARGV-elements: ");
|
||||
while (optind < argc)
|
||||
printf ("%s ", argv[optind++]);
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
||||
#endif /* TEST */
|
||||
156
src/hash.c
156
src/hash.c
|
|
@ -1,156 +0,0 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2012- Enno Gröper. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file hash.c
|
||||
* \brief The leases hash functions. The hash sorting is key to make
|
||||
* analysis happen as quick as possible..
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "xalloc.h"
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
#define HASH_FIND_V6(head, findv6, out) HASH_FIND(hh, head, findv6, 16, out)
|
||||
#define HASH_ADD_V6(head, v6field, add) HASH_ADD(hh, head, v6field, 16, add)
|
||||
|
||||
/*! \brief Add a lease to hash array.
|
||||
* \param addr Binary IP to be added in leases hash.
|
||||
* \param type Lease state of the IP. */
|
||||
void add_lease_init(struct conf_t *state __attribute__ ((unused)), union ipaddr_t *addr
|
||||
__attribute__ ((unused)), enum ltype type __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
void add_lease_v4(struct conf_t *state, union ipaddr_t *addr, enum ltype type)
|
||||
{
|
||||
struct leases_t *l;
|
||||
|
||||
l = xmalloc(sizeof(struct leases_t));
|
||||
copy_ipaddr(&l->ip, addr);
|
||||
l->type = type;
|
||||
HASH_ADD_INT(state->leases, ip.v4, l);
|
||||
l->ethernet = NULL;
|
||||
l->ends = NULL;
|
||||
l->starts = NULL;
|
||||
l->hostname = NULL;
|
||||
}
|
||||
|
||||
void add_lease_v6(struct conf_t *state, union ipaddr_t *addr, enum ltype type)
|
||||
{
|
||||
struct leases_t *l;
|
||||
|
||||
l = xmalloc(sizeof(struct leases_t));
|
||||
copy_ipaddr(&l->ip, addr);
|
||||
l->type = type;
|
||||
HASH_ADD_V6(state->leases, ip.v6, l);
|
||||
l->ethernet = NULL;
|
||||
l->ends = NULL;
|
||||
l->starts = NULL;
|
||||
l->hostname = NULL;
|
||||
}
|
||||
|
||||
/*! \brief Find pointer to lease from hash array.
|
||||
* \param addr Binary IP searched from leases hash.
|
||||
* \return A lease structure about requested IP, or NULL.
|
||||
*/
|
||||
struct leases_t *find_lease_init(struct conf_t *state __attribute__ ((unused)), union ipaddr_t *addr
|
||||
__attribute__ ((unused)))
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct leases_t *find_lease_v4(struct conf_t *state, union ipaddr_t *addr)
|
||||
{
|
||||
struct leases_t *l;
|
||||
|
||||
HASH_FIND_INT(state->leases, &addr->v4, l);
|
||||
return l;
|
||||
}
|
||||
|
||||
struct leases_t *find_lease_v6(struct conf_t *state, union ipaddr_t *addr)
|
||||
{
|
||||
struct leases_t *l;
|
||||
|
||||
HASH_FIND_V6(state->leases, &addr->v4, l);
|
||||
return l;
|
||||
}
|
||||
|
||||
/*! \brief Delete a lease from hash array.
|
||||
* \param lease Pointer to lease hash. */
|
||||
void delete_lease(struct conf_t *state, struct leases_t *lease)
|
||||
{
|
||||
free(lease->ethernet);
|
||||
free(lease->ends);
|
||||
free(lease->starts);
|
||||
free(lease->hostname);
|
||||
HASH_DEL(state->leases, lease);
|
||||
free(lease);
|
||||
}
|
||||
|
||||
/*! \brief Delete all leases from hash array. */
|
||||
#ifdef HASH_ITER
|
||||
void delete_all_leases(struct conf_t *state)
|
||||
{
|
||||
struct leases_t *l, *tmp;
|
||||
|
||||
HASH_ITER(hh, state->leases, l, tmp) {
|
||||
free(l->ethernet);
|
||||
free(l->ends);
|
||||
free(l->starts);
|
||||
free(l->hostname);
|
||||
HASH_DEL(state->leases, l);
|
||||
free(l);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void delete_all_leases(struct conf_t *state)
|
||||
{
|
||||
while (state->leases) {
|
||||
struct leases_t *l;
|
||||
|
||||
l = state->leases;
|
||||
free(l->ethernet);
|
||||
free(l->ends);
|
||||
free(l->starts);
|
||||
free(l->hostname);
|
||||
HASH_DEL(state->leases, l); /* leases advances to next on delete */
|
||||
free(l);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -1,519 +0,0 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file mustach-dhcpd-pools.c
|
||||
* \brief Mustache templating specific functions.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <error.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "close-stream.h"
|
||||
#include "dhcpd-pools.h"
|
||||
#include "error.h"
|
||||
#include "mustach.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
/*! \struct expl
|
||||
* \brief A structure that travels through mustach via closure void pointer.
|
||||
*/
|
||||
struct expl {
|
||||
struct conf_t *state;
|
||||
struct leases_t *lease_p;
|
||||
struct range_t *range_p;
|
||||
struct shared_network_t *shnet_p;
|
||||
struct output_helper_t oh;
|
||||
int current;
|
||||
uint32_t pad;
|
||||
};
|
||||
|
||||
static int must_enter(void *closure, const char *name);
|
||||
static int must_leave(void *closure);
|
||||
|
||||
/*! \brief Template base level tag parser and printer. */
|
||||
static int must_put_base(void *closure, const char *name, int escape
|
||||
__attribute__ ((unused)), FILE *file)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (!strcmp(name, "localtime")) {
|
||||
dp_time_tool(file, NULL, 0);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_ranges")) {
|
||||
fprintf(file, "%u", e->state->num_ranges);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_ranges_warning")) {
|
||||
struct status_counts_t stat = { 0 };
|
||||
|
||||
range_alarms(e->state, &stat);
|
||||
fprintf(file, "%u", stat.warning);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_ranges_critical")) {
|
||||
struct status_counts_t stat = { 0 };
|
||||
|
||||
range_alarms(e->state, &stat);
|
||||
fprintf(file, "%u", stat.critical);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_shared_networks")) {
|
||||
uint32_t num = 0;
|
||||
struct shared_network_t *shared_p;
|
||||
|
||||
for (shared_p = e->state->shared_net_root->next; shared_p;
|
||||
shared_p = shared_p->next) {
|
||||
num++;
|
||||
}
|
||||
fprintf(file, "%u", num);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_shared_networks_warning")) {
|
||||
struct status_counts_t stat = { 0 };
|
||||
|
||||
shared_net_alarms(e->state, &stat);
|
||||
fprintf(file, "%u", stat.warning);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "number_of_shared_networks_critical")) {
|
||||
struct status_counts_t stat = { 0 };
|
||||
|
||||
shared_net_alarms(e->state, &stat);
|
||||
fprintf(file, "%u", stat.critical);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "version")) {
|
||||
fprintf(file, "%s", PACKAGE_VERSION);
|
||||
return 0;
|
||||
}
|
||||
/* lease file */
|
||||
if (!strcmp(name, "lease_file_path")) {
|
||||
fprintf(file, "%s", e->state->dhcpdlease_file);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "lease_file_local_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdlease_file, 0);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "lease_file_epoch_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdlease_file, 1);
|
||||
return 0;
|
||||
}
|
||||
/* conf file */
|
||||
if (!strcmp(name, "conf_file_path")) {
|
||||
fprintf(file, "%s", e->state->dhcpdconf_file);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "conf_file_local_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdconf_file, 0);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "conf_file_epoch_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdconf_file, 1);
|
||||
return 0;
|
||||
}
|
||||
/* template file */
|
||||
if (!strcmp(name, "template_file_path")) {
|
||||
fprintf(file, "%s", e->state->mustach_template);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "template_file_local_mtime")) {
|
||||
dp_time_tool(file, e->state->mustach_template, 0);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "template_file_epoch_mtime")) {
|
||||
dp_time_tool(file, e->state->mustach_template, 1);
|
||||
return 0;
|
||||
}
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected tag: %s", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \struct mustach_itf
|
||||
* \brief Mustach function pointers. */
|
||||
static struct mustach_itf itf = {
|
||||
.start = NULL,
|
||||
.enter = must_enter,
|
||||
.put = must_put_base,
|
||||
.next = NULL,
|
||||
.leave = must_leave
|
||||
};
|
||||
|
||||
/*! \brief Mustach active lease aka {{#active_lease}} tag parser and printer. */
|
||||
static int must_put_active_lease(void *closure, const char *name, int escape
|
||||
__attribute__((unused)), FILE *file)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (!strcmp(name, "ip")) {
|
||||
fprintf(file, "%s", ntop_ipaddr(&e->lease_p->ip));
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "macaddress")) {
|
||||
fprintf(file, "%s", e->lease_p->ethernet);
|
||||
return 0;
|
||||
}
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected tag: %s", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief A function to move to next lease when {{/active_lease}} is encountered. */
|
||||
static int must_next_active_lease(void *closure)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
e->lease_p = e->lease_p->hh.next;
|
||||
if (e->lease_p == NULL)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Mustach range aka {{#subnets}} tag parser and printer. */
|
||||
static int must_put_range(void *closure, const char *name, int escape
|
||||
__attribute__ ((unused)), FILE *file)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (!strcmp(name, "location")) {
|
||||
fprintf(file, "%s", e->range_p->shared_net->name);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "range")) {
|
||||
fprintf(file, "%s - ", ntop_ipaddr(&e->range_p->first_ip));
|
||||
fprintf(file, "%s", ntop_ipaddr(&e->range_p->last_ip));
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "first_ip")) {
|
||||
fprintf(file, "%s", ntop_ipaddr(&e->range_p->first_ip));
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "last_ip")) {
|
||||
fprintf(file, "%s", ntop_ipaddr(&e->range_p->last_ip));
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "used")) {
|
||||
fprintf(file, "%g", e->range_p->count);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touched")) {
|
||||
fprintf(file, "%g", e->range_p->touched);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "defined")) {
|
||||
fprintf(file, "%g", e->oh.range_size);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "free")) {
|
||||
fprintf(file, "%g", e->oh.range_size - e->range_p->count);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "percent")) {
|
||||
fprintf(file, "%g", e->oh.percent);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touch_count")) {
|
||||
fprintf(file, "%g", e->oh.tc);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touch_percent")) {
|
||||
fprintf(file, "%g", e->oh.tcp);
|
||||
return 0;
|
||||
}
|
||||
if (e->state->backups_found == 1) {
|
||||
if (!strcmp(name, "backup_count")) {
|
||||
fprintf(file, "%g", e->range_p->backups);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "backup_percent")) {
|
||||
fprintf(file, "%g", e->oh.bup);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!strcmp(name, "status")) {
|
||||
fprintf(file, "%d", e->oh.status);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "gettimeofday")) {
|
||||
dp_time_tool(file, NULL, 1);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "lease_file_epoch_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdlease_file, 1);
|
||||
return 0;
|
||||
}
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected tag: %s", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief Mustach shared networks aka {{#shared-networks}} tag parser and printer. */
|
||||
static int must_put_shnet(void *closure, const char *name, int escape
|
||||
__attribute__ ((unused)), FILE *file)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (!strcmp(name, "location")) {
|
||||
fprintf(file, "%s", e->shnet_p->name);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "defined")) {
|
||||
fprintf(file, "%g", e->shnet_p->available);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "used")) {
|
||||
fprintf(file, "%g", e->shnet_p->used);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touched")) {
|
||||
fprintf(file, "%g", e->shnet_p->touched);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "free")) {
|
||||
fprintf(file, "%g", e->shnet_p->available - e->shnet_p->used);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "percent")) {
|
||||
fprintf(file, "%g", e->oh.percent);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touch_count")) {
|
||||
fprintf(file, "%g", e->oh.tc);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "touch_percent")) {
|
||||
fprintf(file, "%g", e->oh.tcp);
|
||||
return 0;
|
||||
}
|
||||
if (e->state->backups_found == 1) {
|
||||
if (!strcmp(name, "backup_count")) {
|
||||
fprintf(file, "%g", e->shnet_p->backups);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "backup_percent")) {
|
||||
fprintf(file, "%g", e->oh.bup);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!strcmp(name, "status")) {
|
||||
fprintf(file, "%d", e->oh.status);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "gettimeofday")) {
|
||||
dp_time_tool(file, NULL, 1);
|
||||
return 0;
|
||||
}
|
||||
if (!strcmp(name, "lease_file_epoch_mtime")) {
|
||||
dp_time_tool(file, e->state->dhcpdlease_file, 1);
|
||||
return 0;
|
||||
}
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected tag: %s", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief A function to move to next range when {{/subnets}} is encountered. */
|
||||
static int must_next_range(void *closure)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
do {
|
||||
e->range_p++;
|
||||
e->current--;
|
||||
if (e->current <= 0)
|
||||
return 0;
|
||||
} while (range_output_helper(e->state, &e->oh, e->range_p));
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief A function to move to next shared network when {{/shared-networks}}
|
||||
* is encountered. */
|
||||
static int must_next_shnet(void *closure)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (e->current == 1 || e->shnet_p == NULL)
|
||||
return 0;
|
||||
while (1) {
|
||||
e->shnet_p = e->shnet_p->next;
|
||||
if (e->shnet_p == NULL)
|
||||
break;
|
||||
if (shnet_output_helper(e->state, &e->oh, e->shnet_p))
|
||||
continue;
|
||||
else
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Function that is called when mustach is searching output loops from
|
||||
* template file. */
|
||||
static int must_enter(void *closure, const char *name)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
if (!strcmp(name, "active_lease")) {
|
||||
itf.put = must_put_active_lease;
|
||||
itf.next = must_next_active_lease;
|
||||
e->current = 0;
|
||||
e->lease_p = e->state->leases;
|
||||
return must_next_active_lease(closure);
|
||||
}
|
||||
if (!strcmp(name, "subnets")) {
|
||||
itf.put = must_put_range;
|
||||
itf.next = must_next_range;
|
||||
e->current = e->state->num_ranges + 1;
|
||||
e->range_p = e->state->ranges;
|
||||
/* must_next_range() will skip_ok when needed */
|
||||
e->range_p--;
|
||||
return must_next_range(closure);
|
||||
}
|
||||
if (!strcmp(name, "shared-networks")) {
|
||||
itf.put = must_put_shnet;
|
||||
itf.next = must_next_shnet;
|
||||
e->shnet_p = e->state->shared_net_root;
|
||||
e->current = 0;
|
||||
return must_next_shnet(closure);
|
||||
}
|
||||
if (!strcmp(name, "summary")) {
|
||||
itf.put = must_put_shnet;
|
||||
itf.next = must_next_shnet;
|
||||
e->shnet_p = e->state->shared_net_root;
|
||||
e->current = 1;
|
||||
shnet_output_helper(e->state, &e->oh, e->shnet_p);
|
||||
return 1;
|
||||
}
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected tag: %s", name);
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*! \brief Function that is called when all elements within a print loop are outputted. */
|
||||
static int must_leave(void *closure)
|
||||
{
|
||||
struct expl *e = closure;
|
||||
|
||||
e->shnet_p = e->state->shared_net_root;
|
||||
e->range_p = e->state->ranges;
|
||||
itf.put = must_put_base;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Read mustach template to memory. */
|
||||
static char *must_read_template(const char *filename)
|
||||
{
|
||||
int f;
|
||||
struct stat s;
|
||||
char *result;
|
||||
|
||||
if (filename == NULL)
|
||||
error(EXIT_FAILURE, 0, "must_read_template: --mustach argument missing");
|
||||
if ((f = open(filename, O_RDONLY)) < 0) {
|
||||
error(EXIT_FAILURE, errno, "must_read_template: open: %s", filename);
|
||||
}
|
||||
fstat(f, &s);
|
||||
result = xmalloc(s.st_size + 1);
|
||||
if (read(f, result, s.st_size) != s.st_size) {
|
||||
error(EXIT_FAILURE, errno, "must_read_template: read: %s", filename);
|
||||
}
|
||||
close(f);
|
||||
result[s.st_size] = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
/*! \brief Start mustach processing. */
|
||||
int mustach_dhcpd_pools(struct conf_t *state)
|
||||
{
|
||||
struct expl e = { .state = state };
|
||||
char *template;
|
||||
FILE *outfile;
|
||||
int ret;
|
||||
|
||||
template = must_read_template(state->mustach_template);
|
||||
if (state->output_file) {
|
||||
outfile = fopen(state->output_file, "w+");
|
||||
if (outfile == NULL) {
|
||||
error(EXIT_FAILURE, errno, "mustach_dhcpd_pools: fopen: %s",
|
||||
state->output_file);
|
||||
}
|
||||
} else {
|
||||
outfile = stdout;
|
||||
}
|
||||
ret = fmustach(template, &itf, &e, outfile);
|
||||
free(template);
|
||||
if (outfile == stdout) {
|
||||
if (fflush(stdout))
|
||||
error(EXIT_FAILURE, errno, "mustach_dhcpd_pools: fflush");
|
||||
} else {
|
||||
if (close_stream(outfile))
|
||||
error(EXIT_FAILURE, errno, "mustach_dhcpd_pools: fclose");
|
||||
}
|
||||
switch (ret) {
|
||||
case MUSTACH_OK:
|
||||
return 0;
|
||||
case MUSTACH_ERROR_SYSTEM:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: system error");
|
||||
break;
|
||||
case MUSTACH_ERROR_UNEXPECTED_END:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unexpected end");
|
||||
break;
|
||||
case MUSTACH_ERROR_EMPTY_TAG:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: empty tag");
|
||||
break;
|
||||
case MUSTACH_ERROR_TAG_TOO_LONG:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: too long tag");
|
||||
break;
|
||||
case MUSTACH_ERROR_BAD_SEPARATORS:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: bad separator");
|
||||
break;
|
||||
case MUSTACH_ERROR_TOO_DEEP:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: too deep");
|
||||
break;
|
||||
case MUSTACH_ERROR_CLOSING:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: closing");
|
||||
break;
|
||||
case MUSTACH_ERROR_BAD_UNESCAPE_TAG:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: bad escape tag");
|
||||
break;
|
||||
default:
|
||||
error(EXIT_FAILURE, 0, "mustach_dhcpd_pools: fmustach: unknown error");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
325
src/mustach.c
325
src/mustach.c
|
|
@ -1,325 +0,0 @@
|
|||
/*
|
||||
Author: José Bollo <jobol@nonadev.net>
|
||||
Author: José Bollo <jose.bollo@iot.bzh>
|
||||
|
||||
https://gitlab.com/jobol/mustach
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "mustach.h"
|
||||
|
||||
#define NAME_LENGTH_MAX 1024
|
||||
#define DEPTH_MAX 256
|
||||
|
||||
#if !defined(NO_OPEN_MEMSTREAM)
|
||||
static FILE *memfile_open(char **buffer, size_t *size)
|
||||
{
|
||||
return open_memstream(buffer, size);
|
||||
}
|
||||
static void memfile_abort(FILE *file, char **buffer, size_t *size)
|
||||
{
|
||||
fclose(file);
|
||||
free(*buffer);
|
||||
*buffer = NULL;
|
||||
*size = 0;
|
||||
}
|
||||
static int memfile_close(FILE *file, char **buffer, size_t *size)
|
||||
{
|
||||
int rc;
|
||||
|
||||
/* adds terminating null */
|
||||
rc = fputc(0, file) ? MUSTACH_ERROR_SYSTEM : 0;
|
||||
fclose(file);
|
||||
if (rc == 0)
|
||||
/* removes terminating null of the length */
|
||||
(*size)--;
|
||||
else {
|
||||
free(*buffer);
|
||||
*buffer = NULL;
|
||||
*size = 0;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#else
|
||||
static FILE *memfile_open(char **buffer, size_t *size)
|
||||
{
|
||||
return tmpfile();
|
||||
}
|
||||
static void memfile_abort(FILE *file, char **buffer, size_t *size)
|
||||
{
|
||||
fclose(file);
|
||||
*buffer = NULL;
|
||||
*size = 0;
|
||||
}
|
||||
static int memfile_close(FILE *file, char **buffer, size_t *size)
|
||||
{
|
||||
int rc;
|
||||
size_t s;
|
||||
char *b;
|
||||
|
||||
s = (size_t)ftell(file);
|
||||
b = malloc(s + 1);
|
||||
if (b == NULL) {
|
||||
rc = MUSTACH_ERROR_SYSTEM;
|
||||
errno = ENOMEM;
|
||||
s = 0;
|
||||
} else {
|
||||
rewind(file);
|
||||
if (1 == fread(b, s, 1, file)) {
|
||||
rc = 0;
|
||||
b[s] = 0;
|
||||
} else {
|
||||
rc = MUSTACH_ERROR_SYSTEM;
|
||||
free(b);
|
||||
b = NULL;
|
||||
s = 0;
|
||||
}
|
||||
}
|
||||
*buffer = b;
|
||||
*size = s;
|
||||
return rc;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int getpartial(struct mustach_itf *itf, void *closure, const char *name, char **result)
|
||||
{
|
||||
int rc;
|
||||
FILE *file;
|
||||
size_t size;
|
||||
|
||||
*result = NULL;
|
||||
file = memfile_open(result, &size);
|
||||
if (file == NULL)
|
||||
rc = MUSTACH_ERROR_SYSTEM;
|
||||
else {
|
||||
rc = itf->put(closure, name, 0, file);
|
||||
if (rc < 0)
|
||||
memfile_abort(file, result, &size);
|
||||
else
|
||||
rc = memfile_close(file, result, &size);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int process(const char *template, struct mustach_itf *itf, void *closure, FILE *file, const char *opstr, const char *clstr)
|
||||
{
|
||||
char name[NAME_LENGTH_MAX + 1], *partial, c, *tmp;
|
||||
const char *beg, *term;
|
||||
struct { const char *name, *again; size_t length; int emit, entered; } stack[DEPTH_MAX];
|
||||
size_t oplen, cllen, len, l;
|
||||
int depth, rc, emit;
|
||||
|
||||
emit = 1;
|
||||
oplen = strlen(opstr);
|
||||
cllen = strlen(clstr);
|
||||
depth = 0;
|
||||
for(;;) {
|
||||
beg = strstr(template, opstr);
|
||||
if (beg == NULL) {
|
||||
/* no more mustach */
|
||||
if (emit)
|
||||
fwrite(template, strlen(template), 1, file);
|
||||
return depth ? MUSTACH_ERROR_UNEXPECTED_END : 0;
|
||||
}
|
||||
if (emit)
|
||||
fwrite(template, (size_t)(beg - template), 1, file);
|
||||
beg += oplen;
|
||||
term = strstr(beg, clstr);
|
||||
if (term == NULL)
|
||||
return MUSTACH_ERROR_UNEXPECTED_END;
|
||||
template = term + cllen;
|
||||
len = (size_t)(term - beg);
|
||||
c = *beg;
|
||||
switch(c) {
|
||||
case '!':
|
||||
case '=':
|
||||
break;
|
||||
case '{':
|
||||
for (l = 0 ; clstr[l] == '}' ; l++);
|
||||
if (clstr[l]) {
|
||||
if (!len || beg[len-1] != '}')
|
||||
return MUSTACH_ERROR_BAD_UNESCAPE_TAG;
|
||||
len--;
|
||||
} else {
|
||||
if (term[l] != '}')
|
||||
return MUSTACH_ERROR_BAD_UNESCAPE_TAG;
|
||||
template++;
|
||||
}
|
||||
c = '&';
|
||||
/*@fallthrough@*/
|
||||
case '^':
|
||||
case '#':
|
||||
case '/':
|
||||
case '&':
|
||||
case '>':
|
||||
#if !defined(NO_EXTENSION_FOR_MUSTACH) && !defined(NO_COLON_EXTENSION_FOR_MUSTACH)
|
||||
case ':':
|
||||
#endif
|
||||
beg++; len--;
|
||||
default:
|
||||
while (len && isspace(beg[0])) { beg++; len--; }
|
||||
while (len && isspace(beg[len-1])) len--;
|
||||
#if defined(NO_EXTENSION_FOR_MUSTACH) || defined(NO_ALLOW_EMPTY_TAG)
|
||||
if (len == 0)
|
||||
return MUSTACH_ERROR_EMPTY_TAG;
|
||||
#endif
|
||||
if (len > NAME_LENGTH_MAX)
|
||||
return MUSTACH_ERROR_TAG_TOO_LONG;
|
||||
memcpy(name, beg, len);
|
||||
name[len] = 0;
|
||||
break;
|
||||
}
|
||||
switch(c) {
|
||||
case '!':
|
||||
/* comment */
|
||||
/* nothing to do */
|
||||
break;
|
||||
case '=':
|
||||
/* defines separators */
|
||||
if (len < 5 || beg[len - 1] != '=')
|
||||
return MUSTACH_ERROR_BAD_SEPARATORS;
|
||||
beg++;
|
||||
len -= 2;
|
||||
for (l = 0; l < len && !isspace(beg[l]) ; l++);
|
||||
if (l == len)
|
||||
return MUSTACH_ERROR_BAD_SEPARATORS;
|
||||
oplen = l;
|
||||
tmp = alloca(oplen + 1);
|
||||
memcpy(tmp, beg, oplen);
|
||||
tmp[oplen] = 0;
|
||||
opstr = tmp;
|
||||
while (l < len && isspace(beg[l])) l++;
|
||||
if (l == len)
|
||||
return MUSTACH_ERROR_BAD_SEPARATORS;
|
||||
cllen = len - l;
|
||||
tmp = alloca(cllen + 1);
|
||||
memcpy(tmp, beg + l, cllen);
|
||||
tmp[cllen] = 0;
|
||||
clstr = tmp;
|
||||
break;
|
||||
case '^':
|
||||
case '#':
|
||||
/* begin section */
|
||||
if (depth == DEPTH_MAX)
|
||||
return MUSTACH_ERROR_TOO_DEEP;
|
||||
rc = emit;
|
||||
if (rc) {
|
||||
rc = itf->enter(closure, name);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
stack[depth].name = beg;
|
||||
stack[depth].again = template;
|
||||
stack[depth].length = len;
|
||||
stack[depth].emit = emit;
|
||||
stack[depth].entered = rc;
|
||||
if ((c == '#') == (rc == 0))
|
||||
emit = 0;
|
||||
depth++;
|
||||
break;
|
||||
case '/':
|
||||
/* end section */
|
||||
if (depth-- == 0 || len != stack[depth].length || memcmp(stack[depth].name, name, len))
|
||||
return MUSTACH_ERROR_CLOSING;
|
||||
rc = emit && stack[depth].entered ? itf->next(closure) : 0;
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
if (rc) {
|
||||
template = stack[depth++].again;
|
||||
} else {
|
||||
emit = stack[depth].emit;
|
||||
if (emit && stack[depth].entered)
|
||||
itf->leave(closure);
|
||||
}
|
||||
break;
|
||||
case '>':
|
||||
/* partials */
|
||||
if (emit) {
|
||||
rc = getpartial(itf, closure, name, &partial);
|
||||
if (rc == 0) {
|
||||
rc = process(partial, itf, closure, file, opstr, clstr);
|
||||
free(partial);
|
||||
}
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
/* replacement */
|
||||
if (emit) {
|
||||
rc = itf->put(closure, name, c != '&', file);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int fmustach(const char *template, struct mustach_itf *itf, void *closure, FILE *file)
|
||||
{
|
||||
int rc = itf->start ? itf->start(closure) : 0;
|
||||
if (rc == 0)
|
||||
rc = process(template, itf, closure, file, "{{", "}}");
|
||||
return rc;
|
||||
}
|
||||
|
||||
int fdmustach(const char *template, struct mustach_itf *itf, void *closure, int fd)
|
||||
{
|
||||
int rc;
|
||||
FILE *file;
|
||||
|
||||
file = fdopen(fd, "w");
|
||||
if (file == NULL) {
|
||||
rc = MUSTACH_ERROR_SYSTEM;
|
||||
errno = ENOMEM;
|
||||
} else {
|
||||
rc = fmustach(template, itf, closure, file);
|
||||
fclose(file);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int mustach(const char *template, struct mustach_itf *itf, void *closure, char **result, size_t *size)
|
||||
{
|
||||
int rc;
|
||||
FILE *file;
|
||||
size_t s;
|
||||
|
||||
*result = NULL;
|
||||
if (size == NULL)
|
||||
size = &s;
|
||||
file = memfile_open(result, size);
|
||||
if (file == NULL)
|
||||
rc = MUSTACH_ERROR_SYSTEM;
|
||||
else {
|
||||
rc = fmustach(template, itf, closure, file);
|
||||
if (rc < 0)
|
||||
memfile_abort(file, result, size);
|
||||
else
|
||||
rc = memfile_close(file, result, size);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
120
src/mustach.h
120
src/mustach.h
|
|
@ -1,120 +0,0 @@
|
|||
/*
|
||||
Author: José Bollo <jobol@nonadev.net>
|
||||
Author: José Bollo <jose.bollo@iot.bzh>
|
||||
|
||||
https://gitlab.com/jobol/mustach
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef _mustach_h_included_
|
||||
#define _mustach_h_included_
|
||||
|
||||
/**
|
||||
* mustach_itf - interface for callbacks
|
||||
*
|
||||
* All of this function should return a negative value to stop
|
||||
* the mustache processing. The returned negative value will be
|
||||
* then returned to the caller of mustach as is.
|
||||
*
|
||||
* The functions enter and next should return 0 or 1.
|
||||
*
|
||||
* All other functions should normally return 0. If it returns
|
||||
* a negative value, it means an error that stop the process
|
||||
* and that is reported to the caller.
|
||||
*
|
||||
* @start: Starts the mustach processing of the closure
|
||||
* 'start' is optional (can be NULL)
|
||||
*
|
||||
* @put: Writes the value of 'name' to 'file' with 'escape' or not
|
||||
* As an extension (see NO_ALLOW_EMPTY_TAG), the 'name' can be
|
||||
* the empty string. In that later case an implemntation can
|
||||
* return MUSTACH_ERROR_EMPTY_TAG to refuse empty names.
|
||||
*
|
||||
* @enter: Enters the section of 'name' if possible.
|
||||
* Musts return 1 if entered or 0 if not entered.
|
||||
* When 1 is returned, the function 'leave' will always be called.
|
||||
* Conversely 'leave' is never called when enter returns 0 or
|
||||
* a negative value.
|
||||
* When 1 is returned, the function must activate the first
|
||||
* item of the section.
|
||||
*
|
||||
* @next: Activates the next item of the section if it exists.
|
||||
* Musts return 1 when the next item is activated.
|
||||
* Musts return 0 when there is no item to activate.
|
||||
*
|
||||
* @leave: Leaves the last entered section
|
||||
*/
|
||||
struct mustach_itf {
|
||||
int (*start)(void *closure);
|
||||
int (*put)(void *closure, const char *name, int escape, FILE *file);
|
||||
int (*enter)(void *closure, const char *name);
|
||||
int (*next)(void *closure);
|
||||
int (*leave)(void *closure);
|
||||
};
|
||||
|
||||
#define MUSTACH_OK 0
|
||||
#define MUSTACH_ERROR_SYSTEM -1
|
||||
#define MUSTACH_ERROR_UNEXPECTED_END -2
|
||||
#define MUSTACH_ERROR_EMPTY_TAG -3
|
||||
#define MUSTACH_ERROR_TAG_TOO_LONG -4
|
||||
#define MUSTACH_ERROR_BAD_SEPARATORS -5
|
||||
#define MUSTACH_ERROR_TOO_DEEP -6
|
||||
#define MUSTACH_ERROR_CLOSING -7
|
||||
#define MUSTACH_ERROR_BAD_UNESCAPE_TAG -8
|
||||
|
||||
/* compatibility with older bad name */
|
||||
#define MUSTACH_ERROR_TOO_DEPTH MUSTACH_ERROR_TOO_DEEP
|
||||
|
||||
/**
|
||||
* fmustach - Renders the mustache 'template' in 'file' for 'itf' and 'closure'.
|
||||
*
|
||||
* @template: the template string to instanciate
|
||||
* @itf: the interface to the functions that mustach calls
|
||||
* @closure: the closure to pass to functions called
|
||||
* @file: the file where to write the result
|
||||
*
|
||||
* Returns 0 in case of success, -1 with errno set in case of system error
|
||||
* a other negative value in case of error.
|
||||
*/
|
||||
extern int fmustach(const char *template, struct mustach_itf *itf, void *closure, FILE *file);
|
||||
|
||||
/**
|
||||
* fmustach - Renders the mustache 'template' in 'fd' for 'itf' and 'closure'.
|
||||
*
|
||||
* @template: the template string to instanciate
|
||||
* @itf: the interface to the functions that mustach calls
|
||||
* @closure: the closure to pass to functions called
|
||||
* @fd: the file descriptor number where to write the result
|
||||
*
|
||||
* Returns 0 in case of success, -1 with errno set in case of system error
|
||||
* a other negative value in case of error.
|
||||
*/
|
||||
extern int fdmustach(const char *template, struct mustach_itf *itf, void *closure, int fd);
|
||||
|
||||
/**
|
||||
* fmustach - Renders the mustache 'template' in 'result' for 'itf' and 'closure'.
|
||||
*
|
||||
* @template: the template string to instanciate
|
||||
* @itf: the interface to the functions that mustach calls
|
||||
* @closure: the closure to pass to functions called
|
||||
* @result: the pointer receiving the result when 0 is returned
|
||||
* @size: the size of the returned result
|
||||
*
|
||||
* Returns 0 in case of success, -1 with errno set in case of system error
|
||||
* a other negative value in case of error.
|
||||
*/
|
||||
extern int mustach(const char *template, struct mustach_itf *itf, void *closure, char **result, size_t *size);
|
||||
|
||||
#endif
|
||||
|
||||
772
src/other.c
772
src/other.c
|
|
@ -1,659 +1,137 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file other.c
|
||||
* \brief Collection of various functions.
|
||||
*/
|
||||
** Copyright (C) 2006 Sami Kerola <kerolasa@iki.fi>
|
||||
**
|
||||
** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <netinet/in.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "error.h"
|
||||
#include "progname.h"
|
||||
#include "quote.h"
|
||||
#include "xalloc.h"
|
||||
#endif
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
static char *(*cidr_last) (union ipaddr_t *restrict addr, const int mask);
|
||||
static char *cidr_last_v4(union ipaddr_t *restrict addr, const int mask);
|
||||
static char *cidr_last_v6(union ipaddr_t *restrict addr, const int mask);
|
||||
|
||||
/*! \brief Set function pointers depending on IP version.
|
||||
* \param ip IP version.
|
||||
*/
|
||||
void set_ipv_functions(struct conf_t *state, int version)
|
||||
{
|
||||
switch (version) {
|
||||
|
||||
case IPv4:
|
||||
state->ip_version = version;
|
||||
add_lease = add_lease_v4;
|
||||
copy_ipaddr = copy_ipaddr_v4;
|
||||
find_lease = find_lease_v4;
|
||||
get_range_size = get_range_size_v4;
|
||||
ipcomp = ipcomp_v4;
|
||||
leasecomp = leasecomp_v4;
|
||||
ntop_ipaddr = ntop_ipaddr_v4;
|
||||
parse_ipaddr = parse_ipaddr_v4;
|
||||
cidr_last = cidr_last_v4;
|
||||
xstrstr = xstrstr_v4;
|
||||
break;
|
||||
|
||||
case IPv6:
|
||||
state->ip_version = version;
|
||||
add_lease = add_lease_v6;
|
||||
copy_ipaddr = copy_ipaddr_v6;
|
||||
find_lease = find_lease_v6;
|
||||
get_range_size = get_range_size_v6;
|
||||
ipcomp = ipcomp_v6;
|
||||
leasecomp = leasecomp_v6;
|
||||
ntop_ipaddr = ntop_ipaddr_v6;
|
||||
parse_ipaddr = parse_ipaddr_v6;
|
||||
cidr_last = cidr_last_v6;
|
||||
xstrstr = xstrstr_v6;
|
||||
break;
|
||||
|
||||
case IPvUNKNOWN:
|
||||
state->ip_version = version;
|
||||
add_lease = add_lease_init;
|
||||
copy_ipaddr = copy_ipaddr_init;
|
||||
find_lease = find_lease_init;
|
||||
get_range_size = get_range_size_init;
|
||||
ipcomp = ipcomp_init;
|
||||
leasecomp = leasecomp_init;
|
||||
ntop_ipaddr = ntop_ipaddr_init;
|
||||
parse_ipaddr = parse_ipaddr_init;
|
||||
cidr_last = NULL;
|
||||
xstrstr = xstrstr_init;
|
||||
break;
|
||||
|
||||
default:
|
||||
abort();
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/*! \brief Convert text string IP address from either IPv4 or IPv6 to an integer.
|
||||
* \param src An IP string in either format.
|
||||
* \param dst An union which will hold conversion result.
|
||||
* \return Was parsing successful.
|
||||
*/
|
||||
int parse_ipaddr_init(struct conf_t *state, const char *restrict src, union ipaddr_t *restrict dst)
|
||||
{
|
||||
struct in_addr addr;
|
||||
struct in6_addr addr6;
|
||||
|
||||
if (inet_aton(src, &addr) == 1)
|
||||
set_ipv_functions(state, IPv4);
|
||||
else if (inet_pton(AF_INET6, src, &addr6) == 1)
|
||||
set_ipv_functions(state, IPv6);
|
||||
else
|
||||
return 0;
|
||||
return parse_ipaddr(state, src, dst);
|
||||
}
|
||||
|
||||
int parse_ipaddr_v4(struct conf_t *state
|
||||
__attribute__ ((unused)), const char *restrict src,
|
||||
union ipaddr_t *restrict dst)
|
||||
{
|
||||
int rv;
|
||||
struct in_addr addr;
|
||||
|
||||
rv = inet_aton(src, &addr);
|
||||
dst->v4 = ntohl(addr.s_addr);
|
||||
return rv == 1;
|
||||
}
|
||||
|
||||
int parse_ipaddr_v6(struct conf_t *state
|
||||
__attribute__ ((unused)), const char *restrict src,
|
||||
union ipaddr_t *restrict dst)
|
||||
{
|
||||
int rv;
|
||||
struct in6_addr addr;
|
||||
|
||||
rv = inet_pton(AF_INET6, src, &addr);
|
||||
memcpy(&dst->v6, addr.s6_addr, sizeof(addr.s6_addr));
|
||||
return rv == 1;
|
||||
}
|
||||
|
||||
/*! \brief Convert string to a desimal format network marks.
|
||||
* \param src Digit that should be a network mask.
|
||||
* \return Network mask, or -1 when failing.
|
||||
*/
|
||||
static int strtol_mask(const char *str)
|
||||
{
|
||||
long num;
|
||||
char *end = NULL;
|
||||
|
||||
errno = 0;
|
||||
if (str == NULL || *str == '\0')
|
||||
goto err;
|
||||
num = strtol(str, &end, 10);
|
||||
|
||||
if (errno || str == end || (end && *end))
|
||||
goto err;
|
||||
if (num < 0 || 128 < num)
|
||||
goto err;
|
||||
return (int)num;
|
||||
err:
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*! \brief Find last address in IPv4 range by using cidr format.
|
||||
* \param addr Pointer to memory where address needs to be stored.
|
||||
* \return Allocated string format of the address.
|
||||
*/
|
||||
static char *cidr_last_v4(union ipaddr_t *restrict addr, const int mask)
|
||||
{
|
||||
union ipaddr_t last_ip;
|
||||
uint32_t netmask;
|
||||
const char *ip;
|
||||
|
||||
if (mask)
|
||||
netmask = (1U << (32 - mask)) - 1;
|
||||
else
|
||||
netmask = 0;
|
||||
last_ip.v4 = addr->v4 | netmask;
|
||||
|
||||
ip = ntop_ipaddr(&last_ip);
|
||||
return xstrdup(ip);
|
||||
}
|
||||
|
||||
/*! \brief Find last address in IPv6 range by using cidr format.
|
||||
* \param addr Pointer to memory where address needs to be stored.
|
||||
* \return Allocated string format of the address.
|
||||
*/
|
||||
static char *cidr_last_v6(union ipaddr_t *restrict addr, const int mask)
|
||||
{
|
||||
union ipaddr_t bitmask;
|
||||
int i, j;
|
||||
char ip[128];
|
||||
|
||||
memset(&bitmask, 0x0, sizeof(bitmask));
|
||||
for (i = mask, j = 0; i > 0; i -= 8, j++) {
|
||||
if (i >= 8)
|
||||
bitmask.v6[j] = 0xff;
|
||||
else
|
||||
bitmask.v6[j] = (unsigned char)(0xffU << (8 - i));
|
||||
}
|
||||
for (i = 0; i < (int)sizeof(bitmask); i++)
|
||||
addr->v6[i] |= ~bitmask.v6[i];
|
||||
inet_ntop(AF_INET6, addr, ip, sizeof(ip));
|
||||
return xstrdup(ip);
|
||||
}
|
||||
|
||||
/*! \brief Convert a cidr notated address to a range.
|
||||
* \param range_p Pointer to memory where addresses need to be stored.
|
||||
* \param word A range as a cidr string.
|
||||
*/
|
||||
void parse_cidr(struct conf_t *state, struct range_t *range_p, const char *word)
|
||||
{
|
||||
char *divider;
|
||||
int mask;
|
||||
union ipaddr_t addr;
|
||||
char *last;
|
||||
|
||||
/* determine cidr */
|
||||
divider = strchr(word, '/');
|
||||
*divider++ = '\0';
|
||||
mask = strtol_mask(divider);
|
||||
if (mask < 0)
|
||||
error(EXIT_FAILURE, 0, "cidr %s invalid mask %s", word, divider);
|
||||
if (state->ip_version == IPvUNKNOWN) {
|
||||
if (!strchr(word, ':'))
|
||||
set_ipv_functions(state, IPv4);
|
||||
else
|
||||
set_ipv_functions(state, IPv6);
|
||||
}
|
||||
|
||||
/* start of the range is easy */
|
||||
parse_ipaddr(state, word, &addr);
|
||||
copy_ipaddr(&range_p->first_ip, &addr);
|
||||
|
||||
/* end of the range depends cidr size */
|
||||
last = cidr_last(&addr, mask);
|
||||
parse_ipaddr(state, last, &addr);
|
||||
copy_ipaddr(&range_p->last_ip, &addr);
|
||||
free(last);
|
||||
}
|
||||
|
||||
/*! \brief Copy IP address to union.
|
||||
*
|
||||
* \param dst Destination for a binary IP address.
|
||||
* \param src Sourse of an IP address. */
|
||||
void copy_ipaddr_init(union ipaddr_t *restrict dst __attribute__ ((unused)),
|
||||
const union ipaddr_t *restrict src __attribute__ ((unused)))
|
||||
{
|
||||
}
|
||||
|
||||
void copy_ipaddr_v4(union ipaddr_t *restrict dst, const union ipaddr_t *restrict src)
|
||||
{
|
||||
dst->v4 = src->v4;
|
||||
}
|
||||
|
||||
void copy_ipaddr_v6(union ipaddr_t *restrict dst, const union ipaddr_t *restrict src)
|
||||
{
|
||||
memcpy(&dst->v6, &src->v6, sizeof(src->v6));
|
||||
}
|
||||
|
||||
/*! \brief Convert an address to string. This function will convert the
|
||||
* IPv4 addresses to 123.45.65.78 format, and the IPv6 addresses to it's
|
||||
* native format depending on which version of the addressing is found to
|
||||
* be in use.
|
||||
*
|
||||
* \param ip Binary IP address.
|
||||
* \return Printable address.
|
||||
*/
|
||||
const char *ntop_ipaddr_init(const union ipaddr_t *ip __attribute__ ((unused)))
|
||||
{
|
||||
static char buffer = '\0';
|
||||
|
||||
return &buffer;
|
||||
}
|
||||
|
||||
const char *ntop_ipaddr_v4(const union ipaddr_t *ip)
|
||||
{
|
||||
static char buffer[INET_ADDRSTRLEN];
|
||||
struct in_addr addr;
|
||||
|
||||
addr.s_addr = htonl(ip->v4);
|
||||
return inet_ntop(AF_INET, &addr, buffer, sizeof(buffer));
|
||||
}
|
||||
|
||||
const char *ntop_ipaddr_v6(const union ipaddr_t *ip)
|
||||
{
|
||||
static char buffer[INET6_ADDRSTRLEN];
|
||||
struct in6_addr addr;
|
||||
|
||||
memcpy(addr.s6_addr, ip->v6, sizeof(addr.s6_addr));
|
||||
return inet_ntop(AF_INET6, &addr, buffer, sizeof(buffer));
|
||||
}
|
||||
|
||||
/*! \brief Calculate how many addresses there are in a range.
|
||||
*
|
||||
* \param r Pointer to range structure, which has information about first
|
||||
* and last IP in the range.
|
||||
* \return Size of a range.
|
||||
*/
|
||||
double get_range_size_init(const struct range_t *r __attribute__ ((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
double get_range_size_v4(const struct range_t *r)
|
||||
{
|
||||
return r->last_ip.v4 - r->first_ip.v4 + 1;
|
||||
}
|
||||
|
||||
double get_range_size_v6(const struct range_t *r)
|
||||
{
|
||||
double size = 0;
|
||||
int i;
|
||||
|
||||
/* When calculating the size of an IPv6 range overflow may occur.
|
||||
* In that case only the last LONG_BIT bits are preserved, thus
|
||||
* we just skip the first (16 - LONG_BIT) bits... */
|
||||
for (i = 0; i < 16; i++) {
|
||||
size *= 256;
|
||||
size += (int)r->last_ip.v6[i] - (int)r->first_ip.v6[i];
|
||||
}
|
||||
return size + 1;
|
||||
}
|
||||
|
||||
/*! \fn xstrstr_init(const char *restrict str)
|
||||
* \brief Determine if the dhcpd is in IPv4 or IPv6 mode. This function
|
||||
* may be needed when dhcpd.conf file has zero IP version hints.
|
||||
*
|
||||
* \param str A line from dhcpd.conf
|
||||
* \return prefix_t enum value
|
||||
*/
|
||||
int xstrstr_init(struct conf_t *state, const char *restrict str)
|
||||
{
|
||||
if (!memcmp("lease ", str, 6)) {
|
||||
set_ipv_functions(state, IPv4);
|
||||
return PREFIX_LEASE;
|
||||
}
|
||||
if (!memcmp(" iaaddr ", str, 9)) {
|
||||
set_ipv_functions(state, IPv6);
|
||||
return PREFIX_LEASE;
|
||||
}
|
||||
return NUM_OF_PREFIX;
|
||||
}
|
||||
|
||||
/*! \fn xstrstr_v4(const char *restrict str)
|
||||
* \brief parse lease file in IPv4 mode
|
||||
*
|
||||
* \param str A line from dhcpd.conf
|
||||
* \return prefix_t enum value
|
||||
*/
|
||||
int
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
__attribute__ ((hot))
|
||||
#include <stdio.h>
|
||||
#ifdef HAVE_STDLIB_H
|
||||
#include <stdlib.h>
|
||||
#else /* Not STDC_HEADERS */
|
||||
extern void exit ();
|
||||
extern char *malloc ();
|
||||
#endif /* STDC_HEADERS */
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
xstrstr_v4(struct conf_t *state __attribute__ ((unused)), const char *restrict str)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
if (str[2] == 'b' || str[2] == 'h')
|
||||
len = strlen(str);
|
||||
else
|
||||
len = 0;
|
||||
if (15 < len) {
|
||||
switch (str[16]) {
|
||||
case 'f':
|
||||
if (!memcmp(" binding state free;", str, 21))
|
||||
return PREFIX_BINDING_STATE_FREE;
|
||||
break;
|
||||
case 'a':
|
||||
if (!memcmp(" binding state active;", str, 23))
|
||||
return PREFIX_BINDING_STATE_ACTIVE;
|
||||
if (!memcmp(" binding state abandoned;", str, 25))
|
||||
return PREFIX_BINDING_STATE_ABANDONED;
|
||||
break;
|
||||
case 'e':
|
||||
if (!memcmp(" binding state expired;", str, 24))
|
||||
return PREFIX_BINDING_STATE_EXPIRED;
|
||||
break;
|
||||
case 'r':
|
||||
if (!memcmp(" binding state released;", str, 25))
|
||||
return PREFIX_BINDING_STATE_RELEASED;
|
||||
break;
|
||||
case 'b':
|
||||
if (!memcmp(" binding state backup;", str, 23))
|
||||
return PREFIX_BINDING_STATE_BACKUP;
|
||||
break;
|
||||
case 'n':
|
||||
if (!memcmp(" hardware ethernet", str, 19))
|
||||
return PREFIX_HARDWARE_ETHERNET;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!memcmp("lease ", str, 6))
|
||||
return PREFIX_LEASE;
|
||||
else if (!memcmp(" starts ", str, 9))
|
||||
return PREFIX_STARTS;
|
||||
else if (!memcmp(" ends ", str, 7))
|
||||
return PREFIX_ENDS;
|
||||
else if (!memcmp(" client-hostname ", str, 18))
|
||||
return PREFIX_HOSTNAME;
|
||||
return NUM_OF_PREFIX;
|
||||
/* Simple memory allocation wrapper */
|
||||
void *
|
||||
safe_malloc (size_t size)
|
||||
{
|
||||
void *ret = malloc (size);
|
||||
if (ret == NULL)
|
||||
{
|
||||
eprintf ("safe_malloc: malloc: ");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*! \fn xstrstr_v4(const char *restrict str)
|
||||
* \brief parse lease file in IPv6 mode
|
||||
*
|
||||
* \param str A line from dhcpd.conf
|
||||
* \return prefix_t enum value
|
||||
/* Copyright (C) 1999 Lucent Technologies
|
||||
* Excerpted from 'The Practice of Programming'
|
||||
* by Brian W. Kernighan and Rob Pike
|
||||
* slight modifications Sami Kerola
|
||||
* eprintf: print error message and exit */
|
||||
void
|
||||
eprintf (char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
fflush (stdout);
|
||||
fprintf (stderr, "%s: ", program_name);
|
||||
|
||||
va_start (args, fmt);
|
||||
vfprintf (stderr, fmt, args);
|
||||
va_end (args);
|
||||
|
||||
if (fmt[0] != '\0' && fmt[strlen (fmt) - 1] == ':')
|
||||
fprintf (stderr, " %s", strerror (errno));
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
|
||||
/* Free memory, flush buffers etc*/
|
||||
void
|
||||
clean_up (void)
|
||||
{
|
||||
free (config.dhcpdconf_file);
|
||||
free (config.dhcpdlease_file);
|
||||
free (config.output_file);
|
||||
free (ranges);
|
||||
free (shared_net_names);
|
||||
free (shared_networks);
|
||||
/* Just in case there something in buffers */
|
||||
fclose (stdout);
|
||||
if (errno)
|
||||
{
|
||||
eprintf ("clean_up: stdout:");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
fclose (stderr);
|
||||
if (errno)
|
||||
{
|
||||
eprintf ("clean_up: stderr:");
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
print_version (void)
|
||||
{
|
||||
fprintf (stdout, "%s version %.2f\n", program_name, version_number);
|
||||
fprintf (stdout, "Written by Sami Kerola.\n\n");
|
||||
fprintf (stdout,
|
||||
"%s may be copied only under the terms of GNU General Public\n",
|
||||
program_name);
|
||||
fprintf (stdout,
|
||||
"License, which may be found in the dhcpd-pools source kit.\n");
|
||||
}
|
||||
|
||||
void
|
||||
print_help (void)
|
||||
{
|
||||
fprintf (stdout, "Usage: %s [OPTIONS]\n", program_name);
|
||||
fprintf (stdout, "\
|
||||
This is ISC dhcpd pools usage analyzer.\n\
|
||||
\n");
|
||||
fprintf (stdout, "\
|
||||
-c --config file path to the dhcpd.conf file\n\
|
||||
-l --leases file path to the dhcpd.leases file\n\
|
||||
-f --format [thc] output format\n");
|
||||
fprintf (stdout, "\
|
||||
t is text\n\
|
||||
h is html table\n\
|
||||
c is comma separated values\n");
|
||||
/* To be done...
|
||||
s is snmp\n");
|
||||
*/
|
||||
int
|
||||
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)
|
||||
__attribute__ ((hot))
|
||||
#endif
|
||||
xstrstr_v6(struct conf_t *state __attribute__ ((unused)), const char *restrict str)
|
||||
{
|
||||
size_t len;
|
||||
|
||||
if (str[4] == 'b' || str[2] == 'h')
|
||||
len = strlen(str);
|
||||
else
|
||||
len = 0;
|
||||
if (17 < len) {
|
||||
switch (str[18]) {
|
||||
case 'f':
|
||||
if (!memcmp(" binding state free;", str, 23))
|
||||
return PREFIX_BINDING_STATE_FREE;
|
||||
break;
|
||||
case 'a':
|
||||
if (!memcmp(" binding state active;", str, 25))
|
||||
return PREFIX_BINDING_STATE_ACTIVE;
|
||||
if (!memcmp(" binding state abandoned;", str, 27))
|
||||
return PREFIX_BINDING_STATE_ABANDONED;
|
||||
break;
|
||||
case 'e':
|
||||
if (!memcmp(" binding state expired;", str, 26))
|
||||
return PREFIX_BINDING_STATE_EXPIRED;
|
||||
break;
|
||||
case 'r':
|
||||
if (!memcmp(" binding state released;", str, 27))
|
||||
return PREFIX_BINDING_STATE_RELEASED;
|
||||
break;
|
||||
case 'b':
|
||||
if (!memcmp(" binding state backup;", str, 25))
|
||||
return PREFIX_BINDING_STATE_BACKUP;
|
||||
break;
|
||||
case 'n':
|
||||
if (!memcmp(" hardware ethernet", str, 19))
|
||||
return PREFIX_HARDWARE_ETHERNET;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!memcmp(" iaaddr ", str, 9))
|
||||
return PREFIX_LEASE;
|
||||
else if (!memcmp(" starts ", str, 9))
|
||||
return PREFIX_STARTS;
|
||||
else if (!memcmp(" ends ", str, 7))
|
||||
return PREFIX_ENDS;
|
||||
else if (!memcmp(" client-hostname ", str, 18))
|
||||
return PREFIX_HOSTNAME;
|
||||
return NUM_OF_PREFIX;
|
||||
}
|
||||
|
||||
/*! \brief Parse option argument color mode.
|
||||
*
|
||||
* \param Color mode string.
|
||||
* \return color mode enum.
|
||||
*/
|
||||
int parse_color_mode(const char *restrict arg)
|
||||
{
|
||||
if (!strcmp(arg, "always"))
|
||||
return color_on;
|
||||
if (!strcmp(arg, "auto"))
|
||||
return color_auto;
|
||||
if (!strcmp(arg, "never"))
|
||||
return color_off;
|
||||
return color_unknown;
|
||||
}
|
||||
|
||||
/*! \brief Return a double floating point value.
|
||||
*
|
||||
* \param str String to be converted to a double.
|
||||
* \param errmesg Exit error message if conversion fails.
|
||||
* \return Binary result of string to double conversion.
|
||||
*/
|
||||
double strtod_or_err(const char *restrict str, const char *restrict errmesg)
|
||||
{
|
||||
double num;
|
||||
char *end = NULL;
|
||||
|
||||
if (str == NULL || *str == '\0')
|
||||
goto err;
|
||||
errno = 0;
|
||||
num = strtod(str, &end);
|
||||
if (errno || str == end || (end && *end))
|
||||
goto err;
|
||||
return num;
|
||||
err:
|
||||
error(EXIT_FAILURE, errno, "%s: %s", errmesg, quote(str));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*! \brief Reverse range.
|
||||
* Used before output, if a caller has requested reverse sorting. */
|
||||
void flip_ranges(struct conf_t *state)
|
||||
{
|
||||
unsigned int i = state->num_ranges - 1, j;
|
||||
struct range_t *tmp_ranges;
|
||||
|
||||
tmp_ranges = xmalloc(sizeof(struct range_t) * state->num_ranges);
|
||||
for (j = 0; j < state->num_ranges; j++, i--)
|
||||
*(tmp_ranges + j) = *(state->ranges + i);
|
||||
memcpy(state->ranges, tmp_ranges, state->num_ranges * sizeof(struct range_t));
|
||||
free(tmp_ranges);
|
||||
}
|
||||
|
||||
/*! \brief Free memory, flush buffers etc. */
|
||||
void clean_up(struct conf_t *state)
|
||||
{
|
||||
struct output_sort *cur, *next;
|
||||
struct shared_network_t *c, *n;
|
||||
|
||||
/* Just in case there something in buffers */
|
||||
if (fflush(NULL))
|
||||
error(EXIT_FAILURE, errno, "clean_up: fflush");
|
||||
free(state->ranges);
|
||||
delete_all_leases(state);
|
||||
for (cur = state->sorts; cur; cur = next) {
|
||||
next = cur->next;
|
||||
free(cur);
|
||||
}
|
||||
for (c = state->shared_net_root; c; c = n) {
|
||||
n = c->next;
|
||||
free(c->name);
|
||||
free(c);
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief Print a time stamp of a path or now to output file. */
|
||||
void dp_time_tool(FILE *file, const char *path, const int epoch)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
if (path)
|
||||
stat(path, &st);
|
||||
else
|
||||
clock_gettime(CLOCK_REALTIME, &st.st_mtim);
|
||||
if (epoch)
|
||||
fprintf(file, "%ld", st.st_mtim.tv_sec);
|
||||
else {
|
||||
char time_stamp[64];
|
||||
const time_t mtime = st.st_mtim.tv_sec;
|
||||
struct tm tm;
|
||||
|
||||
localtime_r(&mtime, &tm);
|
||||
strftime(time_stamp, sizeof(time_stamp), "%FT%T%z", &tm);
|
||||
fprintf(file, "%s", time_stamp);
|
||||
}
|
||||
}
|
||||
|
||||
/*! \brief A version printing. */
|
||||
void __attribute__ ((__noreturn__)) print_version(void)
|
||||
{
|
||||
#define stringify(s) #s
|
||||
#define stringify_value(s) stringify(s)
|
||||
fprintf(stdout, "%s\n"
|
||||
"Original design and maintainer Sami Kerola.\n"
|
||||
"uthash %s by Troy D. Hanson.\n"
|
||||
"XML support by Dominic Germain, Sogetel inc.\n"
|
||||
"IPv6 support by Cheer Xiao.\n"
|
||||
"Mustach templating support by Jose Bollo.\n"
|
||||
" The dhcpd-pools is FreeBSD Licensed,\n"
|
||||
" uthash uses BSD license,\n"
|
||||
" gnulib parts are mostly GPL,\n"
|
||||
" and mustache uses Apache License.\n", PACKAGE_STRING,
|
||||
stringify_value(UTHASH_VERSION));
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/*! \brief Command line help screen. */
|
||||
void __attribute__ ((__noreturn__)) usage(int status)
|
||||
{
|
||||
FILE *out = status == EXIT_SUCCESS ? stdout : stderr;
|
||||
|
||||
fprintf(out, "Usage: %s [OPTIONS]\n", program_name);
|
||||
fputs( "\n", out);
|
||||
fputs( "This is ISC dhcpd pools usage analyzer.\n", out);
|
||||
fputs( "\n", out);
|
||||
fputs( " -c, --config=FILE path to the dhcpd.conf file\n", out);
|
||||
fputs( " -l, --leases=FILE path to the dhcpd.leases file\n", out);
|
||||
fputs( " -f, --format=[thHcxXjJ] output format\n", out);
|
||||
fputs( " t for text\n", out);
|
||||
fputs( " H for full html page\n", out);
|
||||
fputs( " x for xml\n", out);
|
||||
fputs( " X for xml with active lease details\n", out);
|
||||
fputs( " j for json\n", out);
|
||||
fputs( " J for json with active lease details\n", out);
|
||||
fputs( " c for comma separated values\n", out);
|
||||
#ifdef BUILD_MUSTACH
|
||||
fputs( " --mustach=FILE output using mustach template file\n", out);
|
||||
#endif
|
||||
fputs( " -s, --sort=[nimcptTe] sort ranges by\n", out);
|
||||
fputs( " n name\n", out);
|
||||
fputs( " i IP\n", out);
|
||||
fputs( " m maximum\n", out);
|
||||
fputs( " c current\n", out);
|
||||
fputs( " p percent\n", out);
|
||||
fputs( " t touched\n", out);
|
||||
fputs( " T t+c\n", out);
|
||||
fputs( " e t+c perc\n", out);
|
||||
fputs( " -r, --reverse reverse order sort\n", out);
|
||||
fputs( " -o, --output=FILE output into a file\n", out);
|
||||
fputs( " -L, --limit=NR output limit mask 77 - 00\n", out);
|
||||
fputs( " --color=WHEN use colors 'always', 'never', or 'auto'\n", out);
|
||||
fputs( " --warning=PERC set warning alarming threshold\n", out);
|
||||
fputs( " --critical=PERC set critical alarming threshold\n", out);
|
||||
fputs( " --skip=WHAT do not print threshold 'ok', 'warning', 'critical',\n", out);
|
||||
fputs( " 'minsize', or 'suppressed'\n", out);
|
||||
fputs( " --warn-count=NR a number of free leases before warning raised\n", out);
|
||||
fputs( " --crit-count=NR a number of free leases before critical raised\n", out);
|
||||
fputs( " --minsize=size disable alarms for small ranges and shared-nets\n", out);
|
||||
fputs( " --snet-alarms suppress range alarms that are part of a shared-net\n", out);
|
||||
fputs( " -p, --perfdata print additional perfdata in alarming mode\n", out);
|
||||
fputs( " -A, --all-as-shared treat single subnets as shared-network with CIDR as their name\n", out);
|
||||
fputs( " --ip-version=4|6 force analysis to use either IPv4 or IPv6 functions\n", out);
|
||||
fputs( " -v, --version output version information and exit\n", out);
|
||||
fputs( " -h, --help display this help and exit\n", out);
|
||||
fputs( "\n", out);
|
||||
fprintf(out, "Report bugs to <%s>\n", PACKAGE_BUGREPORT);
|
||||
fprintf(out, "Homepage: %s\n", PACKAGE_URL);
|
||||
|
||||
exit(status);
|
||||
fprintf (stdout, "\
|
||||
-o --output file output into a file\n\
|
||||
-L --limit nr output limit mask 77 - 00\n\
|
||||
-v --version version information\n\
|
||||
-h --help this screen\n\
|
||||
\n\
|
||||
Report bugs to kerolasa@iki.fi.\n");
|
||||
}
|
||||
|
|
|
|||
1618
src/output.c
1618
src/output.c
File diff suppressed because it is too large
Load diff
341
src/sort.c
341
src/sort.c
|
|
@ -1,341 +0,0 @@
|
|||
/*
|
||||
* The dhcpd-pools has BSD 2-clause license which also known as "Simplified
|
||||
* BSD License" or "FreeBSD License".
|
||||
*
|
||||
* Copyright 2006- Sami Kerola. All rights reserved.
|
||||
* Copyright 2012 Cheer Xiao.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR AND CONTRIBUTORS OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* The views and conclusions contained in the software and documentation are
|
||||
* those of the authors and should not be interpreted as representing
|
||||
* official policies, either expressed or implied, of Sami Kerola.
|
||||
*/
|
||||
|
||||
/*! \file sort.c
|
||||
* \brief Functions to sort output.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "error.h"
|
||||
#include "progname.h"
|
||||
#include "quote.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#include "dhcpd-pools.h"
|
||||
|
||||
/*! \brief Compare IP address, with IPv4/v6 determination.
|
||||
* \param a Binary IP address.
|
||||
* \param b Binary IP address.
|
||||
* \return If a < b return -1, if a < b return 1, when they are equal return 0.
|
||||
*/
|
||||
int ipcomp_init(const union ipaddr_t *restrict a __attribute__ ((unused)),
|
||||
const union ipaddr_t *restrict b __attribute__ ((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ipcomp_v4(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b)
|
||||
{
|
||||
if (a->v4 < b->v4)
|
||||
return -1;
|
||||
if (a->v4 > b->v4)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int ipcomp_v6(const union ipaddr_t *restrict a, const union ipaddr_t *restrict b)
|
||||
{
|
||||
return memcmp(&a->v6, &b->v6, sizeof(a->v6));
|
||||
}
|
||||
|
||||
/*! \brief Compare IP address in leases_t structure, with IPv4/v6 determination.
|
||||
* \param a Binary IP address.
|
||||
* \param b Binary IP address.
|
||||
* \return If a < b return -1, if a < b return 1, when they are equal return 0.
|
||||
*/
|
||||
int leasecomp_init(const struct leases_t *restrict a __attribute__ ((unused)),
|
||||
const struct leases_t *restrict b __attribute__ ((unused)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int leasecomp_v4(const struct leases_t *restrict a, const struct leases_t *restrict b)
|
||||
{
|
||||
if (a->ip.v4 < b->ip.v4)
|
||||
return -1;
|
||||
if (a->ip.v4 > b->ip.v4)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int leasecomp_v6(const struct leases_t *restrict a, const struct leases_t *restrict b)
|
||||
{
|
||||
return memcmp(&a->ip.v6, &b->ip.v6, sizeof(a->ip.v6));
|
||||
}
|
||||
|
||||
/*! \brief Compare IP address in leases. Suitable for sorting range table.
|
||||
* \param r1 A range structure.
|
||||
* \param r2 A range structure.
|
||||
* \return Return pas through from ipcomp.
|
||||
*/
|
||||
int rangecomp(const void *restrict r1, const void *restrict r2)
|
||||
{
|
||||
return ipcomp(&((const struct range_t *)r1)->first_ip,
|
||||
&((const struct range_t *)r2)->first_ip);
|
||||
}
|
||||
|
||||
/*! \brief Compare two doubles.
|
||||
* \param f1,f2 Data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_double(double f1, double f2)
|
||||
{
|
||||
if (isless(f1, f2))
|
||||
return -1;
|
||||
else if (isless(f2, f1))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Compare two range_t by their first_ip.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_ip(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return ipcomp(&r1->first_ip, &r2->first_ip);
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their capacity.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_max(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(get_range_size(r1), get_range_size(r2));
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their current usage.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_cur(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(r1->count, r2->count);
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their current usage percentage.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_percent(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(ret_percent(*r1), ret_percent(*r2));
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their touched addresses.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_touched(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(r1->touched, r2->touched);
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their touched and in use addresses.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_tc(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(ret_tc(*r1), ret_tc(*r2));
|
||||
}
|
||||
|
||||
/*! \brief Compare two range_t by their touched and in use percentage.
|
||||
* \param r1,r2 Pointers to data to compare.
|
||||
* \return Like strcmp.
|
||||
*/
|
||||
int comp_tcperc(struct range_t *r1, struct range_t *r2)
|
||||
{
|
||||
return comp_double(ret_tcperc(*r1), ret_tcperc(*r2));
|
||||
}
|
||||
|
||||
/*! \brief Percentage in use in range.
|
||||
* \param r A range structure.
|
||||
* \return Usage percentage of the given range.
|
||||
*/
|
||||
double ret_percent(struct range_t r)
|
||||
{
|
||||
return r.count / get_range_size(&r);
|
||||
}
|
||||
|
||||
/*! \brief Touched and in use in range
|
||||
* \param r A range structure.
|
||||
* \return Number of touched or in use addresses in the given range.
|
||||
*/
|
||||
double ret_tc(struct range_t r)
|
||||
{
|
||||
return (r.count + r.touched);
|
||||
}
|
||||
|
||||
/*! \brief Return percentage of addresses touched and in use in range.
|
||||
* \param r A range structure.
|
||||
* \return Percentage of touched or in use addresses in the given range.
|
||||
*/
|
||||
double ret_tcperc(struct range_t r)
|
||||
{
|
||||
return ret_tc(r) / get_range_size(&r);
|
||||
}
|
||||
|
||||
/*! \brief Sort field selector.
|
||||
* \param c Symbolic name of a sort by character.
|
||||
* The sort algorithms are stabile, which means multiple sorts can be
|
||||
* specified and they do not mess the result of previous sort. The sort
|
||||
* algorithms are used via function pointer, that gets to be reassigned.
|
||||
* \return Return the selected compare function.
|
||||
*/
|
||||
comparer_t field_selector(char c)
|
||||
{
|
||||
switch (c) {
|
||||
case 'n':
|
||||
return NULL;
|
||||
case 'i':
|
||||
return comp_ip;
|
||||
case 'm':
|
||||
return comp_max;
|
||||
case 'c':
|
||||
return comp_cur;
|
||||
case 'p':
|
||||
return comp_percent;
|
||||
case 't':
|
||||
return comp_touched;
|
||||
case 'T':
|
||||
return comp_tc;
|
||||
case 'e':
|
||||
return comp_tcperc;
|
||||
default:
|
||||
{
|
||||
char str[2] = { c, '\0' };
|
||||
error(EXIT_FAILURE, 0, "field_selector: unknown sort order: %s",
|
||||
quote(str));
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*! \brief Perform requested sorting.
|
||||
* \param left The left side of the merge sort.
|
||||
* \param right The right side of the merge sort.
|
||||
* \return Relevant for merge sort decision.
|
||||
*/
|
||||
static int merge(struct conf_t *state, struct range_t *restrict left, struct range_t *restrict right)
|
||||
{
|
||||
struct output_sort *p;
|
||||
int ret;
|
||||
|
||||
for (p = state->sorts; p; p = p->next) {
|
||||
if (p->func == NULL) {
|
||||
/* String sorting is special. */
|
||||
ret = strcmp(left->shared_net->name, right->shared_net->name);
|
||||
} else {
|
||||
/* Range sorts are common. */
|
||||
ret = p->func(left, right);
|
||||
}
|
||||
if (0 < ret)
|
||||
return (0);
|
||||
if (ret < 0)
|
||||
return (1);
|
||||
}
|
||||
/* this is reached if nothing was sorted */
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*! \brief Mergesort for range table.
|
||||
*/
|
||||
void mergesort_ranges(struct conf_t *state, struct range_t *restrict orig, unsigned int size,
|
||||
struct range_t *restrict temp, const int root_call)
|
||||
{
|
||||
unsigned int left, i, u_right;
|
||||
struct range_t hold;
|
||||
/* Merge sort split size */
|
||||
static const unsigned int MIN_MERGE_SIZE = 8;
|
||||
|
||||
if (temp == NULL)
|
||||
temp = xmalloc(sizeof(struct range_t) * size);
|
||||
|
||||
if (size < MIN_MERGE_SIZE) {
|
||||
for (left = 0; left < size; left++) {
|
||||
int s_right;
|
||||
|
||||
hold = *(orig + left);
|
||||
for (s_right = left - 1; 0 <= s_right; s_right--) {
|
||||
if (merge(state, (orig + s_right), &hold))
|
||||
break;
|
||||
*(orig + s_right + 1) = *(orig + s_right);
|
||||
}
|
||||
*(orig + s_right + 1) = hold;
|
||||
}
|
||||
if (root_call)
|
||||
free(temp);
|
||||
return;
|
||||
}
|
||||
mergesort_ranges(state, orig, size / 2, temp, 0);
|
||||
mergesort_ranges(state, orig + size / 2, size - size / 2, temp, 0);
|
||||
left = 0;
|
||||
u_right = size / 2;
|
||||
i = 0;
|
||||
while (left < size / 2 && u_right < size) {
|
||||
if (merge(state, (orig + left), (orig + u_right))) {
|
||||
*(temp + i) = *(orig + left);
|
||||
left++;
|
||||
} else {
|
||||
*(temp + i) = *(orig + u_right);
|
||||
u_right++;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
while (left < size / 2) {
|
||||
*(temp + i) = *(orig + left);
|
||||
left++;
|
||||
i++;
|
||||
}
|
||||
while (u_right < size) {
|
||||
*(temp + i) = *(orig + u_right);
|
||||
u_right++;
|
||||
i++;
|
||||
}
|
||||
memcpy(orig, temp, size * sizeof(struct range_t));
|
||||
|
||||
if (root_call)
|
||||
free(temp);
|
||||
}
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
TESTS = \
|
||||
tests/alarm-count-option \
|
||||
tests/alarm-critical \
|
||||
tests/alarm-critical-ranges \
|
||||
tests/alarm-critical-snets \
|
||||
tests/alarm-ignore \
|
||||
tests/alarm-ok \
|
||||
tests/alarm-shared-ok \
|
||||
tests/alarm-warning \
|
||||
tests/alarm-warning-ranges \
|
||||
tests/alarm-warning-snets \
|
||||
tests/shnet-alarm \
|
||||
tests/big-small \
|
||||
tests/binding-states \
|
||||
tests/bootp \
|
||||
tests/cidr-v4 \
|
||||
tests/cidr-v6 \
|
||||
tests/complete \
|
||||
tests/complete-perfdata \
|
||||
tests/empty \
|
||||
tests/errors \
|
||||
tests/full-json \
|
||||
tests/full-xml \
|
||||
tests/formats \
|
||||
tests/leading0 \
|
||||
tests/one-ip \
|
||||
tests/one-line \
|
||||
tests/parser \
|
||||
tests/range4 \
|
||||
tests/range6 \
|
||||
tests/same-twice \
|
||||
tests/shufled \
|
||||
tests/simple \
|
||||
tests/skip \
|
||||
tests/sorts \
|
||||
tests/statuses \
|
||||
tests/v6 \
|
||||
tests/v6-perfdata
|
||||
|
||||
if ENABLE_MUSTACH
|
||||
TESTS += \
|
||||
tests/mustach
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
tests/confs \
|
||||
tests/expected \
|
||||
tests/leases \
|
||||
tests/test.sh \
|
||||
$(TESTS)
|
||||
|
||||
TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) PATH=$(top_builddir)$(PATH_SEPARATOR)$$PATH
|
||||
|
||||
check-local: $(SHELL) $(top_srcdir)/tests/test.sh
|
||||
|
||||
clean-local-tests:
|
||||
rm -rf $(top_builddir)/tests/outputs
|
||||
|
||||
CLEAN_LOCALS += clean-local-tests
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm warning both ranges and shared networks.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
echo '== warn count ==' > tests/outputs/$IAM
|
||||
dhcpd-pools --config $top_srcdir/tests/confs/complete --leases $top_srcdir/tests/leases/complete \
|
||||
--color=never --warning=40 --warn-count=20 --output=tests/outputs/$IAM-too
|
||||
echo $? >> tests/outputs/$IAM-too
|
||||
cat tests/outputs/$IAM-too >> tests/outputs/$IAM
|
||||
|
||||
echo '== crit count ==' >> tests/outputs/$IAM
|
||||
dhcpd-pools --config $top_srcdir/tests/confs/complete --leases $top_srcdir/tests/leases/complete \
|
||||
--color=never --critical=40 --crit-count=20 --output=tests/outputs/$IAM-too
|
||||
echo $? >> tests/outputs/$IAM-too
|
||||
cat tests/outputs/$IAM-too >> tests/outputs/$IAM
|
||||
|
||||
echo '== minsize ==' >> tests/outputs/$IAM
|
||||
dhcpd-pools -c $top_srcdir/tests/confs/complete -l $top_srcdir/tests/leases/complete \
|
||||
--color=never --warning=40 --warn-count=20 --minsize=40 -o tests/outputs/$IAM-too
|
||||
echo $? >> tests/outputs/$IAM-too
|
||||
cat tests/outputs/$IAM-too >> tests/outputs/$IAM
|
||||
|
||||
echo '== snet alarms ==' >> tests/outputs/$IAM
|
||||
dhcpd-pools -c $top_srcdir/tests/confs/complete -l $top_srcdir/tests/leases/complete \
|
||||
--color=never --warning=40 --snet-alarms -o tests/outputs/$IAM-too
|
||||
echo $? >> tests/outputs/$IAM-too
|
||||
cat tests/outputs/$IAM-too >> tests/outputs/$IAM
|
||||
|
||||
echo '== shared net count alarms ==' >> tests/outputs/$IAM
|
||||
dhcpd-pools -c $top_srcdir/tests/confs/complete -l $top_srcdir/tests/leases/complete \
|
||||
--color=always --format t --crit-count=20 --critical=0 --warning=0 --warn-count=24 \
|
||||
--output=tests/outputs/$IAM-too
|
||||
echo $? >> tests/outputs/$IAM-too
|
||||
cat tests/outputs/$IAM-too >> tests/outputs/$IAM
|
||||
|
||||
rm -f tests/outputs/$IAM-too
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm critical both ranges & shared nets.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools --critical=50 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm critical ranges only.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools -L 11 --critical=50 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm critical shared networks only.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools -L 22 --critical=50 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Minimal regression test suite.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools --warning 1 --critical 101 --min 2 \
|
||||
-c $top_srcdir/tests/confs/one-ip \
|
||||
-l $top_srcdir/tests/leases/one-ip -o tests/outputs/$IAM
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm warning both ranges and shared networks.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools --critical=100 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Shared network should be OK, and critical range ignored.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools -L 66 --critical=54 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Alarm warning both ranges and shared networks.
|
||||
|
||||
IAM=$(basename $0)
|
||||
|
||||
if [ ! -d tests/outputs ]; then
|
||||
mkdir tests/outputs
|
||||
fi
|
||||
|
||||
dhcpd-pools --warning=50 -c $top_srcdir/tests/confs/complete \
|
||||
-l $top_srcdir/tests/leases/complete -o tests/outputs/$IAM
|
||||
echo $? >> tests/outputs/$IAM
|
||||
|
||||
diff -u $top_srcdir/tests/expected/$IAM tests/outputs/$IAM
|
||||
exit $?
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue