wmthrottle: Add version 0.1.1 to repository.

From
https://web.archive.org/web/20071004044600/http://rffr.de/wmthrottle-0.1.1.tar.bz2
This commit is contained in:
Doug Torrance 2018-07-15 13:45:20 -04:00 committed by Carlos R. Mafra
parent 6f0fbd34f9
commit e2c09fe8fe
48 changed files with 15931 additions and 0 deletions

12
wmthrottle/AUTHORS Normal file
View file

@ -0,0 +1,12 @@
Main Author:
Anthony Peacock <bratag44@hotmail.com>
Based largely on work on WMMemMon, WMCPULoad and WMMemLoad done by:
Thomas Nemeth <tnemeth@free.fr>
Seiichi SATO <ssato@sh.rim.or.jp>
Mark Staggs <me@markstaggs.net>
And also on wmapm by :
Chris D. Faulhaber <jedgar@speck.ml.org>
Michael G. Henderson <mghenderson@lanl.gov>

340
wmthrottle/COPYING Normal file
View file

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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.

27
wmthrottle/ChangeLog Normal file
View file

@ -0,0 +1,27 @@
2003-01-01
* version 0.3.2 released
* fixed a bug in modifier-keys handling
* fixed a bug in differenciating linux and freebsd from other OS
2002-11-18
* version 0.3.1 released
* fixed a bug in calculating FreeBSD remaining time
(Thanks to Lorenz Gschwendtner)
2002-10-08
* version 0.3.0 released
* added options for apm commands (suspend and standby) instead
of hard-coded "apm -s" and "apm -S"
2002-10-05
* version 0.2.1 released
* bug fix in windowed mode
2002-09-26
* version 0.2.0 released
* deleted option --apm-mode to use Ctrl key with button 2 for suspend
and only button 2 for standby.
* modified the man page
2002-09-02
* Creation :)

13
wmthrottle/INSTALL Normal file
View file

@ -0,0 +1,13 @@
Easy way:
$ su
Copy src/wmthrottle somewhere to your path, e.g.
# cp src/wmthrottle /usr/local/bin/wmthrottle
Make it run as root to be able to use it as a normal user
# chmod u+s /<path-to>/wmthrottle
"Hard" way:
$ make
$ su
# make install
Make it always run as root to be able to use it as a normal user
# chmod u+s /usr/local/bin/wmthrottle

528
wmthrottle/Makefile Normal file
View file

@ -0,0 +1,528 @@
# Makefile.in generated by automake 1.7.2 from Makefile.am.
# Makefile. Generated from Makefile.in by configure.
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
# 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.
srcdir = .
top_srcdir = .
pkgdatadir = $(datadir)/wmapmload
pkglibdir = $(libdir)/wmapmload
pkgincludedir = $(includedir)/wmapmload
top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
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 = :
host_triplet = i686-pc-linux-gnu
ACLOCAL = aclocal-1.7
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = tar
AUTOCONF = autoconf
AUTOHEADER = autoheader
AUTOMAKE = automake-1.7
AWK = gawk
CC = gcc
CCDEPMODE = depmode=gcc3
CFLAGS = -g -O2
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DFLAGS =
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
HEADER_SEARCH_PATH = -I/usr/X11R6/include -I/usr/local/include
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
LIBRARY_SEARCH_PATH = -L/usr/X11R6/lib -L/usr/local/lib
LIBS =
LN_S = ln -s
LTLIBOBJS =
MAKEINFO = makeinfo
OBJEXT = o
OS = linux
PACKAGE = wmapmload
PACKAGE_BUGREPORT = tnemeth@free.fr
PACKAGE_NAME = wmapmload
PACKAGE_STRING = wmapmload 0.3.2
PACKAGE_TARNAME = wmapmload
PACKAGE_VERSION = 0.3.2
PATH_SEPARATOR = :
SETGID_FLAGS =
SET_MAKE =
SHELL = /bin/sh
STRIP =
VERSION = 0.3.2
XCFLAGS = -I/usr/X11R6/include
XLFLAGS = -L/usr/X11R6/lib
XLIBS = -lX11 -lXext -lXpm
X_CFLAGS = -I/usr/X11R6/include
X_EXTRA_LIBS =
X_LIBRARY_PATH = /usr/X11R6/lib
X_LIBS = -L/usr/X11R6/lib
X_PRE_LIBS = -lSM -lICE
ac_ct_CC = gcc
ac_ct_STRIP =
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__quote =
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/rfreund/Documents/prog/wmapp/wmthrottle-0.1.1_performance/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
oldincludedir = /usr/include
prefix = /usr/local
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target = i686-pc-linux-gnu
target_alias =
target_cpu = i686
target_os = linux-gnu
target_vendor = pc
SUBDIRS = src doc
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
ps-recursive install-info-recursive uninstall-info-recursive \
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive
DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
Makefile.in NEWS THANKS TODO acinclude.m4 aclocal.m4 \
config.guess config.h.in config.sub configure configure.ac \
depcomp install-sh missing mkinstalldirs
DIST_SUBDIRS = $(SUBDIRS)
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): configure.ac acinclude.m4
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: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
touch $(srcdir)/config.h.in
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):
@set fnord $$MAKEFLAGS; amf=$$2; \
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) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
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:
@set fnord $$MAKEFLAGS; amf=$$2; \
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) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
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
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
CTAGSFLAGS =
tags: TAGS
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-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$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; }'`; \
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$tags $$unique
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
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
top_distdir = .
distdir = $(PACKAGE)-$(VERSION)
am__remove_distdir = \
{ test ! -d $(distdir) \
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -fr $(distdir); }; }
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
distdir: $(DISTFILES)
$(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"; \
$(mkinstalldirs) "$(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='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
(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
$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__remove_distdir)
dist dist-all: distdir
$(AMTAR) chof - $(distdir) | 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
$(am__remove_distdir)
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
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` \
&& 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 ../.. && $(mkinstalldirs) "$$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-gzip \
&& rm -f $(distdir).tar.gz \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck
$(am__remove_distdir)
@echo "$(distdir).tar.gz is ready for distribution" | \
sed 'h;s/./=/g;p;x;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_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(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)
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
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 autom4te.cache
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 check check-am clean \
clean-generic clean-recursive ctags ctags-recursive dist \
dist-all dist-gzip distcheck distclean distclean-generic \
distclean-hdr distclean-recursive distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am dvi-recursive info \
info-am info-recursive install install-am install-data \
install-data-am install-data-recursive install-exec \
install-exec-am install-exec-recursive install-info \
install-info-am install-info-recursive install-man \
install-recursive install-strip installcheck installcheck-am \
installdirs installdirs-am installdirs-recursive \
maintainer-clean maintainer-clean-generic \
maintainer-clean-recursive mostlyclean mostlyclean-generic \
mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
ps-recursive tags tags-recursive uninstall uninstall-am \
uninstall-info-am uninstall-info-recursive uninstall-recursive
# 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:

2
wmthrottle/Makefile.am Normal file
View file

@ -0,0 +1,2 @@
SUBDIRS = src doc

363
wmthrottle/Makefile.in Normal file
View file

@ -0,0 +1,363 @@
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AWK = @AWK@
CC = @CC@
DFLAGS = @DFLAGS@
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
LIBS = @LIBS@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
OS = @OS@
PACKAGE = @PACKAGE@
SETGID_FLAGS = @SETGID_FLAGS@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
XLFLAGS = @XLFLAGS@
XLIBS = @XLIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBRARY_PATH = @X_LIBRARY_PATH@
SUBDIRS = src doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \
Makefile.am Makefile.in NEWS THANKS TODO acinclude.m4 aclocal.m4 \
config.guess config.h.in config.sub configure configure.ac install-sh \
missing mkinstalldirs
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = tar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
$(ACLOCAL_M4): configure.ac acinclude.m4
cd $(srcdir) && $(ACLOCAL)
config.status: $(srcdir)/configure.ac $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
cd $(srcdir) && $(AUTOCONF)
config.h: stamp-h
@if test ! -f $@; then \
rm -f stamp-h; \
$(MAKE) stamp-h; \
else :; fi
stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
$(SHELL) ./config.status
@echo timestamp > stamp-h 2> /dev/null
$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
@if test ! -f $@; then \
rm -f $(srcdir)/stamp-h.in; \
$(MAKE) $(srcdir)/stamp-h.in; \
else :; fi
$(srcdir)/stamp-h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOHEADER)
@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
mostlyclean-hdr:
clean-hdr:
distclean-hdr:
-rm -f config.h
maintainer-clean-hdr:
# 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.
@SET_MAKE@
all-recursive install-data-recursive install-exec-recursive \
installdirs-recursive install-recursive uninstall-recursive \
check-recursive installcheck-recursive info-recursive dvi-recursive:
@set fnord $(MAKEFLAGS); amf=$$2; \
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) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
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:
@set fnord $(MAKEFLAGS); amf=$$2; \
dot_seen=no; \
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
rev="$$subdir $$rev"; \
test "$$subdir" = "." && dot_seen=yes; \
done; \
test "$$dot_seen" = "no" && 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) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done && test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(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
-rm -rf $(distdir)
GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
mkdir $(distdir)/=build
mkdir $(distdir)/=inst
dc_install_base=`cd $(distdir)/=inst && pwd`; \
cd $(distdir)/=build \
&& ../configure --srcdir=.. --prefix=$$dc_install_base \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) dist
-rm -rf $(distdir)
@banner="$(distdir).tar.gz is ready for distribution"; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo "$$dashes"; \
echo "$$banner"; \
echo "$$dashes"
dist: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
dist-all: distdir
-chmod -R a+r $(distdir)
GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
-rm -rf $(distdir)
distdir: $(DISTFILES)
-rm -rf $(distdir)
mkdir $(distdir)
-chmod 777 $(distdir)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
for subdir in $(SUBDIRS); do \
if test "$$subdir" = .; then :; else \
test -d $(distdir)/$$subdir \
|| mkdir $(distdir)/$$subdir \
|| exit 1; \
chmod 777 $(distdir)/$$subdir; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
|| exit 1; \
fi; \
done
info-am:
info: info-recursive
dvi-am:
dvi: dvi-recursive
check-am: all-am
check: check-recursive
installcheck-am:
installcheck: installcheck-recursive
all-recursive-am: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
install-exec-am:
install-exec: install-exec-recursive
install-data-am:
install-data: install-data-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-recursive
uninstall-am:
uninstall: uninstall-recursive
all-am: Makefile config.h
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-tags clean-generic mostlyclean-am
clean: clean-recursive
distclean-am: distclean-hdr distclean-tags distclean-generic clean-am
distclean: distclean-recursive
-rm -f config.status
maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-recursive
-rm -f config.status
.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
install-data-recursive uninstall-data-recursive install-exec-recursive \
uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
all-recursive check-recursive installcheck-recursive info-recursive \
dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \
install-exec-am install-exec install-data-am install-data install-am \
install uninstall-am uninstall all-redirect all-am all installdirs-am \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# 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:

0
wmthrottle/NEWS Normal file
View file

54
wmthrottle/README Normal file
View file

@ -0,0 +1,54 @@
A small app of questionable value (myself I use it to throttle the CPU when I perceive it
is getting too hot). At the moment the code is optimized for a dell laptop but should work
on most ACPI systems.
Supports changing cpu speed via performance (Intl's enhanced speedstep in
Centrino/Pentium M cpus) as well, via the -p command line option. This is good for
saving energy while on batteries and it can also avoid fan noise.
It also features automatic, dynamic downclocking/throttling depending on the cpu
temperature. This can be useful to avoid fan noise. To enable this feature, simply
run wmthrottle with the -t <temperature> option and give it a certain temperature
threshold. Starting at this threshold, it will change performance/throttle states.
This is dynamic, i.e. a higher temperature will result in a lower clock speed
(or higher throttling).
The temperature threshold depends on the machine you use it on and on workload.
The machine it was tested on (Acer TravelMate 800) requires a
threshold of 49/50 degrees (Celsius) when having 100% cpu usage to keep the cpu fan
from turning on.
Note that although the numbers above are in Celsius, this feature should work with
Fahrenheit as well. Simply check /proc/acpi/thermal_zone/THRM/temperature to see
if your acpi is set to use Celsius or Fahrenheit.
When the -t switch is set, wmthrottle will change cpu performance/throttling
states every one degree. Example: You start wmthrottle with -t 49, which means
that it will change from state 0 to state 1 when the cpu is at 49 degrees,
and will change from state 1 to 2 when the temperature increases by 1 degree,
i.e. at 50 degrees, and so on.
If your setup requires a different temperature delta value, e.g. when your
system is using Fahrenheit, you can set this value using the -e switch.
You will probably have to plain with both the -t and the -e switches since
all computers are different.
Once you have started wmthrottle, change throttle/performance states by
clicking on state numbers.
If started with the -t <temperature> option, clicking on the [T] toggles
dynamic performance/throttle changes. If you turn it off, you can also choose
states manually again.
Clicking anywhere else will toggle the back light.
If you want to use wmthrottle with a windowmanager other than windowmaker, the
-bw (--broken-wm) flag will probably be your friend.
wmthrottle certainly needs to be run as root. To always run it as root, simply set the
setuid bit on wmthrottle after installing:
# chmod u+s wmthrottle
This means that wmthrottle is always run by whoever owns it (root in this case),
no matter who started it.
Also remember that playing around with your CPU etc can be a bad thing so saying
standard I take no responsibility for damage to your machine disclaimer applies.

8
wmthrottle/THANKS Normal file
View file

@ -0,0 +1,8 @@
For creating WMMemMon and WMCPULoad and wmapmload for which this is based:
Thomas Nemeth
Seiichi SATO <ssato@sh.rim.or.jp>
For creating WMMemLoad for which this is based:
Mark Staggs <me@markstaggs.net>
For wmapm for which this is based:
Chris D. Faulhaber <jedgar@speck.ml.org>
Michael G. Henderson <mghenderson@lanl.gov>

3
wmthrottle/TODO Normal file
View file

@ -0,0 +1,3 @@
* other OS support(help!)
* optimize drawing-routines (MIT-SHM)
* Non-GNU make fixes

27
wmthrottle/acinclude.m4 Normal file
View file

@ -0,0 +1,27 @@
#!/bin/sh
# $Id: acinclude.m4,v 1.3 1999/07/24 22:01:51 daeron Exp $
dnl
dnl DA_CHECK_LIB(NAME, FUNCTION, EXTRALIBS)
dnl
AC_DEFUN(DA_CHECK_LIB,
[
LDFLAGS_old="$LDFLAGS"
LDFLAGS="$LDFLAGS $lib_search_path"
AC_CHECK_LIB([$1],[$2],yes=yes,no=no,[$3])
LDFLAGS="$LDFLAGS_old"
])
dnl
dnl DA_CHECK_HEADER(NAME)
dnl
AC_DEFUN(DA_CHECK_HEADER,
[
CPPFLAGS_old="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $inc_search_path"
AC_CHECK_HEADER([$1])
CPPFLAGS="$CPPFLAGS_old"
])

155
wmthrottle/aclocal.m4 vendored Normal file
View file

@ -0,0 +1,155 @@
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
dnl PARTICULAR PURPOSE.
#!/bin/sh
# $Id: acinclude.m4,v 1.3 1999/07/24 22:01:51 daeron Exp $
dnl
dnl DA_CHECK_LIB(NAME, FUNCTION, EXTRALIBS)
dnl
AC_DEFUN(DA_CHECK_LIB,
[
LDFLAGS_old="$LDFLAGS"
LDFLAGS="$LDFLAGS $lib_search_path"
AC_CHECK_LIB([$1],[$2],yes=yes,no=no,[$3])
LDFLAGS="$LDFLAGS_old"
])
dnl
dnl DA_CHECK_HEADER(NAME)
dnl
AC_DEFUN(DA_CHECK_HEADER,
[
CPPFLAGS_old="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $inc_search_path"
AC_CHECK_HEADER([$1])
CPPFLAGS="$CPPFLAGS_old"
])
# Do all the work for Automake. 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.
# serial 1
dnl Usage:
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
AC_DEFUN(AM_INIT_AUTOMAKE,
[AC_REQUIRE([AC_PROG_INSTALL])
PACKAGE=[$1]
AC_SUBST(PACKAGE)
VERSION=[$2]
AC_SUBST(VERSION)
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
ifelse([$3],,
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
AC_REQUIRE([AM_SANITY_CHECK])
AC_REQUIRE([AC_ARG_PROGRAM])
dnl FIXME This is truly gross.
missing_dir=`cd $ac_aux_dir && pwd`
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
AC_REQUIRE([AC_PROG_MAKE_SET])])
#
# Check to make sure that the build environment is sane.
#
AC_DEFUN(AM_SANITY_CHECK,
[AC_MSG_CHECKING([whether build environment is sane])
# Just in case
sleep 1
echo timestamp > conftestfile
# 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 conftestfile 2> /dev/null`
if test "[$]*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftestfile`
fi
if test "[$]*" != "X $srcdir/configure conftestfile" \
&& test "[$]*" != "X conftestfile $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" = conftestfile
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
rm -f conftest*
AC_MSG_RESULT(yes)])
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
dnl The program must properly implement --version.
AC_DEFUN(AM_MISSING_PROG,
[AC_MSG_CHECKING(for working $2)
# Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh.
if ($2 --version) < /dev/null > /dev/null 2>&1; then
$1=$2
AC_MSG_RESULT(found)
else
$1="$3/missing $2"
AC_MSG_RESULT(missing)
fi
AC_SUBST($1)])
# Like AC_CONFIG_HEADER, but automatically create stamp file.
AC_DEFUN(AM_CONFIG_HEADER,
[AC_PREREQ([2.12])
AC_CONFIG_HEADER([$1])
dnl When config.status generates a header, we must update the stamp-h file.
dnl This file resides in the same directory as the config header
dnl that is generated. We must strip everything past the first ":",
dnl and everything past the last "/".
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
<<am_indx=1
for am_file in <<$1>>; do
case " <<$>>CONFIG_HEADERS " in
*" <<$>>am_file "*<<)>>
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
;;
esac
am_indx=`expr "<<$>>am_indx" + 1`
done<<>>dnl>>)
changequote([,]))])

1320
wmthrottle/config.guess vendored Executable file

File diff suppressed because it is too large Load diff

101
wmthrottle/config.h Normal file
View file

@ -0,0 +1,101 @@
/* config.h. Generated by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* use debug code */
/* #undef DEBUG */
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if your system has a working `malloc' function. */
#define HAVE_MALLOC 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `select' function. */
#define HAVE_SELECT 1
/* Define to 1 if you have the <stddef.h> header file. */
#define HAVE_STDDEF_H 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strtoul' function. */
#define HAVE_STRTOUL 1
/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H 1
/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
#define HAVE_SYS_TIME_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the `uname' function. */
#define HAVE_UNAME 1
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
/* use '--ignore-buffers' option */
#define IGNORE_BUFFERS 1
/* use '--ignore-cached' option */
#define IGNORE_CACHED 1
/* use '--ignore-wired' option */
/* #undef IGNORE_WIRED */
/* Name of package */
#define PACKAGE "wmapmload"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "tnemeth@free.fr"
/* Define to the full name of this package. */
#define PACKAGE_NAME "wmapmload"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "wmapmload 0.3.2"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "wmapmload"
/* Define to the version of this package. */
#define PACKAGE_VERSION "0.3.2"
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1
/* Version number of package */
#define VERSION "0.3.2"
/* Define to 1 if the X Window System is missing or not being used. */
/* #undef X_DISPLAY_MISSING */
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */
/* Define to `unsigned' if <sys/types.h> does not define. */
/* #undef size_t */

100
wmthrottle/config.h.in Normal file
View file

@ -0,0 +1,100 @@
/* config.h.in. Generated from configure.ac by autoheader. */
/* use debug code */
#undef DEBUG
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if your system has a working `malloc' function. */
#undef HAVE_MALLOC
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the `select' function. */
#undef HAVE_SELECT
/* Define to 1 if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_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 `strtoul' function. */
#undef HAVE_STRTOUL
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_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/time.h> header file. */
#undef HAVE_SYS_TIME_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 `uname' function. */
#undef HAVE_UNAME
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* use '--ignore-buffers' option */
#undef IGNORE_BUFFERS
/* use '--ignore-cached' option */
#undef IGNORE_CACHED
/* use '--ignore-wired' option */
#undef IGNORE_WIRED
/* 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
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
/* Version number of package */
#undef VERSION
/* Define to 1 if the X Window System is missing or not being used. */
#undef X_DISPLAY_MISSING
/* Define to empty if `const' does not conform to ANSI C. */
#undef const
/* Define to `unsigned' if <sys/types.h> does not define. */
#undef size_t

514
wmthrottle/config.log Normal file
View file

@ -0,0 +1,514 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by wmapmload configure 0.3.2, which was
generated by GNU Autoconf 2.53. Invocation command line was
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = sleet
uname -m = i686
uname -r = 2.4.21-0.11mdkcustom
uname -s = Linux
uname -v = #2 Sat Mar 22 01:01:25 EST 2003
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /sbin
PATH: /usr/sbin
PATH: /bin
PATH: /usr/bin
PATH: /usr/X11R6/bin
PATH: /usr/local/bin
PATH: /usr/local/sbin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1251: checking build system type
configure:1269: result: i686-pc-linux-gnu
configure:1277: checking host system type
configure:1291: result: i686-pc-linux-gnu
configure:1299: checking target system type
configure:1313: result: i686-pc-linux-gnu
configure:1339: checking for a BSD-compatible install
configure:1393: result: /usr/bin/install -c
configure:1404: checking whether build environment is sane
configure:1447: result: yes
configure:1462: checking whether make sets ${MAKE}
configure:1482: result: yes
configure:1514: checking for working aclocal
configure:1521: result: found
configure:1529: checking for working autoconf
configure:1536: result: found
configure:1544: checking for working automake
configure:1551: result: found
configure:1559: checking for working autoheader
configure:1566: result: found
configure:1574: checking for working makeinfo
configure:1581: result: found
configure:1602: checking for gawk
configure:1618: found /bin/gawk
configure:1628: result: gawk
configure:1684: checking for gcc
configure:1700: found /usr/bin/gcc
configure:1710: result: gcc
configure:1954: checking for C compiler version
configure:1957: gcc --version </dev/null >&5
gcc (GCC) 3.2.2 (Mandrake Linux 9.1 3.2.2-2mdk)
Copyright (C) 2002 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.
configure:1960: $? = 0
configure:1962: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.2.2/specs
Configured with: ../configure --prefix=/usr --libdir=/usr/lib --with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --enable-long-long --enable-__cxa_atexit --enable-languages=c,c++,ada,f77,objc,java --host=i586-mandrake-linux-gnu --with-system-zlib
Thread model: posix
gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-2mdk)
configure:1965: $? = 0
configure:1967: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:1970: $? = 1
configure:1996: checking for C compiler default output
configure:1999: gcc conftest.c >&5
configure:2002: $? = 0
configure:2035: result: a.out
configure:2040: checking whether the C compiler works
configure:2046: ./a.out
configure:2049: $? = 0
configure:2064: result: yes
configure:2071: checking whether we are cross compiling
configure:2073: result: no
configure:2076: checking for suffix of executables
configure:2078: gcc -o conftest conftest.c >&5
configure:2081: $? = 0
configure:2103: result:
configure:2109: checking for suffix of object files
configure:2133: gcc -c conftest.c >&5
configure:2136: $? = 0
configure:2155: result: o
configure:2159: checking whether we are using the GNU C compiler
configure:2186: gcc -c conftest.c >&5
configure:2189: $? = 0
configure:2192: test -s conftest.o
configure:2195: $? = 0
configure:2207: result: yes
configure:2213: checking whether gcc accepts -g
configure:2237: gcc -c -g conftest.c >&5
configure:2240: $? = 0
configure:2243: test -s conftest.o
configure:2246: $? = 0
configure:2256: result: yes
configure:2283: gcc -c -g -O2 conftest.c >&5
conftest.c:2: parse error before "me"
configure:2286: $? = 1
configure: failed program was:
#ifndef __cplusplus
choke me
#endif
configure:2408: checking for a BSD-compatible install
configure:2462: result: /usr/bin/install -c
configure:2473: checking whether ln -s works
configure:2477: result: yes
configure:2507: checking how to run the C preprocessor
configure:2533: gcc -E conftest.c
configure:2539: $? = 0
configure:2566: gcc -E conftest.c
configure:2562:28: ac_nonexistent.h: No such file or directory
configure:2572: $? = 1
configure: failed program was:
#line 2561 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:2609: result: gcc -E
configure:2624: gcc -E conftest.c
configure:2630: $? = 0
configure:2657: gcc -E conftest.c
configure:2653:28: ac_nonexistent.h: No such file or directory
configure:2663: $? = 1
configure: failed program was:
#line 2652 "configure"
#include "confdefs.h"
#include <ac_nonexistent.h>
configure:2703: checking for X
configure:2919: result: libraries /usr/X11R6/lib, headers /usr/X11R6/include
configure:3076: gcc -o conftest -g -O2 conftest.c -L/usr/X11R6/lib -lX11 >&5
configure:3079: $? = 0
configure:3082: test -s conftest
configure:3085: $? = 0
configure:3223: checking for gethostbyname
configure:3266: gcc -o conftest -g -O2 conftest.c >&5
configure:3269: $? = 0
configure:3272: test -s conftest
configure:3275: $? = 0
configure:3285: result: yes
configure:3418: checking for connect
configure:3461: gcc -o conftest -g -O2 conftest.c >&5
configure:3464: $? = 0
configure:3467: test -s conftest
configure:3470: $? = 0
configure:3480: result: yes
configure:3546: checking for remove
configure:3589: gcc -o conftest -g -O2 conftest.c >&5
configure:3592: $? = 0
configure:3595: test -s conftest
configure:3598: $? = 0
configure:3608: result: yes
configure:3674: checking for shmat
configure:3717: gcc -o conftest -g -O2 conftest.c >&5
configure:3720: $? = 0
configure:3723: test -s conftest
configure:3726: $? = 0
configure:3736: result: yes
configure:3811: checking for IceConnectionNumber in -lICE
configure:3844: gcc -o conftest -g -O2 -L/usr/X11R6/lib conftest.c -lICE >&5
configure:3847: $? = 0
configure:3850: test -s conftest
configure:3853: $? = 0
configure:3864: result: yes
configure:3888: checking for XShapeCombineMask in -lXext
configure:3921: gcc -o conftest -g -O2 conftest.c -lXext -L/usr/X11R6/lib -lX11 >&5
configure:3924: $? = 0
configure:3927: test -s conftest
configure:3930: $? = 0
configure:3941: result: yes
configure:3951: checking for XpmCreatePixmapFromData in -lXpm
configure:3984: gcc -o conftest -g -O2 conftest.c -lXpm -L/usr/X11R6/lib -lX11 >&5
configure:3987: $? = 0
configure:3990: test -s conftest
configure:3993: $? = 0
configure:4004: result: yes
configure:4105: checking for ANSI C header files
configure:4119: gcc -E conftest.c
configure:4125: $? = 0
configure:4210: gcc -o conftest -g -O2 conftest.c >&5
configure:4213: $? = 0
configure:4215: ./conftest
configure:4218: $? = 0
configure:4232: result: yes
configure:4256: checking for sys/types.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for sys/stat.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for stdlib.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for string.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for memory.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for strings.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for inttypes.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for stdint.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4256: checking for unistd.h
configure:4269: gcc -c -g -O2 conftest.c >&5
configure:4272: $? = 0
configure:4275: test -s conftest.o
configure:4278: $? = 0
configure:4288: result: yes
configure:4322: checking fcntl.h usability
configure:4331: gcc -c -g -O2 conftest.c >&5
configure:4334: $? = 0
configure:4337: test -s conftest.o
configure:4340: $? = 0
configure:4349: result: yes
configure:4353: checking fcntl.h presence
configure:4360: gcc -E conftest.c
configure:4366: $? = 0
configure:4384: result: yes
configure:4402: checking for fcntl.h
configure:4409: result: yes
configure:4313: checking for memory.h
configure:4318: result: yes
configure:4322: checking stddef.h usability
configure:4331: gcc -c -g -O2 conftest.c >&5
configure:4334: $? = 0
configure:4337: test -s conftest.o
configure:4340: $? = 0
configure:4349: result: yes
configure:4353: checking stddef.h presence
configure:4360: gcc -E conftest.c
configure:4366: $? = 0
configure:4384: result: yes
configure:4402: checking for stddef.h
configure:4409: result: yes
configure:4313: checking for stdlib.h
configure:4318: result: yes
configure:4313: checking for string.h
configure:4318: result: yes
configure:4313: checking for strings.h
configure:4318: result: yes
configure:4322: checking sys/param.h usability
configure:4331: gcc -c -g -O2 conftest.c >&5
configure:4334: $? = 0
configure:4337: test -s conftest.o
configure:4340: $? = 0
configure:4349: result: yes
configure:4353: checking sys/param.h presence
configure:4360: gcc -E conftest.c
configure:4366: $? = 0
configure:4384: result: yes
configure:4402: checking for sys/param.h
configure:4409: result: yes
configure:4322: checking sys/time.h usability
configure:4331: gcc -c -g -O2 conftest.c >&5
configure:4334: $? = 0
configure:4337: test -s conftest.o
configure:4340: $? = 0
configure:4349: result: yes
configure:4353: checking sys/time.h presence
configure:4360: gcc -E conftest.c
configure:4366: $? = 0
configure:4384: result: yes
configure:4402: checking for sys/time.h
configure:4409: result: yes
configure:4313: checking for unistd.h
configure:4318: result: yes
configure:4423: checking for gcc option to accept ANSI C
configure:4486: gcc -c -g -O2 conftest.c >&5
configure:4489: $? = 0
configure:4492: test -s conftest.o
configure:4495: $? = 0
configure:4512: result: none needed
configure:4520: checking for an ANSI C-conforming const
configure:4590: gcc -c -g -O2 conftest.c >&5
configure:4593: $? = 0
configure:4596: test -s conftest.o
configure:4599: $? = 0
configure:4609: result: yes
configure:4619: checking for size_t
configure:4646: gcc -c -g -O2 conftest.c >&5
configure:4649: $? = 0
configure:4652: test -s conftest.o
configure:4655: $? = 0
configure:4665: result: yes
configure:4677: checking whether time.h and sys/time.h may both be included
configure:4705: gcc -c -g -O2 conftest.c >&5
configure:4708: $? = 0
configure:4711: test -s conftest.o
configure:4714: $? = 0
configure:4724: result: yes
configure:4740: checking for stdlib.h
configure:4745: result: yes
configure:4849: checking for working malloc
configure:4881: gcc -o conftest -g -O2 conftest.c >&5
configure:4884: $? = 0
configure:4886: ./conftest
configure:4889: $? = 0
configure:4902: result: yes
configure:4918: checking for select
configure:4961: gcc -o conftest -g -O2 conftest.c >&5
configure:4964: $? = 0
configure:4967: test -s conftest
configure:4970: $? = 0
configure:4980: result: yes
configure:4918: checking for strtoul
configure:4961: gcc -o conftest -g -O2 conftest.c >&5
configure:4964: $? = 0
configure:4967: test -s conftest
configure:4970: $? = 0
configure:4980: result: yes
configure:4918: checking for uname
configure:4961: gcc -o conftest -g -O2 conftest.c >&5
configure:4964: $? = 0
configure:4967: test -s conftest
configure:4970: $? = 0
configure:4980: result: yes
configure:5073: creating ./config.status
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by wmapmload config.status 0.3.2, which was
generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_FILES =
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on sleet
config.status:615: creating Makefile
config.status:615: creating src/Makefile
config.status:615: creating doc/Makefile
config.status:719: creating config.h
config.status:858: config.h is unchanged
config.status:953: executing default-1 commands
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_c_const=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_func_connect=yes
ac_cv_func_gethostbyname=yes
ac_cv_func_malloc_works=yes
ac_cv_func_remove=yes
ac_cv_func_select=yes
ac_cv_func_shmat=yes
ac_cv_func_strtoul=yes
ac_cv_func_uname=yes
ac_cv_have_x='have_x=yes ac_x_includes=/usr/X11R6/include ac_x_libraries=/usr/X11R6/lib'
ac_cv_header_fcntl_h=yes
ac_cv_header_inttypes_h=yes
ac_cv_header_memory_h=yes
ac_cv_header_stdc=yes
ac_cv_header_stddef_h=yes
ac_cv_header_stdint_h=yes
ac_cv_header_stdlib_h=yes
ac_cv_header_string_h=yes
ac_cv_header_strings_h=yes
ac_cv_header_sys_param_h=yes
ac_cv_header_sys_stat_h=yes
ac_cv_header_sys_time_h=yes
ac_cv_header_sys_types_h=yes
ac_cv_header_time=yes
ac_cv_header_unistd_h=yes
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_lib_ICE_IceConnectionNumber=yes
ac_cv_lib_Xext_XShapeCombineMask=yes
ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
ac_cv_objext=o
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP='gcc -E'
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-pc-linux-gnu
ac_cv_target_alias=i686-pc-linux-gnu
ac_cv_type_size_t=yes
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE_NAME "wmapmload"
#define PACKAGE_TARNAME "wmapmload"
#define PACKAGE_VERSION "0.3.2"
#define PACKAGE_STRING "wmapmload 0.3.2"
#define PACKAGE_BUGREPORT "tnemeth@free.fr"
#define PACKAGE "wmapmload"
#define VERSION "0.3.2"
#define IGNORE_BUFFERS 1
#define IGNORE_CACHED 1
#define STDC_HEADERS 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STRINGS_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_UNISTD_H 1
#define HAVE_FCNTL_H 1
#define HAVE_MEMORY_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_STRINGS_H 1
#define HAVE_SYS_PARAM_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_UNISTD_H 1
#define TIME_WITH_SYS_TIME 1
#define HAVE_STDLIB_H 1
#define HAVE_MALLOC 1
#define HAVE_SELECT 1
#define HAVE_STRTOUL 1
#define HAVE_UNAME 1
configure: exit 0
## ---------------------- ##
## Running config.status. ##
## ---------------------- ##
This file was extended by wmapmload config.status 0.3.2, which was
generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_FILES = src/Makefile
CONFIG_HEADERS =
CONFIG_LINKS =
CONFIG_COMMANDS =
$ ./config.status
on sleet
config.status:615: creating src/Makefile
config.status:953: executing default-1 commands

960
wmthrottle/config.status Executable file
View file

@ -0,0 +1,960 @@
#! /bin/sh
# Generated by configure.
# Run this file to recreate the current configuration.
# Compiler output produced by configure, useful for debugging
# configure, is in config.log if it exists.
debug=false
SHELL=${CONFIG_SHELL-/bin/sh}
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
# NLS nuisances.
# Support unset when possible.
if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
{ $as_unset LANG || test "${LANG+set}" != set; } ||
{ LANG=C; export LANG; }
(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
{ $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
{ LC_ALL=C; export LC_ALL; }
(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
{ $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
{ LC_TIME=C; export LC_TIME; }
(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
{ $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
{ LC_CTYPE=C; export LC_CTYPE; }
(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
{ $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
{ LANGUAGE=C; export LANGUAGE; }
(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
{ $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
{ LC_COLLATE=C; export LC_COLLATE; }
(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
{ $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
{ LC_NUMERIC=C; export LC_NUMERIC; }
(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
{ $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
{ LC_MESSAGES=C; export LC_MESSAGES; }
# Name of the executable.
as_me=`(basename "$0") 2>/dev/null ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conftest.sh
echo "exit 0" >>conftest.sh
chmod +x conftest.sh
if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conftest.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
exec 6>&1
# Open the log real soon, to keep \$[0] and so on meaningful, and to
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. Logging --version etc. is OK.
exec 5>>config.log
{
echo
sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
## Running $as_me. ##
_ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by wmapmload $as_me 0.3.2, which was
generated by GNU Autoconf 2.53. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
CONFIG_LINKS = $CONFIG_LINKS
CONFIG_COMMANDS = $CONFIG_COMMANDS
$ $0 $@
_CSEOF
echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
echo >&5
config_files=" Makefile src/Makefile doc/Makefile"
config_headers=" config.h"
config_commands=" default-1"
ac_cs_usage="\
\`$as_me' instantiates files from templates according to the
current configuration.
Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
-d, --debug don't remove temporary files
--recheck update $as_me by reconfiguring in the same conditions
--file=FILE[:TEMPLATE]
instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
instantiate the configuration header FILE
Configuration files:
$config_files
Configuration headers:
$config_headers
Configuration commands:
$config_commands
Report bugs to <bug-autoconf@gnu.org>."
ac_cs_version="\
wmapmload config.status 0.3.2
configured by ./configure, generated by GNU Autoconf 2.53,
with options \"\"
Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=.
INSTALL="/usr/bin/install -c"
# If no file are specified by the user, then we need to provide default
# value. By we need to know if files were specified by the user.
ac_need_defaults=:
while test $# != 0
do
case $1 in
--*=*)
ac_option=`expr "x$1" : 'x\([^=]*\)='`
ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
shift
set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
shift
;;
-*);;
*) # This is not an option, so the user has probably given explicit
# arguments.
ac_need_defaults=false;;
esac
case $1 in
# Handling of the options.
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo "running /bin/sh ./configure " " --no-create --no-recursion"
exec /bin/sh ./configure --no-create --no-recursion ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
# Conflict between --help and --header
{ { echo "$as_me:$LINENO: error: ambiguous option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: ambiguous option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; };;
--help | --hel | -h )
echo "$ac_cs_usage"; exit 0 ;;
--debug | --d* | -d )
debug=: ;;
--file | --fil | --fi | --f )
shift
CONFIG_FILES="$CONFIG_FILES $1"
ac_need_defaults=false;;
--header | --heade | --head | --hea )
shift
CONFIG_HEADERS="$CONFIG_HEADERS $1"
ac_need_defaults=false;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
Try \`$0 --help' for more information." >&5
echo "$as_me: error: unrecognized option: $1
Try \`$0 --help' for more information." >&2;}
{ (exit 1); exit 1; }; } ;;
*) ac_config_targets="$ac_config_targets $1" ;;
esac
shift
done
#
# INIT-COMMANDS section.
#
for ac_config_target in $ac_config_targets
do
case "$ac_config_target" in
# Handling of arguments.
"Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
"doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
"default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
"config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
{ (exit 1); exit 1; }; };;
esac
done
# If the user did not use the arguments to specify the items to instantiate,
# then the envvar interface is used. Set only those that are not.
# We use the long form for the default assignment because of an extremely
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
fi
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
: ${TMPDIR=/tmp}
{
tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=$TMPDIR/cs$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
echo "$me: cannot create a temporary directory in $TMPDIR" >&2
{ (exit 1); exit 1; }
}
#
# CONFIG_FILES section.
#
# No need to generate the scripts if there are no CONFIG_FILES.
# This happens for instance when ./config.status config.h
if test -n "$CONFIG_FILES"; then
# Protect against being on the right side of a sed subst in config.status.
sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
s,@SHELL@,/bin/sh,;t t
s,@PATH_SEPARATOR@,:,;t t
s,@PACKAGE_NAME@,wmapmload,;t t
s,@PACKAGE_TARNAME@,wmapmload,;t t
s,@PACKAGE_VERSION@,0.3.2,;t t
s,@PACKAGE_STRING@,wmapmload 0.3.2,;t t
s,@PACKAGE_BUGREPORT@,tnemeth@free.fr,;t t
s,@exec_prefix@,${prefix},;t t
s,@prefix@,/usr/local,;t t
s,@program_transform_name@,s,x,x,,;t t
s,@bindir@,${exec_prefix}/bin,;t t
s,@sbindir@,${exec_prefix}/sbin,;t t
s,@libexecdir@,${exec_prefix}/libexec,;t t
s,@datadir@,${prefix}/share,;t t
s,@sysconfdir@,${prefix}/etc,;t t
s,@sharedstatedir@,${prefix}/com,;t t
s,@localstatedir@,${prefix}/var,;t t
s,@libdir@,${exec_prefix}/lib,;t t
s,@includedir@,${prefix}/include,;t t
s,@oldincludedir@,/usr/include,;t t
s,@infodir@,${prefix}/info,;t t
s,@mandir@,${prefix}/man,;t t
s,@build_alias@,,;t t
s,@host_alias@,,;t t
s,@target_alias@,,;t t
s,@DEFS@,-DHAVE_CONFIG_H,;t t
s,@ECHO_C@,,;t t
s,@ECHO_N@,-n,;t t
s,@ECHO_T@,,;t t
s,@LIBS@,,;t t
s,@build@,i686-pc-linux-gnu,;t t
s,@build_cpu@,i686,;t t
s,@build_vendor@,pc,;t t
s,@build_os@,linux-gnu,;t t
s,@host@,i686-pc-linux-gnu,;t t
s,@host_cpu@,i686,;t t
s,@host_vendor@,pc,;t t
s,@host_os@,linux-gnu,;t t
s,@target@,i686-pc-linux-gnu,;t t
s,@target_cpu@,i686,;t t
s,@target_vendor@,pc,;t t
s,@target_os@,linux-gnu,;t t
s,@INSTALL_PROGRAM@,${INSTALL},;t t
s,@INSTALL_SCRIPT@,${INSTALL},;t t
s,@INSTALL_DATA@,${INSTALL} -m 644,;t t
s,@PACKAGE@,wmapmload,;t t
s,@VERSION@,0.3.2,;t t
s,@ACLOCAL@,aclocal,;t t
s,@AUTOCONF@,autoconf,;t t
s,@AUTOMAKE@,automake,;t t
s,@AUTOHEADER@,autoheader,;t t
s,@MAKEINFO@,makeinfo,;t t
s,@SET_MAKE@,,;t t
s,@AWK@,gawk,;t t
s,@CC@,gcc,;t t
s,@CFLAGS@,-g -O2,;t t
s,@LDFLAGS@,,;t t
s,@CPPFLAGS@,,;t t
s,@ac_ct_CC@,gcc,;t t
s,@EXEEXT@,,;t t
s,@OBJEXT@,o,;t t
s,@LN_S@,ln -s,;t t
s,@CPP@,gcc -E,;t t
s,@X_CFLAGS@, -I/usr/X11R6/include,;t t
s,@X_PRE_LIBS@, -lSM -lICE,;t t
s,@X_LIBS@, -L/usr/X11R6/lib,;t t
s,@X_EXTRA_LIBS@,,;t t
s,@X_LIBRARY_PATH@,/usr/X11R6/lib,;t t
s,@XCFLAGS@, -I/usr/X11R6/include,;t t
s,@XLFLAGS@, -L/usr/X11R6/lib,;t t
s,@XLIBS@,-lX11 -lXext -lXpm,;t t
s,@DFLAGS@,,;t t
s,@OS@,linux,;t t
s,@SETGID_FLAGS@,,;t t
s,@LIBRARY_SEARCH_PATH@, -L/usr/X11R6/lib -L/usr/local/lib,;t t
s,@HEADER_SEARCH_PATH@, -I/usr/X11R6/include -I/usr/local/include,;t t
CEOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_lines=48
ac_sed_frag=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_lines # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
else
sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
fi
if test ! -s $tmp/subs.frag; then
ac_more_lines=false
else
# The purpose of the label and of the branching condition is to
# speed up the sed processing (if there are no `@' at all, there
# is no need to browse any of the substitutions).
# These are the two extra sed commands mentioned above.
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_lines`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
fi # test -n "$CONFIG_FILES"
for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ case "$ac_dir" in
[\\/]* | ?:[\\/]* ) as_incr_dir=;;
*) as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
case $as_mkdir_dir in
# Skip DOS drivespec
?:) as_incr_dir=$as_mkdir_dir ;;
*)
as_incr_dir=$as_incr_dir/$as_mkdir_dir
test -d "$as_incr_dir" ||
mkdir "$as_incr_dir" ||
{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
done; }
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
case $INSTALL in
[\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
*) ac_INSTALL=$ac_top_builddir$INSTALL ;;
esac
if test x"$ac_file" != x-; then
{ echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
rm -f "$ac_file"
fi
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
configure_input=
else
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
*) # Relative
if test -f "$f"; then
# Build tree
echo $f
elif test -f "$srcdir/$f"; then
# Source tree
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
sed "/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
s/^[^=]*=[ ]*$//;
}
:t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
s,@configure_input@,$configure_input,;t t
s,@srcdir@,$ac_srcdir,;t t
s,@abs_srcdir@,$ac_abs_srcdir,;t t
s,@top_srcdir@,$ac_top_srcdir,;t t
s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
s,@builddir@,$ac_builddir,;t t
s,@abs_builddir@,$ac_abs_builddir,;t t
s,@top_builddir@,$ac_top_builddir,;t t
s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
s,@INSTALL@,$ac_INSTALL,;t t
" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
rm -f $tmp/stdin
if test x"$ac_file" != x-; then
mv $tmp/out $ac_file
else
cat $tmp/out
rm -f $tmp/out
fi
done
#
# CONFIG_HEADER section.
#
# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
cat >$tmp/stdin
ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
echo "$as_me: creating $ac_file" >&6;}
# First look for the input files in the build tree, otherwise in the
# src tree.
ac_file_inputs=`IFS=:
for f in $ac_file_in; do
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
# Absolute (can't be DOS-style, as IFS=:)
test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
echo $f;;
*) # Relative
if test -f "$f"; then
# Build tree
echo $f
elif test -f "$srcdir/$f"; then
# Source tree
echo $srcdir/$f
else
# /dev/null tree
{ { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
# Handle all the #define templates only if necessary.
if egrep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then
# If there are no defines, we may have an empty if/fi
:
cat >$tmp/defines.sed <<CEOF
/^[ ]*#[ ]*define/!b
t clr
: clr
${ac_dA}PACKAGE_NAME${ac_dB}PACKAGE_NAME${ac_dC}"wmapmload"${ac_dD}
${ac_dA}PACKAGE_TARNAME${ac_dB}PACKAGE_TARNAME${ac_dC}"wmapmload"${ac_dD}
${ac_dA}PACKAGE_VERSION${ac_dB}PACKAGE_VERSION${ac_dC}"0.3.2"${ac_dD}
${ac_dA}PACKAGE_STRING${ac_dB}PACKAGE_STRING${ac_dC}"wmapmload 0.3.2"${ac_dD}
${ac_dA}PACKAGE_BUGREPORT${ac_dB}PACKAGE_BUGREPORT${ac_dC}"tnemeth@free.fr"${ac_dD}
${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"wmapmload"${ac_dD}
${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"0.3.2"${ac_dD}
${ac_dA}IGNORE_BUFFERS${ac_dB}IGNORE_BUFFERS${ac_dC}1${ac_dD}
${ac_dA}IGNORE_CACHED${ac_dB}IGNORE_CACHED${ac_dC}1${ac_dD}
${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD}
${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_SYS_STAT_H${ac_dB}HAVE_SYS_STAT_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_INTTYPES_H${ac_dB}HAVE_INTTYPES_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDINT_H${ac_dB}HAVE_STDINT_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MEMORY_H${ac_dB}HAVE_MEMORY_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDDEF_H${ac_dB}HAVE_STDDEF_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRING_H${ac_dB}HAVE_STRING_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRINGS_H${ac_dB}HAVE_STRINGS_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_SYS_PARAM_H${ac_dB}HAVE_SYS_PARAM_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_SYS_TIME_H${ac_dB}HAVE_SYS_TIME_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD}
${ac_dA}TIME_WITH_SYS_TIME${ac_dB}TIME_WITH_SYS_TIME${ac_dC}1${ac_dD}
${ac_dA}HAVE_STDLIB_H${ac_dB}HAVE_STDLIB_H${ac_dC}1${ac_dD}
${ac_dA}HAVE_MALLOC${ac_dB}HAVE_MALLOC${ac_dC}1${ac_dD}
${ac_dA}HAVE_SELECT${ac_dB}HAVE_SELECT${ac_dC}1${ac_dD}
${ac_dA}HAVE_STRTOUL${ac_dB}HAVE_STRTOUL${ac_dC}1${ac_dD}
${ac_dA}HAVE_UNAME${ac_dB}HAVE_UNAME${ac_dC}1${ac_dD}
CEOF
sed -f $tmp/defines.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
fi # egrep
# Handle all the #undef templates
cat >$tmp/undefs.sed <<CEOF
/^[ ]*#[ ]*undef/!b
t clr
: clr
${ac_uA}PACKAGE_NAME${ac_uB}PACKAGE_NAME${ac_uC}"wmapmload"${ac_uD}
${ac_uA}PACKAGE_TARNAME${ac_uB}PACKAGE_TARNAME${ac_uC}"wmapmload"${ac_uD}
${ac_uA}PACKAGE_VERSION${ac_uB}PACKAGE_VERSION${ac_uC}"0.3.2"${ac_uD}
${ac_uA}PACKAGE_STRING${ac_uB}PACKAGE_STRING${ac_uC}"wmapmload 0.3.2"${ac_uD}
${ac_uA}PACKAGE_BUGREPORT${ac_uB}PACKAGE_BUGREPORT${ac_uC}"tnemeth@free.fr"${ac_uD}
${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"wmapmload"${ac_uD}
${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"0.3.2"${ac_uD}
${ac_uA}IGNORE_BUFFERS${ac_uB}IGNORE_BUFFERS${ac_uC}1${ac_uD}
${ac_uA}IGNORE_CACHED${ac_uB}IGNORE_CACHED${ac_uC}1${ac_uD}
${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD}
${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_SYS_STAT_H${ac_uB}HAVE_SYS_STAT_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_INTTYPES_H${ac_uB}HAVE_INTTYPES_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDINT_H${ac_uB}HAVE_STDINT_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MEMORY_H${ac_uB}HAVE_MEMORY_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDDEF_H${ac_uB}HAVE_STDDEF_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRING_H${ac_uB}HAVE_STRING_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRINGS_H${ac_uB}HAVE_STRINGS_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_SYS_PARAM_H${ac_uB}HAVE_SYS_PARAM_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_SYS_TIME_H${ac_uB}HAVE_SYS_TIME_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD}
${ac_uA}TIME_WITH_SYS_TIME${ac_uB}TIME_WITH_SYS_TIME${ac_uC}1${ac_uD}
${ac_uA}HAVE_STDLIB_H${ac_uB}HAVE_STDLIB_H${ac_uC}1${ac_uD}
${ac_uA}HAVE_MALLOC${ac_uB}HAVE_MALLOC${ac_uC}1${ac_uD}
${ac_uA}HAVE_SELECT${ac_uB}HAVE_SELECT${ac_uC}1${ac_uD}
${ac_uA}HAVE_STRTOUL${ac_uB}HAVE_STRTOUL${ac_uC}1${ac_uD}
${ac_uA}HAVE_UNAME${ac_uB}HAVE_UNAME${ac_uC}1${ac_uD}
s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
CEOF
sed -f $tmp/undefs.sed $tmp/in >$tmp/out
rm -f $tmp/in
mv $tmp/out $tmp/in
# Let's still pretend it is `configure' which instantiates (i.e., don't
# use $as_me), people would be surprised to read:
# /* config.h. Generated by config.status. */
if test x"$ac_file" = x-; then
echo "/* Generated by configure. */" >$tmp/config.h
else
echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
fi
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_file" : 'X\(//\)[^/]' \| \
X"$ac_file" : 'X\(//\)$' \| \
X"$ac_file" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ case "$ac_dir" in
[\\/]* | ?:[\\/]* ) as_incr_dir=;;
*) as_incr_dir=.;;
esac
as_dummy="$ac_dir"
for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
case $as_mkdir_dir in
# Skip DOS drivespec
?:) as_incr_dir=$as_mkdir_dir ;;
*)
as_incr_dir=$as_incr_dir/$as_mkdir_dir
test -d "$as_incr_dir" ||
mkdir "$as_incr_dir" ||
{ { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
done; }
rm -f $ac_file
mv $tmp/config.h $ac_file
fi
else
cat $tmp/config.h
rm -f $tmp/config.h
fi
done
#
# CONFIG_COMMANDS section.
#
for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$ac_dest" : 'X\(//\)[^/]' \| \
X"$ac_dest" : 'X\(//\)$' \| \
X"$ac_dest" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$ac_dest" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
# absolute.
ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
{ echo "$as_me:$LINENO: executing $ac_dest commands" >&5
echo "$as_me: executing $ac_dest commands" >&6;}
case $ac_dest in
default-1 ) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;;
esac
done
{ (exit 0); exit 0; }

1443
wmthrottle/config.sub vendored Executable file

File diff suppressed because it is too large Load diff

6112
wmthrottle/configure vendored Executable file

File diff suppressed because it is too large Load diff

163
wmthrottle/configure.ac Normal file
View file

@ -0,0 +1,163 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
dnl AC_INIT(src/dockapp.c)
dnl AM_INIT_AUTOMAKE(wmapmload, 0.3.2)
AC_INIT(wmapmload, 0.3.2, tnemeth@free.fr)
AC_CANONICAL_HOST
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
AC_CONFIG_SRCDIR(src/dockapp.c)
AM_CONFIG_HEADER(config.h)
dnl Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
dnl
dnl Specify paths to look for libraries and headers
dnl ===============================================
AC_ARG_WITH(libs-from,
[ --with-libs-from pass compiler flags to look for libraries],
[lib_search_path="$withval $lib_search_path"])
AC_ARG_WITH(incs-from,
[ --with-incs-from pass compiler flags to look for header files],
[inc_search_path="$withval $inc_search_path"])
dnl ===========================================
dnl Stuff that uses X
dnl ===========================================
AC_PATH_XTRA
X_LIBRARY_PATH=$x_libraries
XCFLAGS="$X_CFLAGS"
XLFLAGS="$X_LIBS"
XLIBS="-lX11 $X_EXTRA_LIBS"
lib_search_path="$lib_search_path $XLFLAGS -L/usr/local/lib"
inc_search_path="$inc_search_path $XCFLAGS -I/usr/local/include"
AC_SUBST(X_LIBRARY_PATH)
dnl Shape extension
dnl ===============
AC_CHECK_LIB(Xext, XShapeCombineMask, [XLIBS="$XLIBS -lXext"],
[echo "The shape extension stuff could not be found in the X client libraries"
exit 1],
$X_LIBS $X_EXTRA_LIBS -lX11)
dnl XPM library
dnl ===========
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData, [XLIBS="$XLIBS -lXpm"],
[echo "The libXpm library was not found, but is necessary to build this library"
exit 1],
$X_LIBS $X_EXTRA_LIBS -lX11)
AC_SUBST(XCFLAGS)
AC_SUBST(XLFLAGS)
AC_SUBST(XLIBS)
AC_SUBST(X_EXTRA_LIBS)
dnl ===============================================
dnl End of stuff that uses X
dnl ===============================================
dnl =========
dnl Debugging
dnl =========
AC_ARG_ENABLE(debug,
[ --enable-debug turn on debugging [default=on]],,enable_debug=no)
if test "$enable_debug" = yes; then
DFLAGS="-Wall -g -ansi -pedantic"
AC_DEFINE(DEBUG, 1, [use debug code])
fi
AC_SUBST(DFLAGS)
dnl ============
dnl Check for OS
dnl ============
ignore_buffers=no
ignore_cached=no
ignore_wired=no
case ${host_os} in
linux*)
OS=linux
ignore_buffers=yes
ignore_cached=yes
;;
freebsd*)
OS=freebsd
ignore_wired=yes
ignore_cached=yes
LIBS="$LIBS -lkvm"
SETGID_FLAGS="-g kmem -m 2755 -o root"
;;
openbsd*)
OS=openbsd
;;
solaris*)
OS=solaris
;;
*)
echo ""
echo "Sorry, ${host_os} is not supported yet"
echo ""
exit 1
;;
esac
AC_SUBST(OS)
AC_SUBST(SETGID_FLAGS)
AC_SUBST(LIBS)
if test "$ignore_buffers" = yes; then
AC_DEFINE(IGNORE_BUFFERS, 1, [use '--ignore-buffers' option])
fi
if test "$ignore_cached" = yes; then
AC_DEFINE(IGNORE_CACHED, 1, [use '--ignore-cached' option])
fi
if test "$ignore_wired" = yes; then
AC_DEFINE(IGNORE_WIRED, 1, [use '--ignore-wired' option])
fi
dnl =============================
dnl Checks for library functions.
dnl =============================
LIBRARY_SEARCH_PATH="$lib_search_path"
HEADER_SEARCH_PATH="$inc_search_path"
AC_SUBST(LIBRARY_SEARCH_PATH)
AC_SUBST(HEADER_SEARCH_PATH)
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h unistd.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
dnl Checks for library functions.
AC_FUNC_MALLOC
AC_CHECK_FUNCS(select strtoul uname)
AC_CONFIG_FILES(Makefile \
src/Makefile \
doc/Makefile)
AC_OUTPUT

464
wmthrottle/depcomp Executable file
View file

@ -0,0 +1,464 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 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.
# 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>.
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
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
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. 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.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# 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)
# Must come before tru64.
# Intel's C compiler understands `-MD -MF file'. However
# icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
# 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:
"$@" -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'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^[^:]*: \(.*\)$,\1:," < "$tmpdepfile" >> "$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
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab 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 proprocessed 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 proprocessed 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 '/^# [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 proprocessed 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

228
wmthrottle/doc/Makefile Normal file
View file

@ -0,0 +1,228 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 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.
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/wmapmload
pkglibdir = $(libdir)/wmapmload
pkgincludedir = $(includedir)/wmapmload
top_builddir = ..
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias =
host_triplet = i686-pc-linux-gnu
AWK = gawk
CC = gcc
DFLAGS =
HEADER_SEARCH_PATH = -I/usr/X11R6/include -I/usr/local/include
LIBRARY_SEARCH_PATH = -L/usr/X11R6/lib -L/usr/local/lib
LIBS =
LN_S = ln -s
MAKEINFO = makeinfo
OS = linux
PACKAGE = wmapmload
SETGID_FLAGS =
VERSION = 0.3.2
XCFLAGS = -I/usr/X11R6/include
XLFLAGS = -L/usr/X11R6/lib
XLIBS = -lX11 -lXext -lXpm
X_EXTRA_LIBS =
X_LIBRARY_PATH = /usr/X11R6/lib
man_MANS = wmapmload.1
EXTRA_DIST = $(man_MANS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
man1dir = $(mandir)/man1
MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-man1:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS)'; \
l2='$(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/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@list='$(man1_MANS)'; \
l2='$(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/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-man1
uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-man
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-man
uninstall: uninstall-am
all-am: Makefile $(MANS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \
distdir info-am info dvi-am dvi check check-am installcheck-am \
installcheck install-exec-am install-exec install-data-am install-data \
install-am install uninstall-am uninstall all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# 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:

View file

@ -0,0 +1,4 @@
man_MANS = wmthrottle.1
EXTRA_DIST = $(man_MANS)

228
wmthrottle/doc/Makefile.in Normal file
View file

@ -0,0 +1,228 @@
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AWK = @AWK@
CC = @CC@
DFLAGS = @DFLAGS@
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
LIBS = @LIBS@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
OS = @OS@
PACKAGE = @PACKAGE@
SETGID_FLAGS = @SETGID_FLAGS@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
XLFLAGS = @XLFLAGS@
XLIBS = @XLIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBRARY_PATH = @X_LIBRARY_PATH@
man_MANS = wmapmload.1
EXTRA_DIST = $(man_MANS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
man1dir = $(mandir)/man1
MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
install-man1:
$(mkinstalldirs) $(DESTDIR)$(man1dir)
@list='$(man1_MANS)'; \
l2='$(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/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
$(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
done
uninstall-man1:
@list='$(man1_MANS)'; \
l2='$(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/^.*\\.//'`; \
inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
inst=`echo $$inst | sed '$(transform)'`.$$ext; \
echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
rm -f $(DESTDIR)$(man1dir)/$$inst; \
done
install-man: $(MANS)
@$(NORMAL_INSTALL)
$(MAKE) $(AM_MAKEFLAGS) install-man1
uninstall-man:
@$(NORMAL_UNINSTALL)
$(MAKE) $(AM_MAKEFLAGS) uninstall-man1
tags: TAGS
TAGS:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = doc
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am:
install-exec: install-exec-am
install-data-am: install-man
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-man
uninstall: uninstall-am
all-am: Makefile $(MANS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(mandir)/man1
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-generic mostlyclean-am
clean: clean-am
distclean-am: distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: install-man1 uninstall-man1 install-man uninstall-man tags \
distdir info-am info dvi-am dvi check check-am installcheck-am \
installcheck install-exec-am install-exec install-data-am install-data \
install-am install uninstall-am uninstall all-redirect all-am all \
installdirs mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
# 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:

View file

@ -0,0 +1,84 @@
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH WMTHROTTLE 1 "November 7, 2003"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
wmthrottle \- A dockapp to change throttle/performance state of cpu via ACPI
.SH SYNOPSIS
.B wmthrottle [options]
.SH DESCRIPTION
This manual page documents briefly the
.B wmthrottle
command.
.PP
.\" TeX users may be more comfortable with the \fB<whatever>\fP and
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fBwmthrottle\fP is a program to throttle cpu via ACPI. It is a dockapp that is supported by X window managers such as Window Maker, AfterStep, BlackBox, and
Enlightenment.
The top half of the app shows the 8 levels of throttling that can be selected
(0 = 100% CPU use). The bottom shows the current percentage of CPU allowed to be
used as well as a green,yellow,red indicator and graph indicator to further
indicate how much of the cpu is throttled.
.SH OPTIONS
This program follows the usual GNU command line syntax, with long options
starting with two dashes (`\-'). A summary of options is included below.
.TP
.B \-d, \-\-display <string>
Attempt to open a window on the named X display. In the absence of this option,
the display specified by the
.B DISPLAY
environment variable is used.
.TP
.B \-bl, \-\-backlight
turn on back-light
.TP
.B \-lc, \-\-light\-color <color>
back-light color (rgb:6E/C6/3B is default)
.TP
.B \-i, \-\-interval <number>
number of secs between updates (1 is default)
.TP
.B \-h, \-\-help
show help text and exit
.TP
.B \-v, \-\-version
show program version and exit
.TP
.B \-w, \-\-windowed
run the application in windowed mode
.TP
.B \-bw, \-\-broken\-wm
activate broken window manager fix (use this if you have problems running it in your window manager)
.TP
.B \-p, \-\-performance
use acpi performance instead of throttling
.TP
.B \-t, \-\-temperature
temperature threshold to start downclocking (to avoid fan noise)
.TP
.B \-e
temperature difference that will cause a state transition (default: 1)\n
.TP
.SH AUTHOR
wmthrottle was assembled by Anthony Peacock <bratag44@hotmail.com>
It is largely based on WMMemMon and WMCPULoad by Seiichi SATO <ssato@sh.rim.or.jp>, WMMemLoad by Mark Staggs <me@markstaggs.net> and wmapm by Chris D. Faulhaber
<jedgar@speck.ml.org> Michael G. Henderson <mghenderson@lanl.gov>, and wmapmload by Thomas Nemeth <tnemeth@free.fr>

251
wmthrottle/install-sh Executable file
View file

@ -0,0 +1,251 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd="$cpprog"
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd="$stripprog"
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "install: no input file specified"
exit 1
else
true
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d $dst ]; then
instcmd=:
chmodcmd=""
else
instcmd=mkdir
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f $src -o -d $src ]
then
true
else
echo "install: $src does not exist"
exit 1
fi
if [ x"$dst" = x ]
then
echo "install: no destination specified"
exit 1
else
true
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d $dst ]
then
dst="$dst"/`basename $src`
else
true
fi
fi
## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-${defaultIFS}}"
oIFS="${IFS}"
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS="${oIFS}"
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp="${pathcomp}${1}"
shift
if [ ! -d "${pathcomp}" ] ;
then
$mkdirprog "${pathcomp}"
else
true
fi
pathcomp="${pathcomp}/"
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd $dst &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename $dst`
else
dstfile=`basename $dst $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename $dst`
else
true
fi
# Make a temp file name in the proper directory.
dsttmp=$dstdir/#inst.$$#
# Move or copy the file name to the temp name
$doit $instcmd $src $dsttmp &&
trap "rm -f ${dsttmp}" 0 &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
# Now rename the file to the real destination.
$doit $rmcmd -f $dstdir/$dstfile &&
$doit $mvcmd $dsttmp $dstdir/$dstfile
fi &&
exit 0

190
wmthrottle/missing Executable file
View file

@ -0,0 +1,190 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
# Franc,ois 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., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
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
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing - GNU libit 0.0"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`configure.in'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`configure.in'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. 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.in`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

40
wmthrottle/mkinstalldirs Executable file
View file

@ -0,0 +1,40 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
# $Id: mkinstalldirs,v 1.13 1999/01/05 03:18:55 bje Exp $
errstatus=0
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# mkinstalldirs ends here

BIN
wmthrottle/src/.foo.swp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

296
wmthrottle/src/Makefile Normal file
View file

@ -0,0 +1,296 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 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.
SHELL = /bin/sh
srcdir = .
top_srcdir = ..
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${prefix}/share
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${prefix}/info
mandir = ${prefix}/man
includedir = ${prefix}/include
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/wmapmload
pkglibdir = $(libdir)/wmapmload
pkgincludedir = $(includedir)/wmapmload
top_builddir = ..
ACLOCAL = aclocal
AUTOCONF = autoconf
AUTOMAKE = automake
AUTOHEADER = autoheader
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL}
transform = s,x,x,
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias =
host_triplet = i686-pc-linux-gnu
AWK = gawk
CC = gcc
DFLAGS =
HEADER_SEARCH_PATH = -I/usr/X11R6/include -I/usr/local/include
LIBRARY_SEARCH_PATH = -L/usr/X11R6/lib -L/usr/local/lib
LIBS =
LN_S = ln -s
MAKEINFO = makeinfo
OS = linux
PACKAGE = wmapmload
SETGID_FLAGS =
VERSION = 0.3.2
XCFLAGS = -I/usr/X11R6/include
XLFLAGS = -L/usr/X11R6/lib
XLIBS = -lX11 -lXext -lXpm
X_EXTRA_LIBS =
X_LIBRARY_PATH = /usr/X11R6/lib
bin_PROGRAMS = wmthrottle
wmthrottle_SOURCES = throttle.c dockapp.c dockapp.h backdrop_off.xpm backdrop_on.xpm mouse_regions.c mouse_regions.h parts.xpm
CPPFLAGS =
INCLUDES = -I/usr/X11R6/include -I/usr/local/include
wmthrottle_LDADD = -L/usr/X11R6/lib -L/usr/local/lib -lX11 -lXext -lXpm
INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(bin_PROGRAMS)
DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I..
LDFLAGS =
X_CFLAGS = -I/usr/X11R6/include
X_LIBS = -L/usr/X11R6/lib
X_PRE_LIBS = -lSM -lICE
wmthrottle_OBJECTS = throttle.o dockapp.o mouse_regions.o
wmthrottle_DEPENDENCIES =
wmthrottle_LDFLAGS =
CFLAGS = -g -O2
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
SOURCES = $(wmthrottle_SOURCES)
OBJECTS = $(wmthrottle_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
wmthrottle: $(wmthrottle_OBJECTS) $(wmthrottle_DEPENDENCIES)
@rm -f wmthrottle
$(LINK) $(wmthrottle_LDFLAGS) $(wmthrottle_OBJECTS) $(wmthrottle_LDADD) $(LIBS)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# 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:

View file

@ -0,0 +1,22 @@
bin_PROGRAMS = wmthrottle
wmthrottle_SOURCES = \
throttle.c \
dockapp.c \
dockapp.h \
backdrop_off.xpm \
backdrop_on.xpm \
mouse_regions.c \
mouse_regions.h \
parts.xpm
CPPFLAGS = @CPPFLAGS@ @DFLAGS@
INCLUDES = @HEADER_SEARCH_PATH@
wmthrottle_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@
INSTALL_PROGRAM = \
@INSTALL_PROGRAM@ \
@SETGID_FLAGS@ \
$(AM_INSTALL_PROGRAM_FLAGS)

296
wmthrottle/src/Makefile.in Normal file
View file

@ -0,0 +1,296 @@
# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am
# Copyright (C) 1994, 1995-8, 1999, 2001 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.
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libexecdir = @libexecdir@
datadir = @datadir@
sysconfdir = @sysconfdir@
sharedstatedir = @sharedstatedir@
localstatedir = @localstatedir@
libdir = @libdir@
infodir = @infodir@
mandir = @mandir@
includedir = @includedir@
oldincludedir = /usr/include
DESTDIR =
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
ACLOCAL = @ACLOCAL@
AUTOCONF = @AUTOCONF@
AUTOMAKE = @AUTOMAKE@
AUTOHEADER = @AUTOHEADER@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
transform = @program_transform_name@
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AWK = @AWK@
CC = @CC@
DFLAGS = @DFLAGS@
HEADER_SEARCH_PATH = @HEADER_SEARCH_PATH@
LIBRARY_SEARCH_PATH = @LIBRARY_SEARCH_PATH@
LIBS = @LIBS@
LN_S = @LN_S@
MAKEINFO = @MAKEINFO@
OS = @OS@
PACKAGE = @PACKAGE@
SETGID_FLAGS = @SETGID_FLAGS@
VERSION = @VERSION@
XCFLAGS = @XCFLAGS@
XLFLAGS = @XLFLAGS@
XLIBS = @XLIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_LIBRARY_PATH = @X_LIBRARY_PATH@
bin_PROGRAMS = wmthrottle
wmthrottle_SOURCES = throttle.c dockapp.c dockapp.h backdrop_off.xpm backdrop_on.xpm mouse_regions.c mouse_regions.h parts.xpm
CPPFLAGS = @CPPFLAGS@ @DFLAGS@
INCLUDES = @HEADER_SEARCH_PATH@
wmthrottle_LDADD = @LIBRARY_SEARCH_PATH@ @XLIBS@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ @SETGID_FLAGS@ $(AM_INSTALL_PROGRAM_FLAGS)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
PROGRAMS = $(bin_PROGRAMS)
DEFS = @DEFS@ -I. -I$(srcdir) -I..
LDFLAGS = @LDFLAGS@
X_CFLAGS = @X_CFLAGS@
X_LIBS = @X_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
wmthrottle_OBJECTS = throttle.o dockapp.o mouse_regions.o
wmthrottle_DEPENDENCIES =
wmthrottle_LDFLAGS =
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
DIST_COMMON = Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
TAR = gtar
GZIP_ENV = --best
SOURCES = $(wmthrottle_SOURCES)
OBJECTS = $(wmthrottle_OBJECTS)
all: all-redirect
.SUFFIXES:
.SUFFIXES: .S .c .o .s
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
mostlyclean-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
distclean-binPROGRAMS:
maintainer-clean-binPROGRAMS:
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
list='$(bin_PROGRAMS)'; for p in $$list; do \
rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
done
.c.o:
$(COMPILE) -c $<
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean-compile:
-rm -f *.o core *.core
clean-compile:
distclean-compile:
-rm -f *.tab.c
maintainer-clean-compile:
wmthrottle: $(wmthrottle_OBJECTS) $(wmthrottle_DEPENDENCIES)
@rm -f wmthrottle
$(LINK) $(wmthrottle_LDFLAGS) $(wmthrottle_OBJECTS) $(wmthrottle_LDADD) $(LIBS)
tags: TAGS
ID: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
here=`pwd` && cd $(srcdir) \
&& mkid -f$$here/ID $$unique $(LISP)
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
tags=; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS)'; \
unique=`for i in $$list; do echo $$i; done | \
awk ' { files[$$0] = 1; } \
END { for (i in files) print i; }'`; \
test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
|| (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS)
mostlyclean-tags:
clean-tags:
distclean-tags:
-rm -f TAGS ID
maintainer-clean-tags:
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
subdir = src
distdir: $(DISTFILES)
@for file in $(DISTFILES); do \
d=$(srcdir); \
if test -d $$d/$$file; then \
cp -pr $$d/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|| cp -p $$d/$$file $(distdir)/$$file || :; \
fi; \
done
info-am:
info: info-am
dvi-am:
dvi: dvi-am
check-am: all-am
check: check-am
installcheck-am:
installcheck: installcheck-am
install-exec-am: install-binPROGRAMS
install-exec: install-exec-am
install-data-am:
install-data: install-data-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
install: install-am
uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-am
all-am: Makefile $(PROGRAMS)
all-redirect: all-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs:
$(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES)
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
maintainer-clean-generic:
mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \
mostlyclean-tags mostlyclean-generic
mostlyclean: mostlyclean-am
clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \
mostlyclean-am
clean: clean-am
distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \
distclean-generic clean-am
distclean: distclean-am
maintainer-clean-am: maintainer-clean-binPROGRAMS \
maintainer-clean-compile maintainer-clean-tags \
maintainer-clean-generic distclean-am
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
maintainer-clean: maintainer-clean-am
.PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \
maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \
mostlyclean-compile distclean-compile clean-compile \
maintainer-clean-compile tags mostlyclean-tags distclean-tags \
clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
check-am installcheck-am installcheck install-exec-am install-exec \
install-data-am install-data install-am install uninstall-am uninstall \
all-redirect all-am all installdirs mostlyclean-generic \
distclean-generic clean-generic maintainer-clean-generic clean \
mostlyclean distclean maintainer-clean
# 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:

View file

@ -0,0 +1,87 @@
/* XPM */
static char * backlight_off_xpm[] = {
"58 58 26 1",
" c None",
". c #020202",
"+ c #0A0A0A",
"@ c #090909",
"# c #484C46",
"$ c #474B45",
"% c #DEDEDE",
"& c #010101",
"* c #757B6E",
"= c #000000",
"- c #767C6F",
"; c #DCDCDC",
"> c #8E968A",
", c #6E756B",
"' c #4F534C",
") c #7E857A",
"! c #5E645C",
"~ c #3F433D",
"{ c #2F322E",
"] c #10110F",
"^ c #1F211E",
"/ c #8C9488",
"( c #8D9589",
"_ c #DDDDDD",
": c #3D453D",
"< c #3E463E",
" ...................................................... ",
" .+++@+++++++++++@+++++++++++@+++++++++++@+++++++++++@++. ",
".++##$###########$###########$###########$###########$##.%",
"&@$#*=================================================*-.;",
".+#--=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>,'')>>>>=>>>!~'>>>>>=>>>>'!{)>>>=>>>>''{,>>>=>>.%",
".+#->=>>,=,~]>>>>=>>>)={>>>>>=>>>~^>{]>>>=>>>'^>{]>>>=>>.%",
".+#->=>>~=>!=!>>>=>>>>={>>>>>=>>>),>^=>>>=>>>>,>{]>>>=>>.%",
".+#->=>>{=>!=!>>>=>>>>={>>>>>=>>>>>!=!>>>=>>>>,!^!>>>=>>.%",
".+#->=>>{=>!=!>>>=>>>>={>>>>>=>>>>!{)>>>>=>>>>>>'=,>>=>>.%",
".+#->=>>!=)'=>>>>=>>>>={>>>>>=>>>!]!!'!>>=>>>~~>!=!>>=>>.%",
".+#->=>>>~{{!>>>>=>>>!=^,>>>>=>>>{====>>>=>>>!]'^~>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
"&@$*/=================================================//.;",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>>,{,>>>>=>>>{{{{>>>>=>>>,~~,>>>>=>>>!{{{{)>>=>>.%",
".+#->=>>>>]=!>>>>=>>>]{{~>>>>=>>)=!,]>>>>=>>>~{{{]>>>=>>.%",
".+#->=>>>''=!>>>>=>>>~>>>>>>>=>>~=)!)>>>>=>>>)>>'!>>>=>>.%",
".+#->=>>)~!=!>>>>=>>)'!]~>>>>=>>{=!^])>>>=>>>>>)~>>>>=>>.%",
".+#->=>>^'~=~)>>>=>>>>>!=!>>>=>>{=>!=!>>>=>>>>>],>>>>=>>.%",
".+#->=>>!!~=~)>>>=>>!^>!=,>>>=>>'=>!=,>>>=>>>>'=>>>>>=>>.%",
".+#->=>>>)~=~>>>>=>>)^'^~>>>>=>>>{{^~>>>>=>>>>~]>>>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
".+#->=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>>>>>>>>>>=>>.%",
"&@$*/=================================================/(&_",
".+#->:<<<<<<<<<<<:<<<<<<<<<<<:<<<<<<<<<<<:<<<<<<<<<<<:>>.%",
".+#->:<<<<<<<<<<<:<<<<<<<<<<<:<<<<<<<<<<<:<<<<<<<<<<<:->.%",
".+#->(-----------*-----------*-----------*-----------*->.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(-->-->-->--(-->-->-->--(-->-->-->--(-->-->-->--(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(-->-->-->--(-->-->-->--(-->-->-->--(-->-->-->--(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>>>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(-->-->-->--(-->-->-->-->-->-->-->--(-->-->-->--(>>.%",
".+#->(>>>>>>>>>>>>>>>>>>>>>>>(>>>>>>>>>>>>>>>>>>>>>>>(>>.%",
"&@$*((**>--(**(-->-*(**(**(**(**(**(**(**(**(**(**(**(((&_",
".+#->(>>>>>>>>>>>>>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(-->-->-->-->-->-->-->--(-->-->-->--(-->-->-->--(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(>>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(===========(>>.%",
".+#->(--->>>--->>(--->>>>>>>>(>>>>>>>>>>>(=>>>>>>>>>=(>>.%",
".+#->*>>>->->>>->*>>>->>>>>>>(>>>>>>>>>>>(=>>>>>>>>>=(>>.%",
".+#->*>>>->->>>->*>>>->>>>>>>(>>>>>>>>>>>(=>>=====>>=(>>.%",
".+#->*>>>->->>>->*>>>->...>>>&>>>>>>>>>>>(=>>>>=>>>>=->>.%",
".+#->(--->>>--->>(--->>.>.>>.(>>>>>>>>>>>(=>>>>=>>>>=->>.%",
".+#->*>>>->->>>->*>>>->...>.>(>>>>>>>>>>>(=>>>>=>>>>=->>.%",
"&@$*(*(((*(*(((*(*(((*>>>(&(&&&(((((((((((=((((=((((=-((&_",
".+#->*>>>->->>>->*>>>->>>.>>.(.>>>>>>>>>>(=>>>>=>>>>=->>.%",
".+#->(--->>>--->>(--->>>.>>>.&.>>>>>>>>>>(=>>>>>>>>>=->>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(===========->>.%",
".+#->(>>>>>>>>>>>(>>>>>>>>>>>(>>>>>>>>>>>(><<<<<<<<<<->..%",
" ....&...........&...........&...........&...........&..% ",
" %%%_%%%%%%%%%%%_%%%%%%%%%%%_%%%%%%%%%%%_%%%%%%%%%%%_%% "};

View file

@ -0,0 +1,76 @@
/* XPM */
static char * backlight_on_xpm[] = {
"58 58 15 1",
" c None",
". c #020202",
"+ c #6EC63B",
"@ c #DEDEDE",
"# c #000000",
"$ c #559A2E",
"% c #3D6E20",
"& c #61B034",
"* c #498427",
"= c #31581A",
"- c #244213",
"; c #0C1606",
"> c #182C0D",
", c #3E463E",
"' c #6CB237",
" ...................................................... ",
" .++++++++++++++++++++++++++++++++++++++++++++++++++++++. ",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".++++#################################################+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#+++$%%&++++#+++*=%+++++#++++%*-&+++#++++%%-$+++#+++@",
".++++#++$#$=;++++#+++&#-+++++#+++=>+-;+++#+++%>+-;+++#+++@",
".++++#++=#+*#*+++#++++#-+++++#+++&$+>#+++#++++$+-;+++#+++@",
".++++#++-#+*#*+++#++++#-+++++#+++++*#*+++#++++$*>*+++#+++@",
".++++#++-#+*#*+++#++++#-+++++#++++*-&++++#++++++%#$++#+++@",
".++++#++*#&%#++++#++++#-+++++#+++*;**%*++#+++==+*#*++#+++@",
".++++#+++=--*++++#+++*#>$++++#+++-####+++#+++*;%>=+++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#################################################+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#++++$-$++++#+++----++++#+++$==$++++#+++*----&++#+++@",
".++++#++++;#*++++#+++;--=++++#++&#*$;++++#+++=---;+++#+++@",
".++++#+++%%#*++++#+++=+++++++#++=#&*&++++#+++&++%*+++#+++@",
".++++#++&=*#*++++#++&%*;=++++#++-#*>;&+++#+++++&=++++#+++@",
".++++#++>%=#=&+++#+++++*#*+++#++-#+*#*+++#+++++;$++++#+++@",
".++++#++**=#=&+++#++*>+*#$+++#++%#+*#$+++#++++%#+++++#+++@",
".++++#+++&=#=++++#++&>%>=++++#+++-->=++++#++++=;+++++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#+++++++++++#+++++++++++#+++++++++++#+++++++++++#+++@",
".++++#################################################+++@",
".++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+++@",
".++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'++@",
".+++++'''''''''''''''''''''''''''''''''''''''''''''''''++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++''+''+''+''+''+''+''+''+''+''+''+''+''+''+''+''++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".++++++++++++++++++++++++++++++++++++++++++++++++++++++++@",
".+++++++++++++++++++++++++++++++++++++++++###########++++@",
".+++++'''+++'''+++'''+++++++++++++++++++++#+++++++++#++++@",
".++++'+++'+'+++'+'+++'++++++++++++++++++++#+++++++++#++++@",
".++++'+++'+'+++'+'+++'++++++++++++++++++++#++#####++#++++@",
".++++'+++'+'+++'+'+++'+...+++.++++++++++++#++++#++++#'+++@",
".+++++'''+++'''+++'''++.+.++.+++++++++++++#++++#++++#'+++@",
".++++'+++'+'+++'+'+++'+...+.++++++++++++++#++++#++++#'+++@",
".++++'+++'+'+++'+'+++'++++.+...+++++++++++#++++#++++#'+++@",
".++++'+++'+'+++'+'+++'+++.++.+.+++++++++++#++++#++++#'+++@",
".+++++'''+++'''+++'''+++.+++...+++++++++++#+++++++++#'+++@",
".+++++++++++++++++++++++++++++++++++++++++###########'+++@",
".++++++++++++++++++++++++++++++++++++++++++,,,,,,,,,,'+++@",
" .++++++++++++++++++++++++++++++++++++++++++++++++++++++@ ",
" @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ "};

410
wmthrottle/src/dockapp.c Normal file
View file

@ -0,0 +1,410 @@
/*
* Copyright (c) 1999 Alfredo K. Kojima
* Copyright (c) 2001, 2002 Seiichi SATO <ssato@sh.rim.or.jp>
*
* 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
* AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* This code is based on libdockapp-0.4.0
* modified by Seiichi SATO <ssato@sh.rim.or.jp>
*/
#include "dockapp.h"
#define WINDOWED_SIZE_W 64
#define WINDOWED_SIZE_H 64
/* global */
Display *display = NULL;
Bool dockapp_iswindowed = False;
Bool dockapp_isbrokenwm = False;
/* private */
static Window window = None;
static Window icon_window = None;
static GC gc = NULL;
static int depth = 0;
static Atom delete_win;
static int width, height;
static int offset_w, offset_h;
void
dockapp_open_window(char *display_specified, char *appname,
unsigned w, unsigned h, int argc, char **argv)
{
XClassHint *classhint;
XWMHints *wmhints;
Status stat;
XTextProperty title;
XSizeHints sizehints;
Window root;
int ww, wh;
/* Open Connection to X Server */
display = XOpenDisplay(display_specified);
if (!display) {
fprintf(stderr, "%s: could not open display %s!\n", argv[0],
XDisplayName(display_specified));
exit(1);
}
root = DefaultRootWindow(display);
width = w;
height = h;
if (dockapp_iswindowed) {
offset_w = (WINDOWED_SIZE_W - w) / 2;
offset_h = (WINDOWED_SIZE_H - h) / 2;
ww = WINDOWED_SIZE_W;
wh = WINDOWED_SIZE_H;
} else {
offset_w = offset_h = 0;
ww = w;
wh = h;
}
/* Create Windows */
icon_window = XCreateSimpleWindow(display, root, 0, 0, ww, wh, 0, 0, 0);
if (dockapp_isbrokenwm) {
window = XCreateSimpleWindow(display, root, 0, 0, ww, wh, 0, 0, 0);
} else {
window = XCreateSimpleWindow(display, root, 0, 0, 1, 1, 0, 0, 0);
}
/* Set ClassHint */
classhint = XAllocClassHint();
if (classhint == NULL) {
fprintf(stderr, "%s: can't allocate memory for wm hints!\n", argv[0]);
exit(1);
}
classhint->res_class = "DockApp";
classhint->res_name = appname;
XSetClassHint(display, window, classhint);
XFree(classhint);
/* Set WMHints */
wmhints = XAllocWMHints();
if (wmhints == NULL) {
fprintf(stderr, "%s: can't allocate memory for wm hints!\n", argv[0]);
exit(1);
}
wmhints->flags = IconWindowHint | WindowGroupHint;
if (!dockapp_iswindowed) {
wmhints->flags |= StateHint;
wmhints->initial_state = WithdrawnState;
}
wmhints->window_group = window;
wmhints->icon_window = icon_window;
XSetWMHints(display, window, wmhints);
XFree(wmhints);
/* Set WM Protocols */
delete_win = XInternAtom(display, "WM_DELETE_WINDOW", False);
XSetWMProtocols (display, icon_window, &delete_win, 1);
/* Set Size Hints */
sizehints.flags = USSize;
if (!dockapp_iswindowed) {
sizehints.flags |= USPosition;
sizehints.x = sizehints.y = 0;
} else {
sizehints.flags |= PMinSize | PMaxSize;
sizehints.min_width = sizehints.max_width = WINDOWED_SIZE_W;
sizehints.min_height = sizehints.max_height = WINDOWED_SIZE_H;
}
sizehints.width = ww;
sizehints.height = wh;
XSetWMNormalHints(display, icon_window, &sizehints);
/* Set WindowTitle for AfterStep Wharf */
stat = XStringListToTextProperty(&appname, 1, &title);
XSetWMName(display, window, &title);
XSetWMName(display, icon_window, &title);
/* Set Command to start the app so it can be docked properly */
XSetCommand(display, window, argv, argc);
depth = DefaultDepth(display, DefaultScreen(display));
gc = DefaultGC(display, DefaultScreen(display));
XFlush(display);
}
void
dockapp_set_eventmask(long mask)
{
XSelectInput(display, icon_window, mask);
XSelectInput(display, window, mask);
}
void init_dock(void) {
AddMouseRegion(0, 6, 4, 16, 15);
AddMouseRegion(1, 18, 4, 28, 15);
AddMouseRegion(2, 30, 4, 40, 15);
AddMouseRegion(3, 42, 4, 52, 15);
AddMouseRegion(4, 6, 16, 16, 27);
AddMouseRegion(5, 18, 16, 28, 27);
AddMouseRegion(6, 30, 16, 40, 27);
AddMouseRegion(7, 42, 16, 52, 27);
AddMouseRegion(8, 42, 44, 53, 55);
EnableMouseRegion(0);
EnableMouseRegion(1);
EnableMouseRegion(2);
EnableMouseRegion(3);
EnableMouseRegion(4);
EnableMouseRegion(5);
EnableMouseRegion(6);
EnableMouseRegion(7);
EnableMouseRegion(8);
}
static Pixmap
create_bg_pixmap(void)
{
Pixmap bg;
bg = XCreatePixmap(display, icon_window, WINDOWED_SIZE_W, WINDOWED_SIZE_H,
depth);
XSetForeground(display, gc, dockapp_getcolor("rgb:ae/aa/ae"));
XFillRectangle(display, bg, gc, 0, 0, WINDOWED_SIZE_W, WINDOWED_SIZE_H);
XSetForeground(display, gc, dockapp_getcolor("rgb:ff/ff/ff"));
XDrawLine(display, bg, gc, 0, 0, 0, 63);
XDrawLine(display, bg, gc, 1, 0, 1, 62);
XDrawLine(display, bg, gc, 2, 0, 63, 0);
XDrawLine(display, bg, gc, 2, 1, 62, 1);
XSetForeground(display, gc, dockapp_getcolor("rgb:52/55/52"));
XDrawLine(display, bg, gc, 1, 63, 63, 63);
XDrawLine(display, bg, gc, 2, 62, 63, 62);
XDrawLine(display, bg, gc, 63, 1, 63, 61);
XDrawLine(display, bg, gc, 62, 2, 62, 61);
return bg;
}
void
dockapp_set_background(Pixmap pixmap)
{
if (dockapp_iswindowed) {
Pixmap bg;
bg = create_bg_pixmap();
XCopyArea(display, pixmap, bg, gc, 0, 0, width, height,
offset_w, offset_w);
XSetWindowBackgroundPixmap(display, icon_window, bg);
XSetWindowBackgroundPixmap(display, window, bg);
XFreePixmap(display, bg);
} else {
XSetWindowBackgroundPixmap(display, icon_window, pixmap);
XSetWindowBackgroundPixmap(display, window, pixmap);
}
XClearWindow(display, icon_window);
XFlush(display);
}
void
dockapp_show(void)
{
if (!dockapp_iswindowed)
XMapRaised(display, window);
else
XMapRaised(display, icon_window);
XFlush(display);
}
Bool
dockapp_xpm2pixmap(char **data, Pixmap *pixmap, Pixmap *mask,
XpmColorSymbol * colorSymbol, unsigned int nsymbols)
{
XpmAttributes xpmAttr;
xpmAttr.valuemask = XpmCloseness;
xpmAttr.closeness = 40000;
if (nsymbols) {
xpmAttr.colorsymbols = colorSymbol;
xpmAttr.numsymbols = nsymbols;
xpmAttr.valuemask |= XpmColorSymbols;
}
if (XpmCreatePixmapFromData(display, icon_window, data, pixmap, mask, &xpmAttr) != 0)
return False;
return True;
}
Pixmap
dockapp_XCreatePixmap(int w, int h)
{
return (XCreatePixmap(display, icon_window, w, h, depth));
}
void
dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs)
{
XShapeCombineMask(display, icon_window, ShapeBounding, -x_ofs, -y_ofs,
mask, ShapeSet);
XShapeCombineMask(display, window, ShapeBounding, -x_ofs, -y_ofs,
mask, ShapeSet);
XFlush(display);
}
void
dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src, int w, int h,
int x_dist, int y_dist)
{
XCopyArea(display, src, dist, gc, x_src, y_src, w, h, x_dist, y_dist);
}
void
dockapp_copy2window (Pixmap src)
{
if (dockapp_isbrokenwm) {
XCopyArea(display, src, window, gc, 0, 0, width, height, offset_w,
offset_h);
} else {
XCopyArea(display, src, icon_window, gc, 0, 0, width, height, offset_w,
offset_h);
}
}
Bool dockapp_nextevent_or_timeout(XEvent *event, unsigned long miliseconds)
{
struct timeval timeout;
fd_set rset;
XSync(display, False);
if (XPending(display)) {
XNextEvent(display, event);
return True;
}
timeout.tv_sec = miliseconds / 1000;
timeout.tv_usec = (miliseconds % 1000) * 1000;
FD_ZERO(&rset);
FD_SET(ConnectionNumber(display), &rset);
if (select(ConnectionNumber(display)+1, &rset, NULL, NULL, &timeout) > 0) {
XNextEvent(display, event);
if (event->type == ClientMessage) {
if (event->xclient.data.l[0] == delete_win) {
XDestroyWindow(display,event->xclient.window);
XCloseDisplay(display);
exit(0);
}
}
if (dockapp_iswindowed) {
event->xbutton.x -= offset_w;
event->xbutton.y -= offset_h;
}
return True;
}
return False;
}
unsigned long
dockapp_getcolor(char *color_name)
{
XColor color;
if (!XParseColor(display, DefaultColormap(display, DefaultScreen(display)),
color_name, &color))
fprintf(stderr, "can't parse color %s\n", color_name), exit(1);
if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)),
&color)) {
fprintf(stderr, "can't allocate color %s. Using black\n", color_name);
return BlackPixel(display, DefaultScreen(display));
}
return color.pixel;
}
unsigned long
dockapp_blendedcolor(char *color_name, int r, int g, int b, float fac)
{
XColor color;
if ((r < -255 || r > 255)||(g < -255 || g > 255)||(b < -255 || b > 255)){
fprintf(stderr, "r:%d,g:%d,b:%d (r,g,b must be 0 to 255)", r, g, b);
exit(1);
}
r *= 255;
g *= 255;
b *= 255;
if (!XParseColor(display, DefaultColormap(display, DefaultScreen(display)),
color_name, &color))
fprintf(stderr, "can't parse color %s\n", color_name), exit(1);
if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)),
&color)) {
fprintf(stderr, "can't allocate color %s. Using black\n", color_name);
return BlackPixel(display, DefaultScreen(display));
}
if (DefaultDepth(display, DefaultScreen(display)) < 16)
return color.pixel;
/* red */
if (color.red + r > 0xffff) {
color.red = 0xffff;
} else if (color.red + r < 0) {
color.red = 0;
} else {
color.red = (unsigned short)(fac * color.red + r);
}
/* green */
if (color.green + g > 0xffff) {
color.green = 0xffff;
} else if (color.green + g < 0) {
color.green = 0;
} else {
color.green = (unsigned short)(fac * color.green + g);
}
/* blue */
if (color.blue + b > 0xffff) {
color.blue = 0xffff;
} else if (color.blue + b < 0) {
color.blue = 0;
} else {
color.blue = (unsigned short)(fac * color.blue + b);
}
color.flags = DoRed | DoGreen | DoBlue;
if (!XAllocColor(display, DefaultColormap(display, DefaultScreen(display)),
&color)) {
fprintf(stderr, "can't allocate color %s. Using black\n", color_name);
return BlackPixel(display, DefaultScreen(display));
}
return color.pixel;
}

96
wmthrottle/src/dockapp.h Normal file
View file

@ -0,0 +1,96 @@
/*
* Copyright (c) 1999 Alfredo K. Kojima
* Copyright (c) 2001, 2002 Seiichi SATO <ssato@sh.rim.or.jp>
*
* 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
* AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
* AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* This code is based on libdockapp-0.4.0
* modified by Seiichi SATO <ssato@sh.rim.or.jp>
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <X11/Xlib.h>
#include <X11/xpm.h>
#include <X11/extensions/shape.h>
#include <stdio.h>
#if STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# if HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include <memory.h>
# endif
# include <string.h>
#endif
#if HAVE_STRINGS_H
# include <strings.h>
#endif
#if HAVE_SELECT
# include <sys/select.h>
#endif
#if TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
#else
# if HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#else
/* We are in trouble. */
#endif
extern Display *display;
extern Bool dockapp_iswindowed;
extern Bool dockapp_isbrokenwm;
void dockapp_open_window(char *display_specified, char *appname,
unsigned w, unsigned h, int argc, char **argv);
void dockapp_set_eventmask(long mask);
void dockapp_set_background(Pixmap pixmap);
void dockapp_show(void);
Bool dockapp_xpm2pixmap(char **data, Pixmap * pixmap, Pixmap * mask,
XpmColorSymbol * colorSymbol,
unsigned int nsymbols);
Pixmap dockapp_XCreatePixmap(int w, int h);
void dockapp_setshape(Pixmap mask, int x_ofs, int y_ofs);
void dockapp_copyarea(Pixmap src, Pixmap dist, int x_src, int y_src,
int w, int h, int x_dist, int y_dist);
void dockapp_copy2window(Pixmap src);
Bool dockapp_nextevent_or_timeout(XEvent * event, unsigned long miliseconds);
unsigned long dockapp_getcolor(char *color);
unsigned long dockapp_blendedcolor(char *color, int r, int g, int b, float fac);

View file

@ -0,0 +1,138 @@
#include "../config.h"
#include <stdio.h>
/*
*
* My thanks for this handly little piece of code below - saved me
* a lot of hassle with the buttons
*
* Anthony Peacock
*
Best viewed with vim5, using ts=4
wmgeneral was taken from wmppp.
It has a lot of routines which most of the wm* programs use.
------------------------------------------------------------
Author: Martijn Pieterse (pieterse@xs4all.nl)
---
CHANGES:
---
11/08/2002 (Brad Jorsch, anomie@users.sourceforge.net)
* Moved all the mouse region related stuff to mouse_regions.[ch]
28/08/2001 (Brad Jorsch, anomie@users.sourceforge.net)
* Added EnableMouseRegion and DisableMouseRegion
* Got annoyed with the 81-character lines. Fixed it. If you don't like
it, find a different copy of wmgeneral.c ;)
* GraphicsExpose events are enabled here.
* GetXPM is exported. It optionally takes an XpmColorSymbol array.
* GetColor is exported.
30/09/2000 (Brad Jorsch, anomie@users.sourceforge.net)
* You know, wmgen.mask sounds like a much nicer place to store the
mask... why don't we do that?
21/09/1999 (Brad Jorsch, anomie@users.sourceforge.net)
* Changed openXwindow to use only the filename, sans path,
as the name and class properties of the app.
14/09/1998 (Dave Clark, clarkd@skyia.com)
* Updated createXBMfromXPM routine
* Now supports >256 colors
11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Removed a bug from parse_rcfile. You could
not use "start" in a command if a label was
also start.
* Changed the needed geometry string.
We don't use window size, and don't support
negative positions.
03/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added parse_rcfile2
02/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added -geometry support (untested)
28/08/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Added createXBMfromXPM routine
* Saves a lot of work with changing xpm's.
02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* changed the read_rc_file to parse_rcfile, as suggested by Marcelo E. Magallon
* debugged the parse_rc file.
30/04/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Ripped similar code from all the wm* programs,
and put them in a single file.
*/
#include "mouse_regions.h"
/*****************/
/* Mouse Regions */
/*****************/
typedef struct {
int enable;
int top;
int bottom;
int left;
int right;
} MOUSE_REGION;
MOUSE_REGION mouse_region[MAX_MOUSE_REGION];
/******************************************************************************\
|* AddMouseRegion *|
\******************************************************************************/
void AddMouseRegion(int index, int left, int top, int right, int bottom) {
if (index < MAX_MOUSE_REGION) {
mouse_region[index].enable = 1;
mouse_region[index].top = top;
mouse_region[index].left = left;
mouse_region[index].bottom = bottom;
mouse_region[index].right = right;
}
}
/******************************************************************************\
|* CheckMouseRegion *|
\******************************************************************************/
int CheckMouseRegion(int x, int y) {
int i;
int found;
found = 0;
for (i=0; i<MAX_MOUSE_REGION && !found; i++) {
if (mouse_region[i].enable==1 &&
x <= mouse_region[i].right &&
x >= mouse_region[i].left &&
y <= mouse_region[i].bottom &&
y >= mouse_region[i].top)
found = 1;
}
if (!found) return -1;
return (i-1);
}
/******************************************************************************\
|* EnableMouseRegion *|
\******************************************************************************/
void EnableMouseRegion(int i) {
if(i<MAX_MOUSE_REGION && mouse_region[i].enable==2)
mouse_region[i].enable=1;
}
/******************************************************************************\
|* DisableMouseRegion *|
\******************************************************************************/
void DisableMouseRegion(int i) {
if(i<MAX_MOUSE_REGION && mouse_region[i].enable==1)
mouse_region[i].enable=2;
}

View file

@ -0,0 +1,19 @@
#ifndef MOUSE_REGIONS_H_INCLUDED
#define MOUSE_REGIONS_H_INCLUDED
/***********/
/* Defines */
/***********/
#define MAX_MOUSE_REGION (9)
/***********************/
/* Function Prototypes */
/***********************/
void AddMouseRegion(int index, int left, int top, int right, int bottom);
int CheckMouseRegion(int x, int y);
void EnableMouseRegion(int index);
void DisableMouseRegion(int index);
#endif

121
wmthrottle/src/parts.xpm Normal file
View file

@ -0,0 +1,121 @@
/* XPM */
static char * parts_xpm[] = {
"117 87 31 1",
" c None",
". c #8E968A",
"+ c #020202",
"@ c #767C6F",
"# c #FFFFFF",
"$ c #6EC63B s Back0",
"% c #6CB237 s Back1",
"& c #3E463E",
"* c #B94B46",
"= c #D41D1C",
"- c #D29E1C",
"; c #D8C511",
"> c #498D5A",
", c #1E873D",
"' c #AB5F25",
") c #D21F18",
"! c #D0A116",
"~ c #3BA139",
"{ c #1C8A39",
"] c #D81717",
"^ c #D8CE11",
"/ c #188739",
"( c #000000",
"_ c #383838",
": c #717171",
"< c #1C1C1C",
"[ c #555555",
"} c #8D8D8D",
"| c #AAAAAA",
"1 c #E2E2E2",
"2 c #C6C6C6",
"..++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....++++++....++++++....++++++..++++#############",
"+..++++..+@..@@@@..+@..++++..+@..++++..++..@@@@..++..++++..@+..++++..@@..++++..++..++++..++..++++..+..$$#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..$$#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..$$#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++..$$#############",
"++......++@@......++@@......++@@......++++......++++......@@++......@@@@......++++......++++......++++++#############",
"+..@@@@..+@..@@@@..+@..++++..+@..++++..++..++++..++..++++..@+..++++..@@..@@@@..++..++++..++..++++..+..$$#############",
"..@@@@@@....@@@@@@....++++++....++++++....++++++....++++++....++++++....@@@@@@....++++++....++++++..++++#############",
"+........+@........++........@@........+@........+@........++........+@........++........+@........+..$$#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..$$#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..$$#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++++++#############",
"++......++@@......++++......@@@@......++@@......++@@......++++......++@@......++++......++@@......++..$$#############",
"+..++++..+@..@@@@..++..++++..@@..++++..+@..@@@@..+@..++++..++..++++..+@..@@@@..++..++++..+@..++++..+++++#############",
"..++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....@@@@@@....++++++....++++++....$$#############",
"$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$$$++++++$$$$++++++$$$$++++++$$++++#############",
"+$$++++$$+%$$%%%%$$+%$$++++$$+%$$++++$$++$$%%%%$$++$$++++$$%+$$++++$$%%$$++++$$++$$++++$$++$$++++$$+#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"++$$$$$$++%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++++$$$$$$%%++$$$$$$%%%%$$$$$$++++$$$$$$++++$$$$$$++#################",
"+$$%%%%$$+%$$%%%%$$+%$$++++$$+%$$++++$$++$$++++$$++$$++++$$%+$$++++$$%%$$%%%%$$++$$++++$$++$$++++$$+#################",
"$$%%%%%%$$$$%%%%%%$$$$++++++$$$$++++++$$$$++++++$$$$++++++$$$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$#################",
"+$$$$$$$$+%$$$$$$$$++$$$$$$$$%%$$$$$$$$+%$$$$$$$$+%$$$$$$$$++$$$$$$$$+%$$$$$$$$++$$$$$$$$+%$$$$$$$$+.+++#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$+++...#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$+++...#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$+++...#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++&@@@#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$+++...#############",
"++$$$$$$++%%$$$$$$++++$$$$$$%%%%$$$$$$++%%$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$++++$$$$$$++%%$$$$$$+++...#############",
"+$$++++$$+%$$%%%%$$++$$++++$$%%$$++++$$+%$$%%%%$$+%$$++++$$++$$++++$$+%$$%%%%$$++$$++++$$+%$$++++$$++...#############",
"$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$$$%%%%%%$$$$++++++$$$$++++++$$.+++#############",
".+++..@@@&.+++..+++.&@@@&&+++..+++..+++&.+++..+++.$+++$$%%%&$+++$$+++$&%%%&&+++$$+++$$+++&$+++$$+++$$+++#############",
"+...+@...+@...+@...++...++...@+...@@...++...++...++$$$+%$$$+%$$$+%$$$++$$$++$$$%+$$$%%$$$++$$$++$$$++$$$#############",
"+...+@...+@...+@...++...++...@+...@@...++...++...++$$$+%$$$+%$$$+%$$$++$$$++$$$%+$$$%%$$$++$$$++$$$++$$$#############",
"+...+@...+@...+@...++...++...@+...@@...++...++...++$$$+%$$$+%$$$+%$$$++$$$++$$$%+$$$%%$$$++$$$++$$$++$$$#############",
"&@@@&.@@@&.+++..+++&&+++&&+++..+++..@@@&.+++..+++&&%%%&$%%%&$+++$$+++&&+++&&+++$$+++$$%%%&$+++$$+++&&%%%#############",
"+...+@...++...@@...+@...+@...++...+@...++...+@...++$$$+%$$$++$$$%%$$$+%$$$+%$$$++$$$+%$$$++$$$+%$$$++$$$#############",
"+...+@...++...@@...+@...+@...++...+@...++...+@...++$$$+%$$$++$$$%%$$$+%$$$+%$$$++$$$+%$$$++$$$+%$$$++$$$#############",
"+...+@...++...@@...+@...+@...++...+@...++...+@...++$$$+%$$$++$$$%%$$$+%$$$+%$$$++$$$+%$$$++$$$+%$$$++$$$#############",
".+++..@@@&.+++&.+++..@@@&&+++..+++..@@@&.+++..+++.$+++$$%%%&$+++&$+++$$%%%&&+++$$+++$$%%%&$+++$$+++$$+++#############",
"..................................................$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
"..*==*..-;;-..>,,>................................$$'))'$$!;;!$$~{{~$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
".*]]]]*-^^^^->////>...............................$']]]]'!^^^^!~////~$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
".=]]]]=;^^^^;,////,...............................$)]]]]);^^^^;{////{$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
".=]]]]=;^^^^;,////,...............................$)]]]]);^^^^;{////{$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
".*]]]]*-^^^^->////>...............................$']]]]'!^^^^!~////~$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
"..*==*..-;;-..>,,>................................$$'))'$$!;;!$$~{{~$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
"..................................................$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
"..................................................$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#############",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"((((_::<(((((((([}:((((((((((:[|<((((((((::|_((((####################################################################",
"(((_#_}1((((((((<#|(((((((((}2(|1(((((((:2(|1((((####################################################################",
"(((}#([#[((((((((#|(((((((((<_(2#((((((((_(|1((((####################################################################",
"(((|#([#[((((((((#|((((((((((([#[((((((((_[2[((((####################################################################",
"(((|#([#[((((((((#|(((((((((([|<(((((((((((:#_(((####################################################################",
"((([#<:#(((((((((#|((((((((([1[[:[((((((}}([#[(((####################################################################",
"((((}||[(((((((([#2_((((((((|####((((((([1:2}((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((_|_(((((((||||(((((((((_}}_(((((((([||||<(((####################################################################",
"(((((1#[(((((((1||}((((((((<#[_1((((((((}|||1((((####################################################################",
"((((::#[(((((((}(((((((((((}#<[<((((((((<((:[((((####################################################################",
"(((<}[#[((((((<:[1}((((((((|#[21<(((((((((<}(((((####################################################################",
"(((2:}#}<(((((((([#[(((((((|#([#[(((((((((1_(((((####################################################################",
"((([[}#}<((((([2([#_(((((((:#([#_((((((((:#((((((####################################################################",
"((((<}#}((((((<2:2}(((((((((||2}(((((((((}1((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"(((((((((((((((((((((((((((((((((((((((((((((((((####################################################################",
"#####################################################################################################################",
"#####################################################################################################################",
"#####################################################################################################################",
"#####################################################################################################################"};

634
wmthrottle/src/throttle.c Normal file
View file

@ -0,0 +1,634 @@
/*
* wmthrottle- A dockapp to throttle CPU via ACPI status
* Copyright (C) 2002 Thomas Nemeth <tnemeth@free.fr>
*
* Based on work by Seiichi SATO <ssato@sh.rim.or.jp>
* Copyright (C) 2001,2002 Seiichi SATO <ssato@sh.rim.or.jp>
* and on work by Mark Staggs <me@markstaggs.net>
* Copyright (C) 2002 Mark Staggs <me@markstaggs.net>
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdbool.h>
#include <signal.h>
#include "dockapp.h"
#include "backlight_on.xpm"
#include "backlight_off.xpm"
#include "parts.xpm"
#ifdef linux
#include <sys/stat.h>
#endif
#define FREE(data) {if (data) free (data); data = NULL;}
#define SIZE 58
#define MAXSTRLEN 512
#define WINDOWED_BG ". c #AEAAAE"
#define MAX_HISTORY 16
#define CPUNUM_NONE -1
# ifdef linux
# define ACPIDEV "/proc/acpi/info"
# endif
typedef struct AcpiInfos {
int throttle_state;
int throttle_perc;
} AcpiInfos;
typedef enum { LIGHTOFF, LIGHTON } light;
Pixmap pixmap;
Pixmap backdrop_on;
Pixmap backdrop_off;
Pixmap parts;
Pixmap mask;
int but_stat = -1;
char *tpercent[]={"100","88","75","63","50","38","25","13"};
static char *display_name = "";
static char *light_color = NULL; /* back-light color */
static unsigned update_interval = 1;
// temperature threshold to slow down cpu
static int temperature_slowdown = 80;
// current temperature
static int temp = 0;
static light backlight = LIGHTOFF;
static char *notif_cmd = NULL;
static unsigned alarm_level;
static char* suspend_cmd = NULL;
static char* standby_cmd = NULL;
static unsigned switch_authorized = True;
static unsigned performance_flag = False;
unsigned temperature_flag = False;
unsigned temperature_delta = 1;
static int statecount = 0;
static int currstate = 0;
static AcpiInfos cur_acpi_infos;
#ifdef linux
# ifndef ACPI_32_BIT_SUPPORT
# define ACPI_32_BIT_SUPPORT 0x0002
# endif
#endif
/* prototypes */
static void update();
static void switch_light();
static void draw_pcdigit(AcpiInfos infos);
static void draw_statusdigit(AcpiInfos infos);
static void draw_pcgraph(AcpiInfos infos);
static void throttle_speed(int x);
static void highlight_but(AcpiInfos infos);
static void parse_arguments(int argc, char **argv);
static void print_help(char *prog);
static void acpi_getinfos(AcpiInfos *infos);
static int acpi_exists();
static int my_system (char *cmd);
#ifdef linux
int acpi_read(AcpiInfos *i);
int acpi_get_statecount();
int acpi_read_temp(int *temp);
void throttle_by_temp(int threshold);
#endif
int count;
int main(int argc, char **argv) {
XEvent event;
XpmColorSymbol colors[2] = { {"Back0", NULL, 0}, {"Back1", NULL, 0} };
int ncolor = 0;
struct sigaction sa;
FILE *fp;
sa.sa_handler = SIG_IGN;
#ifdef SA_NOCLDWAIT
sa.sa_flags = SA_NOCLDWAIT;
#else
sa.sa_flags = 0;
#endif
sigemptyset(&sa.sa_mask);
sigaction(SIGCHLD, &sa, NULL);
/* Parse CommandLine */
parse_arguments(argc, argv);
/* Check for ACPI support */
if (!acpi_exists()) {
#ifdef linux
fprintf(stderr, "No ACPI support in kernel\n");
#else
fprintf(stderr, "Unable to access ACPI info\n");
#endif
exit(1);
}
/* Initialize Application */
acpi_getinfos(&cur_acpi_infos);
statecount = acpi_get_statecount();
dockapp_open_window(display_name, PACKAGE, SIZE, SIZE, argc, argv);
dockapp_set_eventmask(ButtonPressMask);
init_dock();
if (light_color) {
colors[0].pixel = dockapp_getcolor(light_color);
colors[1].pixel = dockapp_blendedcolor(light_color, -24, -24, -24, 1.0);
ncolor = 2;
}
/* change raw xpm data to pixmap */
if (dockapp_iswindowed)
backlight_on_xpm[1] = backlight_off_xpm[1] = WINDOWED_BG;
if (!dockapp_xpm2pixmap(backlight_on_xpm, &backdrop_on, &mask, colors, ncolor)) {
fprintf(stderr, "Error initializing backlit background image.\n");
exit(1);
}
if (!dockapp_xpm2pixmap(backlight_off_xpm, &backdrop_off, NULL, NULL, 0)) {
fprintf(stderr, "Error initializing background image.\n");
exit(1);
}
if (!dockapp_xpm2pixmap(parts_xpm, &parts, NULL, colors, ncolor)) {
fprintf(stderr, "Error initializing parts image.\n");
exit(1);
}
/* shape window */
if (!dockapp_iswindowed) dockapp_setshape(mask, 0, 0);
if (mask) XFreePixmap(display, mask);
/* pixmap : draw area */
pixmap = dockapp_XCreatePixmap(SIZE, SIZE);
/* Initialize pixmap */
if (backlight == LIGHTON)
dockapp_copyarea(backdrop_on, pixmap, 0, 0, SIZE, SIZE, 0, 0);
else
dockapp_copyarea(backdrop_off, pixmap, 0, 0, SIZE, SIZE, 0, 0);
dockapp_set_background(pixmap);
dockapp_show();
/* Main loop */
while (1) {
if (dockapp_nextevent_or_timeout(&event, update_interval * 1000)) {
/* Next Event */
switch (event.type) {
case ButtonPress:
but_stat = CheckMouseRegion(event.xbutton.x, event.xbutton.y);
switch(but_stat) {
case -1: switch_light(); break;
case 8: temperature_flag = !temperature_flag; break;
default:
throttle_speed(but_stat);
break;
}
default: break;
}
} else {
/* Time Out */
if( temperature_flag && temperature_slowdown < 80 )
throttle_by_temp( acpi_read_temp( &temp ));
update();
}
}
return 0;
}
/* called by timer */
static void update() {
static light pre_backlight;
static Bool in_alarm_mode = False;
acpi_getinfos(&cur_acpi_infos);
/* all clear */
if (backlight == LIGHTON)
dockapp_copyarea(backdrop_on, pixmap, 0, 0, 58, 58, 0, 0);
else
dockapp_copyarea(backdrop_off, pixmap, 0, 0, 58, 58, 0, 0);
/* draw digit */
draw_pcdigit(cur_acpi_infos);
draw_statusdigit(cur_acpi_infos);
draw_pcgraph(cur_acpi_infos);
highlight_but(cur_acpi_infos);
/* show */
dockapp_copy2window(pixmap);
}
/* called when mouse button pressed */
static void switch_light() {
switch (backlight) {
case LIGHTOFF:
backlight = LIGHTON;
dockapp_copyarea(backdrop_on, pixmap, 0, 0, 58, 58, 0, 0);
break;
case LIGHTON:
backlight = LIGHTOFF;
dockapp_copyarea(backdrop_off, pixmap, 0, 0, 58, 58, 0, 0);
break;
}
/* redraw digit */
acpi_getinfos(&cur_acpi_infos);
draw_pcdigit(cur_acpi_infos);
draw_statusdigit(cur_acpi_infos);
draw_pcgraph(cur_acpi_infos);
/* show */
dockapp_copy2window(pixmap);
}
static void draw_pcdigit(AcpiInfos infos) {
int v100, v10, v1;
int xd = 0;
int num = infos.throttle_perc;
if (num < 0) num = 0;
v100 = num / 100;
v10 = (num - v100 * 100) / 10;
v1 = (num - v100 * 100 - v10 * 10);
if (backlight == LIGHTON) xd = 50;
/* draw digit */
dockapp_copyarea(parts, pixmap, v1 * 5 + xd, 40, 5, 9, 17, 45);
if (v10 != 0)
dockapp_copyarea(parts, pixmap, v10 * 5 + xd, 40, 5, 9, 11, 45);
if (v100 == 1) {
dockapp_copyarea(parts, pixmap, 5 + xd, 40, 5, 9, 5, 45);
dockapp_copyarea(parts, pixmap, 0 + xd, 40, 5, 9, 11, 45);
}
}
static void highlight_but(AcpiInfos infos) {
int xd;
int x = infos.throttle_state;
if (x < 4) {
xd = x*12;
dockapp_copyarea(parts, pixmap, xd, 58, 12, 12, 5 + xd, 3);
}
else {
xd = (x-4)*12;
dockapp_copyarea(parts, pixmap, xd, 70, 12, 12, 5 + xd, 15);
}
}
static void draw_statusdigit(AcpiInfos infos) {
int xd = 0;
int y = 31;
if (backlight == LIGHTON) {
y = 40;
xd = 50;
}
/* draw digit */
if (infos.throttle_state > 4)
dockapp_copyarea(parts, pixmap, 1 + xd, 50, 6 ,6 ,34 ,46);
if (infos.throttle_state <= 4)
dockapp_copyarea(parts, pixmap, 7 + xd, 50, 6 ,6 ,34 ,46);
if(infos.throttle_state < 3)
dockapp_copyarea(parts, pixmap, 13 + xd, 50, 6 ,6 ,34 ,46);
}
static void draw_pcgraph(AcpiInfos infos) {
int xd = 100;
int nb;
int num = infos.throttle_perc / 6.25 ;
if (num < 0) num = 0;
if (backlight == LIGHTON) xd = 102;
/* draw digit */
for (nb = 0 ; nb < num ; nb++)
dockapp_copyarea(parts, pixmap, xd, 0, 2, 9, 6 + nb * 3, 33);
}
static void parse_arguments(int argc, char **argv) {
int i;
int integer;
for (i = 1; i < argc; i++) {
if (!strcmp(argv[i], "--help") || !strcmp(argv[i], "-h")) {
print_help(argv[0]), exit(0);
} else if (!strcmp(argv[i], "--version") || !strcmp(argv[i], "-v")) {
printf("%s version %s\n", PACKAGE, VERSION), exit(0);
// new code for performance
} else if (!strcmp(argv[i], "--performance") || !strcmp(argv[i], "-p")) {
performance_flag = True;
} else if (!strcmp(argv[i], "--display") || !strcmp(argv[i], "-d")) {
display_name = argv[i + 1];
i++;
} else if (!strcmp(argv[i], "--backlight") || !strcmp(argv[i], "-bl")) {
backlight = LIGHTON;
} else if (!strcmp(argv[i], "--light-color") || !strcmp(argv[i], "-lc")) {
light_color = argv[i + 1];
i++;
} else if (!strcmp(argv[i], "--interval") || !strcmp(argv[i], "-i")) {
if (argc == i + 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (sscanf(argv[i + 1], "%i", &integer) != 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (integer < 1)
fprintf(stderr, "%s: argument %s must be >=1\n",
argv[0], argv[i]), exit(1);
update_interval = integer;
i++;
} else if (!strcmp(argv[i], "--alarm") || !strcmp(argv[i], "-a")) {
if (argc == i + 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (sscanf(argv[i + 1], "%i", &integer) != 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if ( (integer < 0) || (integer > 100) )
fprintf(stderr, "%s: argument %s must be >=0 and <=100\n",
argv[0], argv[i]), exit(1);
alarm_level = integer;
i++;
} else if (!strcmp(argv[i], "--windowed") || !strcmp(argv[i], "-w")) {
dockapp_iswindowed = True;
} else if (!strcmp(argv[i], "--broken-wm") || !strcmp(argv[i], "-bw")) {
dockapp_isbrokenwm = True;
} else if (!strcmp(argv[i], "--notify") || !strcmp(argv[i], "-n")) {
notif_cmd = argv[i + 1];
i++;
// temperature threshold for cpu downclocking
} else if (!strcmp(argv[i], "--temperature") || !strcmp(argv[i], "-t")) {
if (argc == i + 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (sscanf(argv[i + 1], "%i", &integer) != 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (integer < 1)
fprintf(stderr, "%s: argument %s must be >=1\n",
argv[0], argv[i]), exit(1);
temperature_slowdown = integer;
temperature_flag = True;
i++;
// temperature "delta" value for state transitions
} else if ( !strcmp(argv[i], "-e")) {
if (argc == i + 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (sscanf(argv[i + 1], "%i", &integer) != 1)
fprintf(stderr, "%s: error parsing argument for option %s\n",
argv[0], argv[i]), exit(1);
if (integer < 1)
fprintf(stderr, "%s: argument %s must be >=1\n",
argv[0], argv[i]), exit(1);
temperature_delta = integer;
temperature_flag = True;
i++;
} else {
fprintf(stderr, "%s: unrecognized option '%s'\n", argv[0], argv[i]);
print_help(argv[0]), exit(1);
}
}
}
static void print_help(char *prog)
{
printf("Usage : %s [OPTIONS]\n"
"%s - Window Maker dockapp for changing acpi throttle/performance states of cpu\n"
" -d, --display <string> display to use\n"
" -bl, --backlight turn on back-light\n"
" -lc, --light-color <string> back-light color(rgb:6E/C6/3B is default)\n"
" -i, --interval <number> number of secs between updates (1 is default)\n"
" -h, --help show this help text and exit\n"
" -v, --version show program version and exit\n"
" -w, --windowed run the application in windowed mode\n"
" -bw, --broken-wm activate broken window manager fix"
" (use this if you have problems running it in your window manager)\n"
" -p, --performance use acpi performance instead of throttling\n"
" -t, --temperature temperature threshold to start downclocking"
" (to avoid fan noise)\n"
" -e temperature difference that will cause a state transition"
" (default: 1)\n",
prog, prog);
/* OPTIONS SUPP :
* ? -f, --file : configuration file
*/
}
static void throttle_speed(int x) {
FILE *fd;
if( performance_flag ) {
if(fd = fopen("/proc/acpi/processor/CPU0/performance","w")) {
fprintf(fd,"%d",x);
fclose(fd);
} else
fprintf(stderr,"Could not change performance state\n");
} else {
if(fd = fopen("/proc/acpi/processor/CPU0/throttling","w")) {
fprintf(fd,"%d",x);
fclose(fd);
}
else
fprintf(stderr,"Could not throttle machine\n");
}
}
static void acpi_getinfos(AcpiInfos *infos) {
if (
#if defined(linux) || defined(solaris)
(acpi_read(infos))
#else
# ifdef freebsd
(acpi_read(&temp_info))
# endif
#endif
) {
fprintf(stderr, "Cannot read ACPI information: %i\n");
exit(1);
}
}
int acpi_exists() {
if (access(ACPIDEV, R_OK))
return 0;
else
return 1;
}
static int my_system (char *cmd) {
int pid;
extern char **environ;
if (cmd == 0) return 1;
pid = fork ();
if (pid == -1) return -1;
if (pid == 0) {
pid = fork ();
if (pid == 0) {
char *argv[4];
argv[0] = "sh";
argv[1] = "-c";
argv[2] = cmd;
argv[3] = 0;
execve ("/bin/sh", argv, environ);
exit (0);
}
exit (0);
}
return 0;
}
#ifdef linux
int acpi_read(AcpiInfos *i) {
FILE *fd;
int retcode = 0;
int capacity,remain;
char *buf;
char *ptr;
char stat;
buf=(char *)malloc(sizeof(char)*512);
// new performance code
if( performance_flag ) {
if ((fd = fopen("/proc/acpi/processor/CPU0/performance", "r"))){
fread(buf,512,1,fd);
fclose(fd);
if(ptr = strstr(buf,"active state:")) {
ptr += 26;
sscanf(ptr,"%d",&i->throttle_state);
}
}
} else {
if ((fd = fopen("/proc/acpi/processor/CPU0/throttling", "r"))) {
fread(buf,512,1,fd);
fclose(fd);
if(ptr = strstr(buf,"active state:")) {
ptr += 26;
sscanf(ptr,"%d",&i->throttle_state);
}
}
}
free(buf);
sscanf(tpercent[cur_acpi_infos.throttle_state],"%d",&i->throttle_perc);
return retcode;
}
// get cpu temperature
int acpi_read_temp(int *temp) {
FILE *fd;
char *ptr;
char *buf;
char *tmp;
tmp = (char *)malloc(sizeof(char)*2);
buf=(char *)malloc(sizeof(char)*512);
if ((fd = fopen("/proc/acpi/thermal_zone/THRM/temperature", "r"))){
fread(buf,512,1,fd);
fclose(fd);
if(ptr = strstr(buf,"temperature:")) {
ptr += 25;
strncpy( tmp, ptr, 2 );
sscanf(tmp,"%d", &temp ); //&i->throttle_state);
}
}
free( buf );
free( tmp );
return temp;
}
// throttle according to the current temperature
void throttle_by_temp(int cur_temp ) {
int state;
// calculate new state
if( cur_temp < temperature_slowdown )
state = 0;
else if( cur_temp == temperature_slowdown )
state = 1;
else if( cur_temp >= temperature_slowdown + ( statecount - 2 ) * temperature_delta )
state = statecount - 1;
else
state = 1 + ( cur_temp - temperature_slowdown ) / temperature_delta;
// change state
throttle_speed( state );
}
//get acpi state count (seems to work for throttling, too)
int acpi_get_statecount() {
FILE *fd;
int *retcode;
char *buf;
char *ptr;
buf=(char *)malloc(sizeof(char)*512);
if( performance_flag ) {
if ((fd = fopen("/proc/acpi/processor/CPU0/performance", "r"))){
fread(buf,512,1,fd);
fclose(fd);
if(ptr = strstr(buf,"state count:")) {
ptr += 25;
sscanf(ptr,"%d",&retcode);
}
}
} else {
if ((fd = fopen("/proc/acpi/processor/CPU0/throttling", "r"))) {
fread(buf,512,1,fd);
fclose(fd);
if(ptr = strstr(buf,"state count:")) {
ptr += 25;
sscanf(ptr,"%d",&retcode);
}
}
}
free(buf);
return retcode;
}
#endif

BIN
wmthrottle/src/wmthrottle Executable file

Binary file not shown.

1
wmthrottle/stamp-h Normal file
View file

@ -0,0 +1 @@
timestamp

1
wmthrottle/stamp-h.in Normal file
View file

@ -0,0 +1 @@
timestamp