Codebase list battery-stats / 8b37233
Merge tag 'upstream/0.4.0' Upstream version 0.4.0 Petter Reinholdtsen 8 years ago
44 changed file(s) with 863 addition(s) and 11816 deletion(s). Raw diff Collapse all Expand all
0 # KDevelop
1 *.kdev4
2
3 # Autotools
4 /autom4te.cache
5 /stamp-h1
6 Makefile
7 /config.status
8 /config.log
9 /config.h
10 /aclocal.m4
11 Makefile.in
12 /config/
13 /config.h.in
14 /configure
15 .deps
16
17 # General
18 *.orig
19 *~
20 /build*/
21
22 # from git merge
23 *.BACKUP.*
24 *.BASE.*
25 *.LOCAL.*
26 *.REMOTE.*
0 0.4.0 (2016-03-14)
1 =====
2 * New developer.
3 * Collector rewritten as shell script, loosing some features along the way.
4
5 0.3.7 (unreleased)
6 =====
7 * Use CMake buildsystem, and other code base cleanups
8 * Make Gnuplot syntax used in graph-setup compatible with gnuplot-4.6
9 * Fix missing 'I' option in help output
10 * Make it possible to write to stdout instead just /var/log/...
11 * Convert all source files to UTF-8
12 * Improve --help output a lot
13
14 0.3.6 (2009-09-19)
15 =====
16 * New upstream release that integrates a patch to specify the battery number
17 (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535815)
18
19 0.3.5 (2009-06-13)
20 =====
21 * Debian release
22
23 0.3.4 (2009-01-25)
24 =====
25 * Merged ACPI support from debian/patches
26 - initial patch author: Michael Bunk <michael.bunk@gmail.com>
27 - patch adapted to support autotools by Antonio Radici <antonio@dyne.org>
28 * Created a ./configure script using autotools to support the optional
29 ACPI patch
30 * New gnuplot syntax supported, taken from debian/patches
31 * Corrected some manpages formatting error, taken from debian/patches
32 * New maintaner: Antonio Radici <antonio@dyne.org>
33 * Added an icon, gnome-ccperiph.png, it's taken from the debian
34 package gnome-desktop-data, the icon is licensed with the GPL-2 and
35 it's copyrighted by the GNOME group
36
37 0.3.3 (2003-03-21)
38 =====
39 * Converted part of the CVS changelog into this. The debian/changelog
40 is exclusively for use by debian-specific changes from now on.
41 * battery-log: Added (a slightly modified version of) patch from
42 David Z Maze (debian bug #185623).
43 * battery-stats-collector.c:myversion : oops: This still thought it
44 was version 0.2. It's now version 0.3.3...
45
46 0.3.2 (2003-02-21)
47 =====
48 * debian/: README, changelog, control, copyright, init.d, logrotate,
49 menu, rules: Removed debian-specific files from trunc. They now
50 belong on the debian_version_xxx branches
51 * debian/control: Slight paraphrasing in Note:
52 * debian/changelog, debian/control: Bumped Standards-Version: to 3.5.6.1
53 * debian/README: No more mention of splitting into multiple packages -
54 this is already mentioned in ../README
55 * README: Slightly more verbose now
56 * README: Bumped version number to 0.3.2
57 * debian/README: Now available on non-i386 too.
58 * debian/: changelog, menu: Menu entry is now immune to log rotation
59 * debian/changelog: No longer a debian-native package
60
61 0.3.1 (2003-01-16)
62 =====
63 * See debian/changelog for prehistoric change history.
0 project(battery-stats)
1
2 cmake_minimum_required(VERSION 2.6)
3
4 include(CheckIncludeFiles)
5
6 set(VERSION_STRING 0.4.0)
7
8 set(INSTALL_TARGETS_DEFAULT_ARGS
9 RUNTIME DESTINATION bin
10 LIBRARY DESTINATION ${LIB_INSTALL_DIR}
11 ARCHIVE DESTINATION ${LIB_INSTALL_DIR} COMPONENT Devel
12 )
13 set(DATA_DIR "share/battery-stats")
14
15 configure_file(
16 ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
17 ${CMAKE_CURRENT_BINARY_DIR}/config.h
18 )
19
20 add_subdirectory(data)
21 add_subdirectory(src)
+0
-39
History less more
0 0.3.4
1 - Merged ACPI support from debian/patches
2 - initial patch author: Michael Bunk <michael.bunk@gmail.com>
3 - patch adapted to support autotools by Antonio Radici <antonio@dyne.org>
4 - Created a ./configure script using autotools to support the optional
5 ACPI patch
6 - New gnuplot syntax supported, taken from debian/patches
7 - Corrected some manpages formatting error, taken from debian/patches
8 - New maintaner: Antonio Radici <antonio@dyne.org>
9 - Added an icon, gnome-ccperiph.png, it's taken from the debian
10 package gnome-desktop-data, the icon is licensed with the GPL-2 and
11 it's copyrighted by the GNOME group
12
13 0.3.3
14 - Converted part of the CVS changelog into this. The debian/changelog
15 is exclusively for use by debian-specific changes from now on.
16 - battery-log: Added (a slightly modified version of) patch from
17 David Z Maze (debian bug #185623).
18 - battery-stats-collector.c:myversion : oops: This still thought it
19 was version 0.2. It's now version 0.3.3...
20
21 0.3.2
22
23 - debian/: README, changelog, control, copyright, init.d, logrotate,
24 menu, rules: Removed debian-specific files from trunc. They now
25 belong on the debian_version_xxx branches
26 - debian/control: Slight paraphrasing in Note:
27 - debian/changelog, debian/control: Bumped Standards-Version: to 3.5.6.1
28 - debian/README: No more mention of splitting into multiple packages -
29 this is already mentioned in ../README
30 - README: Slightly more verbose now
31 - README: Bumped version number to 0.3.2
32 - debian/README: Now available on non-i386 too.
33 - debian/: changelog, menu: Menu entry is now immune to log rotation
34 - debian/changelog: No longer a debian-native package
35
36 0.3.1
37
38 - See debian/changelog for prehistoric change history.
+0
-2
Makefile.am less more
0 SUBDIRS = src man pixmaps
1 EXTRA_DIST = TODO History
+0
-599
Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15 VPATH = @srcdir@
16 pkgdatadir = $(datadir)/@PACKAGE@
17 pkglibdir = $(libdir)/@PACKAGE@
18 pkgincludedir = $(includedir)/@PACKAGE@
19 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
20 install_sh_DATA = $(install_sh) -c -m 644
21 install_sh_PROGRAM = $(install_sh) -c
22 install_sh_SCRIPT = $(install_sh) -c
23 INSTALL_HEADER = $(INSTALL_DATA)
24 transform = $(program_transform_name)
25 NORMAL_INSTALL = :
26 PRE_INSTALL = :
27 POST_INSTALL = :
28 NORMAL_UNINSTALL = :
29 PRE_UNINSTALL = :
30 POST_UNINSTALL = :
31 subdir = .
32 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
33 $(srcdir)/Makefile.in $(srcdir)/config.h.in \
34 $(top_srcdir)/configure COPYING TODO depcomp install-sh \
35 missing
36 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
37 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
38 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
39 $(ACLOCAL_M4)
40 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
41 configure.lineno config.status.lineno
42 mkinstalldirs = $(install_sh) -d
43 CONFIG_HEADER = config.h
44 CONFIG_CLEAN_FILES =
45 SOURCES =
46 DIST_SOURCES =
47 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
48 html-recursive info-recursive install-data-recursive \
49 install-dvi-recursive install-exec-recursive \
50 install-html-recursive install-info-recursive \
51 install-pdf-recursive install-ps-recursive install-recursive \
52 installcheck-recursive installdirs-recursive pdf-recursive \
53 ps-recursive uninstall-recursive
54 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
55 distclean-recursive maintainer-clean-recursive
56 ETAGS = etags
57 CTAGS = ctags
58 DIST_SUBDIRS = $(SUBDIRS)
59 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
60 distdir = $(PACKAGE)-$(VERSION)
61 top_distdir = $(distdir)
62 am__remove_distdir = \
63 { test ! -d $(distdir) \
64 || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
65 && rm -fr $(distdir); }; }
66 DIST_ARCHIVES = $(distdir).tar.gz
67 GZIP_ENV = --best
68 distuninstallcheck_listfiles = find . -type f -print
69 distcleancheck_listfiles = find . -type f -print
70 ACLOCAL = @ACLOCAL@
71 ACPILIB = @ACPILIB@
72 AMTAR = @AMTAR@
73 APMLIB = @APMLIB@
74 AUTOCONF = @AUTOCONF@
75 AUTOHEADER = @AUTOHEADER@
76 AUTOMAKE = @AUTOMAKE@
77 AWK = @AWK@
78 CC = @CC@
79 CCDEPMODE = @CCDEPMODE@
80 CFLAGS = @CFLAGS@
81 CPP = @CPP@
82 CPPFLAGS = @CPPFLAGS@
83 CYGPATH_W = @CYGPATH_W@
84 DEFS = @DEFS@
85 DEPDIR = @DEPDIR@
86 ECHO_C = @ECHO_C@
87 ECHO_N = @ECHO_N@
88 ECHO_T = @ECHO_T@
89 EGREP = @EGREP@
90 EXEEXT = @EXEEXT@
91 GNUPLOT = @GNUPLOT@
92 GREP = @GREP@
93 INSTALL = @INSTALL@
94 INSTALL_DATA = @INSTALL_DATA@
95 INSTALL_PROGRAM = @INSTALL_PROGRAM@
96 INSTALL_SCRIPT = @INSTALL_SCRIPT@
97 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
98 LDFLAGS = @LDFLAGS@
99 LIBOBJS = @LIBOBJS@
100 LIBS = @LIBS@
101 LTLIBOBJS = @LTLIBOBJS@
102 MAKEINFO = @MAKEINFO@
103 MKDIR_P = @MKDIR_P@
104 OBJEXT = @OBJEXT@
105 PACKAGE = @PACKAGE@
106 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
107 PACKAGE_NAME = @PACKAGE_NAME@
108 PACKAGE_STRING = @PACKAGE_STRING@
109 PACKAGE_TARNAME = @PACKAGE_TARNAME@
110 PACKAGE_VERSION = @PACKAGE_VERSION@
111 PATH_SEPARATOR = @PATH_SEPARATOR@
112 SET_MAKE = @SET_MAKE@
113 SHELL = @SHELL@
114 STRIP = @STRIP@
115 VERSION = @VERSION@
116 abs_builddir = @abs_builddir@
117 abs_srcdir = @abs_srcdir@
118 abs_top_builddir = @abs_top_builddir@
119 abs_top_srcdir = @abs_top_srcdir@
120 ac_ct_CC = @ac_ct_CC@
121 am__include = @am__include@
122 am__leading_dot = @am__leading_dot@
123 am__quote = @am__quote@
124 am__tar = @am__tar@
125 am__untar = @am__untar@
126 bindir = @bindir@
127 build_alias = @build_alias@
128 builddir = @builddir@
129 datadir = @datadir@
130 datarootdir = @datarootdir@
131 docdir = @docdir@
132 dvidir = @dvidir@
133 exec_prefix = @exec_prefix@
134 host_alias = @host_alias@
135 htmldir = @htmldir@
136 includedir = @includedir@
137 infodir = @infodir@
138 install_sh = @install_sh@
139 libdir = @libdir@
140 libexecdir = @libexecdir@
141 localedir = @localedir@
142 localstatedir = @localstatedir@
143 mandir = @mandir@
144 mkdir_p = @mkdir_p@
145 oldincludedir = @oldincludedir@
146 pdfdir = @pdfdir@
147 prefix = @prefix@
148 program_transform_name = @program_transform_name@
149 psdir = @psdir@
150 sbindir = @sbindir@
151 sharedstatedir = @sharedstatedir@
152 srcdir = @srcdir@
153 sysconfdir = @sysconfdir@
154 target_alias = @target_alias@
155 top_builddir = @top_builddir@
156 top_srcdir = @top_srcdir@
157 SUBDIRS = src man pixmaps
158 EXTRA_DIST = TODO History
159 all: config.h
160 $(MAKE) $(AM_MAKEFLAGS) all-recursive
161
162 .SUFFIXES:
163 am--refresh:
164 @:
165 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
166 @for dep in $?; do \
167 case '$(am__configure_deps)' in \
168 *$$dep*) \
169 echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
170 cd $(srcdir) && $(AUTOMAKE) --foreign \
171 && exit 0; \
172 exit 1;; \
173 esac; \
174 done; \
175 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
176 cd $(top_srcdir) && \
177 $(AUTOMAKE) --foreign Makefile
178 .PRECIOUS: Makefile
179 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
180 @case '$?' in \
181 *config.status*) \
182 echo ' $(SHELL) ./config.status'; \
183 $(SHELL) ./config.status;; \
184 *) \
185 echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
186 cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
187 esac;
188
189 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
190 $(SHELL) ./config.status --recheck
191
192 $(top_srcdir)/configure: $(am__configure_deps)
193 cd $(srcdir) && $(AUTOCONF)
194 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
195 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
196
197 config.h: stamp-h1
198 @if test ! -f $@; then \
199 rm -f stamp-h1; \
200 $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
201 else :; fi
202
203 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
204 @rm -f stamp-h1
205 cd $(top_builddir) && $(SHELL) ./config.status config.h
206 $(srcdir)/config.h.in: $(am__configure_deps)
207 cd $(top_srcdir) && $(AUTOHEADER)
208 rm -f stamp-h1
209 touch $@
210
211 distclean-hdr:
212 -rm -f config.h stamp-h1
213
214 # This directory's subdirectories are mostly independent; you can cd
215 # into them and run `make' without going through this Makefile.
216 # To change the values of `make' variables: instead of editing Makefiles,
217 # (1) if the variable is set in `config.status', edit `config.status'
218 # (which will cause the Makefiles to be regenerated when you run `make');
219 # (2) otherwise, pass the desired values on the `make' command line.
220 $(RECURSIVE_TARGETS):
221 @failcom='exit 1'; \
222 for f in x $$MAKEFLAGS; do \
223 case $$f in \
224 *=* | --[!k]*);; \
225 *k*) failcom='fail=yes';; \
226 esac; \
227 done; \
228 dot_seen=no; \
229 target=`echo $@ | sed s/-recursive//`; \
230 list='$(SUBDIRS)'; for subdir in $$list; do \
231 echo "Making $$target in $$subdir"; \
232 if test "$$subdir" = "."; then \
233 dot_seen=yes; \
234 local_target="$$target-am"; \
235 else \
236 local_target="$$target"; \
237 fi; \
238 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
239 || eval $$failcom; \
240 done; \
241 if test "$$dot_seen" = "no"; then \
242 $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
243 fi; test -z "$$fail"
244
245 $(RECURSIVE_CLEAN_TARGETS):
246 @failcom='exit 1'; \
247 for f in x $$MAKEFLAGS; do \
248 case $$f in \
249 *=* | --[!k]*);; \
250 *k*) failcom='fail=yes';; \
251 esac; \
252 done; \
253 dot_seen=no; \
254 case "$@" in \
255 distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
256 *) list='$(SUBDIRS)' ;; \
257 esac; \
258 rev=''; for subdir in $$list; do \
259 if test "$$subdir" = "."; then :; else \
260 rev="$$subdir $$rev"; \
261 fi; \
262 done; \
263 rev="$$rev ."; \
264 target=`echo $@ | sed s/-recursive//`; \
265 for subdir in $$rev; do \
266 echo "Making $$target in $$subdir"; \
267 if test "$$subdir" = "."; then \
268 local_target="$$target-am"; \
269 else \
270 local_target="$$target"; \
271 fi; \
272 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
273 || eval $$failcom; \
274 done && test -z "$$fail"
275 tags-recursive:
276 list='$(SUBDIRS)'; for subdir in $$list; do \
277 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
278 done
279 ctags-recursive:
280 list='$(SUBDIRS)'; for subdir in $$list; do \
281 test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
282 done
283
284 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
285 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
286 unique=`for i in $$list; do \
287 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
288 done | \
289 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
290 END { if (nonempty) { for (i in files) print i; }; }'`; \
291 mkid -fID $$unique
292 tags: TAGS
293
294 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
295 $(TAGS_FILES) $(LISP)
296 tags=; \
297 here=`pwd`; \
298 if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
299 include_option=--etags-include; \
300 empty_fix=.; \
301 else \
302 include_option=--include; \
303 empty_fix=; \
304 fi; \
305 list='$(SUBDIRS)'; for subdir in $$list; do \
306 if test "$$subdir" = .; then :; else \
307 test ! -f $$subdir/TAGS || \
308 tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
309 fi; \
310 done; \
311 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
312 unique=`for i in $$list; do \
313 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
314 done | \
315 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
316 END { if (nonempty) { for (i in files) print i; }; }'`; \
317 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
318 test -n "$$unique" || unique=$$empty_fix; \
319 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
320 $$tags $$unique; \
321 fi
322 ctags: CTAGS
323 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
324 $(TAGS_FILES) $(LISP)
325 tags=; \
326 list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
327 unique=`for i in $$list; do \
328 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
329 done | \
330 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
331 END { if (nonempty) { for (i in files) print i; }; }'`; \
332 test -z "$(CTAGS_ARGS)$$tags$$unique" \
333 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
334 $$tags $$unique
335
336 GTAGS:
337 here=`$(am__cd) $(top_builddir) && pwd` \
338 && cd $(top_srcdir) \
339 && gtags -i $(GTAGS_ARGS) $$here
340
341 distclean-tags:
342 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
343
344 distdir: $(DISTFILES)
345 $(am__remove_distdir)
346 test -d $(distdir) || mkdir $(distdir)
347 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
348 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
349 list='$(DISTFILES)'; \
350 dist_files=`for file in $$list; do echo $$file; done | \
351 sed -e "s|^$$srcdirstrip/||;t" \
352 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
353 case $$dist_files in \
354 */*) $(MKDIR_P) `echo "$$dist_files" | \
355 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
356 sort -u` ;; \
357 esac; \
358 for file in $$dist_files; do \
359 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
360 if test -d $$d/$$file; then \
361 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
362 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
363 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
364 fi; \
365 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
366 else \
367 test -f $(distdir)/$$file \
368 || cp -p $$d/$$file $(distdir)/$$file \
369 || exit 1; \
370 fi; \
371 done
372 list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
373 if test "$$subdir" = .; then :; else \
374 test -d "$(distdir)/$$subdir" \
375 || $(MKDIR_P) "$(distdir)/$$subdir" \
376 || exit 1; \
377 distdir=`$(am__cd) $(distdir) && pwd`; \
378 top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
379 (cd $$subdir && \
380 $(MAKE) $(AM_MAKEFLAGS) \
381 top_distdir="$$top_distdir" \
382 distdir="$$distdir/$$subdir" \
383 am__remove_distdir=: \
384 am__skip_length_check=: \
385 distdir) \
386 || exit 1; \
387 fi; \
388 done
389 -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
390 ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
391 ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
392 ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
393 || chmod -R a+r $(distdir)
394 dist-gzip: distdir
395 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
396 $(am__remove_distdir)
397
398 dist-bzip2: distdir
399 tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
400 $(am__remove_distdir)
401
402 dist-lzma: distdir
403 tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
404 $(am__remove_distdir)
405
406 dist-tarZ: distdir
407 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
408 $(am__remove_distdir)
409
410 dist-shar: distdir
411 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
412 $(am__remove_distdir)
413
414 dist-zip: distdir
415 -rm -f $(distdir).zip
416 zip -rq $(distdir).zip $(distdir)
417 $(am__remove_distdir)
418
419 dist dist-all: distdir
420 tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
421 $(am__remove_distdir)
422
423 # This target untars the dist file and tries a VPATH configuration. Then
424 # it guarantees that the distribution is self-contained by making another
425 # tarfile.
426 distcheck: dist
427 case '$(DIST_ARCHIVES)' in \
428 *.tar.gz*) \
429 GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
430 *.tar.bz2*) \
431 bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
432 *.tar.lzma*) \
433 unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
434 *.tar.Z*) \
435 uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
436 *.shar.gz*) \
437 GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
438 *.zip*) \
439 unzip $(distdir).zip ;;\
440 esac
441 chmod -R a-w $(distdir); chmod a+w $(distdir)
442 mkdir $(distdir)/_build
443 mkdir $(distdir)/_inst
444 chmod a-w $(distdir)
445 dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
446 && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
447 && cd $(distdir)/_build \
448 && ../configure --srcdir=.. --prefix="$$dc_install_base" \
449 $(DISTCHECK_CONFIGURE_FLAGS) \
450 && $(MAKE) $(AM_MAKEFLAGS) \
451 && $(MAKE) $(AM_MAKEFLAGS) dvi \
452 && $(MAKE) $(AM_MAKEFLAGS) check \
453 && $(MAKE) $(AM_MAKEFLAGS) install \
454 && $(MAKE) $(AM_MAKEFLAGS) installcheck \
455 && $(MAKE) $(AM_MAKEFLAGS) uninstall \
456 && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
457 distuninstallcheck \
458 && chmod -R a-w "$$dc_install_base" \
459 && ({ \
460 (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
461 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
462 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
463 && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
464 distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
465 } || { rm -rf "$$dc_destdir"; exit 1; }) \
466 && rm -rf "$$dc_destdir" \
467 && $(MAKE) $(AM_MAKEFLAGS) dist \
468 && rm -rf $(DIST_ARCHIVES) \
469 && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
470 $(am__remove_distdir)
471 @(echo "$(distdir) archives ready for distribution: "; \
472 list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
473 sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
474 distuninstallcheck:
475 @cd $(distuninstallcheck_dir) \
476 && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
477 || { echo "ERROR: files left after uninstall:" ; \
478 if test -n "$(DESTDIR)"; then \
479 echo " (check DESTDIR support)"; \
480 fi ; \
481 $(distuninstallcheck_listfiles) ; \
482 exit 1; } >&2
483 distcleancheck: distclean
484 @if test '$(srcdir)' = . ; then \
485 echo "ERROR: distcleancheck can only run from a VPATH build" ; \
486 exit 1 ; \
487 fi
488 @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
489 || { echo "ERROR: files left in build directory after distclean:" ; \
490 $(distcleancheck_listfiles) ; \
491 exit 1; } >&2
492 check-am: all-am
493 check: check-recursive
494 all-am: Makefile config.h
495 installdirs: installdirs-recursive
496 installdirs-am:
497 install: install-recursive
498 install-exec: install-exec-recursive
499 install-data: install-data-recursive
500 uninstall: uninstall-recursive
501
502 install-am: all-am
503 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
504
505 installcheck: installcheck-recursive
506 install-strip:
507 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
508 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
509 `test -z '$(STRIP)' || \
510 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
511 mostlyclean-generic:
512
513 clean-generic:
514
515 distclean-generic:
516 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
517
518 maintainer-clean-generic:
519 @echo "This command is intended for maintainers to use"
520 @echo "it deletes files that may require special tools to rebuild."
521 clean: clean-recursive
522
523 clean-am: clean-generic mostlyclean-am
524
525 distclean: distclean-recursive
526 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
527 -rm -f Makefile
528 distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
529
530 dvi: dvi-recursive
531
532 dvi-am:
533
534 html: html-recursive
535
536 info: info-recursive
537
538 info-am:
539
540 install-data-am:
541
542 install-dvi: install-dvi-recursive
543
544 install-exec-am:
545
546 install-html: install-html-recursive
547
548 install-info: install-info-recursive
549
550 install-man:
551
552 install-pdf: install-pdf-recursive
553
554 install-ps: install-ps-recursive
555
556 installcheck-am:
557
558 maintainer-clean: maintainer-clean-recursive
559 -rm -f $(am__CONFIG_DISTCLEAN_FILES)
560 -rm -rf $(top_srcdir)/autom4te.cache
561 -rm -f Makefile
562 maintainer-clean-am: distclean-am maintainer-clean-generic
563
564 mostlyclean: mostlyclean-recursive
565
566 mostlyclean-am: mostlyclean-generic
567
568 pdf: pdf-recursive
569
570 pdf-am:
571
572 ps: ps-recursive
573
574 ps-am:
575
576 uninstall-am:
577
578 .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
579 install-strip
580
581 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
582 all all-am am--refresh check check-am clean clean-generic \
583 ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
584 dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
585 distclean-generic distclean-hdr distclean-tags distcleancheck \
586 distdir distuninstallcheck dvi dvi-am html html-am info \
587 info-am install install-am install-data install-data-am \
588 install-dvi install-dvi-am install-exec install-exec-am \
589 install-html install-html-am install-info install-info-am \
590 install-man install-pdf install-pdf-am install-ps \
591 install-ps-am install-strip installcheck installcheck-am \
592 installdirs installdirs-am maintainer-clean \
593 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
594 pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
595
596 # Tell versions [3.59,3.63) of GNU make to not export all variables.
597 # Otherwise a system limit (for SysV at least) may be exceeded.
598 .NOEXPORT:
+0
-176
README less more
0
1 __^__ __^__
2 ( ___ )---------------( ___ )
3 | / | battery-stats | \ |
4 |___| version 0.3.4 |___|
5 (_____)---------------(_____)
6
7 Copyright (C) 2003 Karl E. Jørgensen <karl@jorgensen.com>
8 Licensed under the GNU General Public License v2
9
10 Adapted by Antonio Radici <antonio@dyne.org> to include
11 libacpi and autotools support, see History for details
12
13
14 What is it?
15 ===========
16 Battery-stats is a simple utility for collecting statistics about the
17 laptop battery charge. Basically it will query APM at regular intervals
18 and write the results to a log file ; from version 0.3.4 it also includes
19 the ACPI support which can be enabled only on i386 and x86_64.
20
21 It also contains a simple plotting utility to show the battery charge over
22 time.
23
24 It does not (and will never) contain any graphical real-time "monitors" to
25 show the current state of the battery; lots of other utilities already do
26 this quite nicely.
27
28
29 Interpreting the Stats
30 ======================
31 First of all, I have no delusions of being a battery expert. This means
32 that I will not make any serious attempt at interpreting the stats.
33
34 What I know can be summed up as:
35
36 When batteries age, they will take longer and longer to recharge, and
37 will discharge quicker and quicker.
38
39 However, I suspect that the *shape* of the charge/discarge curves (and
40 the way the shape changes over several months) can tell something about the
41 battery health. Ultimately, it should be possible to figure out when the
42 battery will wear out and need replacement.
43
44 Hopefully somebody with some electrochemical knowledge can fill in the
45 (large) gaps of my knowledge here - I promise to give credit where credit
46 is due.
47
48 Note that several sorts of bugs can result in incorrect statistics. Such
49 bugs can be introduced in several ways:
50
51 - There are different ways of measuring "how full" a battery is.
52 Apparantly, it can be measured by the charging current. Such a
53 measurement has to be "calibrated" with knowledge of the battery
54 type (NiCad, LiIon etc), number of cells etc.
55
56 - Buggy APM bios'es.
57
58 - Buggy kernel APM. This I have not yet encountered, but in theory
59 it exists... It is best to make sure that you actually have APM
60 available from the kernel - and enabled at boot time.
61
62 - Bugs in this software. But that's really, really improbable ;-)
63
64
65 How this all started
66 ====================
67 As a laptop user, I found myself with ageing batteries. And my (buggy) APM
68 bios was far from accurate when it came to estimating how long I could run
69 before having to recharge.
70
71 I found other utilities out there that could help here - e.g. ibam @
72 ibam.sourceforge.net. These seem to work quite well with estimating how
73 long before the next recharge. Short-term stuff. But none of them could
74 tell me how the battery would perform over longer periods - weeks & months.
75 Even with this tool, I don't have much of an idea (!), but at least this
76 will make it possible for others to collect and interpret the statistics.
77
78 Besides, being a typical laptop user, I did not have a "feel" for how long
79 I *ought* to be able to go before a recharge - or how it had behaved in the
80 past. I needed statistics, graphs, software and my name in lights. So I
81 wrote this.
82
83
84 Getting it
85 ==========
86 It is available for dowload at:
87
88 http://karl.jorgensen.com/battery-stats
89
90 Newer versions can also be downlaoded at:
91
92 http://theforest.dyne.org/battery-stats
93
94 The debian packages are built based on the latter URL
95
96 Compiling it
97 ============
98 You will need:
99 - The sources
100 - An ANSI C compiler
101
102 - (required)
103 Headers for the apm library from the apmd utilities (written by Rik
104 Faith <faith@cs.unc.edu> and now maintained by Avery Pennarun
105 <apenwarr@worldvisions.ca>).
106 Allegedly, it can be gotten from
107 ftp://ftp.cs.unc.edu/pub/users/faith/unix/apmd-2.4.tar.gz
108
109 Debian GNU/Linux users should install the libapm-dev package.
110
111 - (optional)
112 Headers for the acpi library. They can be downloaded from
113 http://www.ngolde.de/libacpi.html
114
115 Debian GNU/Linux users should install the libacpi-dev package
116 if it is available for their architecture
117
118 - GNU make
119
120
121 Installing it
122 =============
123 Debian GNU/Linux users: Just apt-get install the .deb.
124 Everybody else: Read on and do it the hard way.
125
126 The hard way is not that complicated:
127 - Make sure that you have bash installed
128 - Make sure that you have libapm installed (from the apmd utilities
129 mentioned above), and the corresponding header files
130 - Make sure that you have gnuplot installed (only needed if you
131 actually want graphs)
132 - $ make install
133
134 To start the battery-stats-collector daemon at boot time, you will need to
135 set up an init script and the relevant links /etc/rc*.d directories. This
136 is all ready out-of-the-box for the Debian distribution.
137
138 To access the graph plotter from the X desktop you will need to set up a
139 menu item or launcher to launch /usr/bin/battery-graph. This is already
140 set up for the Debian distribution.
141
142 There are no provisions for stopping the log file from growing too much
143 (unless you are running ... yes! you guessed it: Debian GNU/Linux!). Use
144 of logrotate is recommended.
145
146
147 Copyright
148 =========
149 Please see the COPYING file in this directory.
150
151
152 Bugs
153 ====
154 None yet!
155
156 Please report any bugs you find to me:
157 karl@jorgensen.com
158
159 Bugs related to the debian package should be reported to:
160 http://bugs.debian.org/battery-stats
161
162 Warranty
163 ========
164 Sorry for the legalese blurb. Quick summary: "CMA" ...
165
166 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
167 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
168 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
169 THE AUTHOR(S) OR ANY DISTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
170 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
171 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
172 DEALINGS IN THE SOFTWARE.
173
174
175 -- vim:set textwidth=75 autoindent:
0
1 __^__ __^__
2 ( ___ )---------------( ___ )
3 | / | battery-stats | \ |
4 |___| |___|
5 (_____)---------------(_____)
6
7 Copyright (C) 2003 Karl E. Jørgensen <karl@jorgensen.com>
8 Copyright (C) 2012 Kevin Funk <kevin@kfunk.org>
9 Licensed under the GNU General Public License v2
10 Copyright (C) 2016 Petter Reinholdtsen <pere@hungry.com>
11
12
13 What is it?
14 ===========
15 Battery-stats is a simple utility for collecting statistics about the
16 laptop battery charge. Basically it will query ACPI at regular intervals
17 and write the results to a log file.
18
19 It also contains a simple plotting utility to show the battery charge over
20 time.
21
22 It does not (and will never) contain any graphical real-time "monitors" to
23 show the current state of the battery; lots of other utilities already do
24 this quite nicely.
25
26
27 Interpreting the Stats
28 ======================
29 First of all, I have no delusions of being a battery expert. This means
30 that I will not make any serious attempt at interpreting the stats.
31
32 What I know can be summed up as:
33
34 When batteries age, they will take longer and longer to recharge, and
35 will discharge quicker and quicker.
36
37 However, I suspect that the *shape* of the charge/discarge curves (and
38 the way the shape changes over several months) can tell something about the
39 battery health. Ultimately, it should be possible to figure out when the
40 battery will wear out and need replacement.
41
42 Hopefully somebody with some electrochemical knowledge can fill in the
43 (large) gaps of my knowledge here - I promise to give credit where credit
44 is due.
45
46 Note that several sorts of bugs can result in incorrect statistics. Such
47 bugs can be introduced in several ways:
48
49 * There are different ways of measuring "how full" a battery is.
50 Apparantly, it can be measured by the charging current. Such a
51 measurement has to be "calibrated" with knowledge of the battery
52 type (NiCad, LiIon etc), number of cells etc.
53
54 * Buggy ACPI bios'es.
55
56 * Buggy kernel ACPI. This I have not yet encountered, but in theory
57 it exists... It is best to make sure that you actually have ACPI
58 available from the kernel - and enabled at boot time.
59
60 * Bugs in this software. But that's really, really improbable ;-)
61
62
63 How this all started
64 ====================
65 As a laptop user, I found myself with ageing batteries. And my (buggy) APM
66 bios was far from accurate when it came to estimating how long I could run
67 before having to recharge.
68
69 I found other utilities out there that could help here - e.g. ibam @
70 ibam.sourceforge.net. These seem to work quite well with estimating how
71 long before the next recharge. Short-term stuff. But none of them could
72 tell me how the battery would perform over longer periods - weeks & months.
73 Even with this tool, I don't have much of an idea (!), but at least this
74 will make it possible for others to collect and interpret the statistics.
75
76 Besides, being a typical laptop user, I did not have a "feel" for how long
77 I *ought* to be able to go before a recharge - or how it had behaved in the
78 past. I needed statistics, graphs, software and my name in lights. So I
79 wrote this.
80
81
82 Getting it
83 ==========
84 It is available for download at:
85 https://github.com/petterreinholdtsen/battery-status
86
87 Compiling it
88 ============
89 You will need:
90
91 * The sources
92 * CMake
93 * GNU make
94
95 Installing it
96 =============
97 Debian GNU/Linux users: Just apt-get install the .deb.
98 Everybody else: Read on and do it the hard way.
99
100 The hard way is not that complicated:
101 - Make sure that you have bash installed
102 - Make sure that you have gnuplot installed (only needed if you
103 actually want graphs)
104 - $ cmake .; make install
105
106 To start the battery-stats-collector daemon at boot time, you will need to
107 set up an init script and the relevant links /etc/rc*.d directories. This
108 is all ready out-of-the-box for the Debian distribution.
109
110 To access the graph plotter from the X desktop you will need to set up a
111 menu item or launcher to launch /usr/bin/battery-graph. This is already
112 set up for the Debian distribution.
113
114 There are no provisions for stopping the log file from growing too much
115 (unless you are running ... yes! you guessed it: Debian GNU/Linux!). Use
116 of logrotate is recommended.
117
118
119 Copyright
120 =========
121 Please see the COPYING file in this directory.
122
123
124 Bugs
125 ====
126 None yet!
127
128 Please report any bugs you find to:
129 https://github.com/petterreinholdtsen/battery-status
130
131 Bugs related to the debian package should be reported to:
132 http://bugs.debian.org/battery-stats
133
134 Warranty
135 ========
136 Sorry for the legalese blurb. Quick summary: "CMA" ...
137
138 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
139 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
140 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
141 THE AUTHOR(S) OR ANY DISTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
142 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
143 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
144 DEALINGS IN THE SOFTWARE.
145
146
147 <!-- vim:set textwidth=75 autoindent: -->
22
33 Please don't report bugs which are already mentioned in here, unless you
44 can add more information - or even better: a patch.
5
6
7 Force battery-stats-collector to flush output to file
8 =====================================================
9 Since battery-stats-collector now flushes data to file much more rarely,
10 the data in the file can be seen to "lag". This affects battery-graph, and
11 makes it appear that battery-stats for the last few minutes are missing.
12
13 It would be nice to be able to *force* battery-stats-collector to flush its
14 buffer first.
15
16
17 Missing options on battery-graph
18 ================================
19 battery-graph does not understand the --help and --version options, like
20 most GNU programs.
21
22
23 battery-stats-collector --help misleading
24 =========================================
25 battery-stats-collector --help does not show which options take parameters
26 and which do not. It really should.
275
286
297 Different colours on the graph depending on battery state
4523
4624 to better control what is displayed.
4725
26
4827 Split into more packages
4928 ========================
5029 It is quite conceivable that somebody wants to collect battery statistics
5938 having to pull in libapm - most servers have little use for apm.
6039
6140 Packages:
62 battery-stats-collector - the collector, depends on libapm
41 battery-stats-collector - the collector
6342 battery-stats-grapher - the grapher, depends on gnuplot
6443 battery-stats - metapackage, depends on the two above.
6544
+0
-868
aclocal.m4 less more
0 # generated automatically by aclocal 1.10.1 -*- Autoconf -*-
1
2 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
3 # 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
4 # This file is free software; the Free Software Foundation
5 # gives unlimited permission to copy and/or distribute it,
6 # with or without modifications, as long as this notice is preserved.
7
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11 # PARTICULAR PURPOSE.
12
13 m4_ifndef([AC_AUTOCONF_VERSION],
14 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
15 m4_if(AC_AUTOCONF_VERSION, [2.61],,
16 [m4_warning([this file was generated for autoconf 2.61.
17 You have another version of autoconf. It may work, but is not guaranteed to.
18 If you have problems, you may need to regenerate the build system entirely.
19 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
22 #
23 # This file is free software; the Free Software Foundation
24 # gives unlimited permission to copy and/or distribute it,
25 # with or without modifications, as long as this notice is preserved.
26
27 # AM_AUTOMAKE_VERSION(VERSION)
28 # ----------------------------
29 # Automake X.Y traces this macro to ensure aclocal.m4 has been
30 # generated from the m4 files accompanying Automake X.Y.
31 # (This private macro should not be called outside this file.)
32 AC_DEFUN([AM_AUTOMAKE_VERSION],
33 [am__api_version='1.10'
34 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
35 dnl require some minimum version. Point them to the right macro.
36 m4_if([$1], [1.10.1], [],
37 [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
38 ])
39
40 # _AM_AUTOCONF_VERSION(VERSION)
41 # -----------------------------
42 # aclocal traces this macro to find the Autoconf version.
43 # This is a private macro too. Using m4_define simplifies
44 # the logic in aclocal, which can simply ignore this definition.
45 m4_define([_AM_AUTOCONF_VERSION], [])
46
47 # AM_SET_CURRENT_AUTOMAKE_VERSION
48 # -------------------------------
49 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
50 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
51 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
52 [AM_AUTOMAKE_VERSION([1.10.1])dnl
53 m4_ifndef([AC_AUTOCONF_VERSION],
54 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
55 _AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
56
57 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
58
59 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
60 #
61 # This file is free software; the Free Software Foundation
62 # gives unlimited permission to copy and/or distribute it,
63 # with or without modifications, as long as this notice is preserved.
64
65 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
66 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
67 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
68 #
69 # Of course, Automake must honor this variable whenever it calls a
70 # tool from the auxiliary directory. The problem is that $srcdir (and
71 # therefore $ac_aux_dir as well) can be either absolute or relative,
72 # depending on how configure is run. This is pretty annoying, since
73 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
74 # source directory, any form will work fine, but in subdirectories a
75 # relative path needs to be adjusted first.
76 #
77 # $ac_aux_dir/missing
78 # fails when called from a subdirectory if $ac_aux_dir is relative
79 # $top_srcdir/$ac_aux_dir/missing
80 # fails if $ac_aux_dir is absolute,
81 # fails when called from a subdirectory in a VPATH build with
82 # a relative $ac_aux_dir
83 #
84 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
85 # are both prefixed by $srcdir. In an in-source build this is usually
86 # harmless because $srcdir is `.', but things will broke when you
87 # start a VPATH build or use an absolute $srcdir.
88 #
89 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
90 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
91 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
92 # and then we would define $MISSING as
93 # MISSING="\${SHELL} $am_aux_dir/missing"
94 # This will work as long as MISSING is not called from configure, because
95 # unfortunately $(top_srcdir) has no meaning in configure.
96 # However there are other variables, like CC, which are often used in
97 # configure, and could therefore not use this "fixed" $ac_aux_dir.
98 #
99 # Another solution, used here, is to always expand $ac_aux_dir to an
100 # absolute PATH. The drawback is that using absolute paths prevent a
101 # configured tree to be moved without reconfiguration.
102
103 AC_DEFUN([AM_AUX_DIR_EXPAND],
104 [dnl Rely on autoconf to set up CDPATH properly.
105 AC_PREREQ([2.50])dnl
106 # expand $ac_aux_dir to an absolute path
107 am_aux_dir=`cd $ac_aux_dir && pwd`
108 ])
109
110 # AM_CONDITIONAL -*- Autoconf -*-
111
112 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
113 # Free Software Foundation, Inc.
114 #
115 # This file is free software; the Free Software Foundation
116 # gives unlimited permission to copy and/or distribute it,
117 # with or without modifications, as long as this notice is preserved.
118
119 # serial 8
120
121 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
122 # -------------------------------------
123 # Define a conditional.
124 AC_DEFUN([AM_CONDITIONAL],
125 [AC_PREREQ(2.52)dnl
126 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
127 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
128 AC_SUBST([$1_TRUE])dnl
129 AC_SUBST([$1_FALSE])dnl
130 _AM_SUBST_NOTMAKE([$1_TRUE])dnl
131 _AM_SUBST_NOTMAKE([$1_FALSE])dnl
132 if $2; then
133 $1_TRUE=
134 $1_FALSE='#'
135 else
136 $1_TRUE='#'
137 $1_FALSE=
138 fi
139 AC_CONFIG_COMMANDS_PRE(
140 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
141 AC_MSG_ERROR([[conditional "$1" was never defined.
142 Usually this means the macro was only invoked conditionally.]])
143 fi])])
144
145 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
146 # Free Software Foundation, Inc.
147 #
148 # This file is free software; the Free Software Foundation
149 # gives unlimited permission to copy and/or distribute it,
150 # with or without modifications, as long as this notice is preserved.
151
152 # serial 9
153
154 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
155 # written in clear, in which case automake, when reading aclocal.m4,
156 # will think it sees a *use*, and therefore will trigger all it's
157 # C support machinery. Also note that it means that autoscan, seeing
158 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
159
160
161 # _AM_DEPENDENCIES(NAME)
162 # ----------------------
163 # See how the compiler implements dependency checking.
164 # NAME is "CC", "CXX", "GCJ", or "OBJC".
165 # We try a few techniques and use that to set a single cache variable.
166 #
167 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
168 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
169 # dependency, and given that the user is not expected to run this macro,
170 # just rely on AC_PROG_CC.
171 AC_DEFUN([_AM_DEPENDENCIES],
172 [AC_REQUIRE([AM_SET_DEPDIR])dnl
173 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
174 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
175 AC_REQUIRE([AM_DEP_TRACK])dnl
176
177 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
178 [$1], CXX, [depcc="$CXX" am_compiler_list=],
179 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
180 [$1], UPC, [depcc="$UPC" am_compiler_list=],
181 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
182 [depcc="$$1" am_compiler_list=])
183
184 AC_CACHE_CHECK([dependency style of $depcc],
185 [am_cv_$1_dependencies_compiler_type],
186 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
187 # We make a subdir and do the tests there. Otherwise we can end up
188 # making bogus files that we don't know about and never remove. For
189 # instance it was reported that on HP-UX the gcc test will end up
190 # making a dummy file named `D' -- because `-MD' means `put the output
191 # in D'.
192 mkdir conftest.dir
193 # Copy depcomp to subdir because otherwise we won't find it if we're
194 # using a relative directory.
195 cp "$am_depcomp" conftest.dir
196 cd conftest.dir
197 # We will build objects and dependencies in a subdirectory because
198 # it helps to detect inapplicable dependency modes. For instance
199 # both Tru64's cc and ICC support -MD to output dependencies as a
200 # side effect of compilation, but ICC will put the dependencies in
201 # the current directory while Tru64 will put them in the object
202 # directory.
203 mkdir sub
204
205 am_cv_$1_dependencies_compiler_type=none
206 if test "$am_compiler_list" = ""; then
207 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
208 fi
209 for depmode in $am_compiler_list; do
210 # Setup a source with many dependencies, because some compilers
211 # like to wrap large dependency lists on column 80 (with \), and
212 # we should not choose a depcomp mode which is confused by this.
213 #
214 # We need to recreate these files for each test, as the compiler may
215 # overwrite some of them when testing with obscure command lines.
216 # This happens at least with the AIX C compiler.
217 : > sub/conftest.c
218 for i in 1 2 3 4 5 6; do
219 echo '#include "conftst'$i'.h"' >> sub/conftest.c
220 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
221 # Solaris 8's {/usr,}/bin/sh.
222 touch sub/conftst$i.h
223 done
224 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
225
226 case $depmode in
227 nosideeffect)
228 # after this tag, mechanisms are not by side-effect, so they'll
229 # only be used when explicitly requested
230 if test "x$enable_dependency_tracking" = xyes; then
231 continue
232 else
233 break
234 fi
235 ;;
236 none) break ;;
237 esac
238 # We check with `-c' and `-o' for the sake of the "dashmstdout"
239 # mode. It turns out that the SunPro C++ compiler does not properly
240 # handle `-M -o', and we need to detect this.
241 if depmode=$depmode \
242 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
243 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
244 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
245 >/dev/null 2>conftest.err &&
246 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
247 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
248 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
249 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
250 # icc doesn't choke on unknown options, it will just issue warnings
251 # or remarks (even with -Werror). So we grep stderr for any message
252 # that says an option was ignored or not supported.
253 # When given -MP, icc 7.0 and 7.1 complain thusly:
254 # icc: Command line warning: ignoring option '-M'; no argument required
255 # The diagnosis changed in icc 8.0:
256 # icc: Command line remark: option '-MP' not supported
257 if (grep 'ignoring option' conftest.err ||
258 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
259 am_cv_$1_dependencies_compiler_type=$depmode
260 break
261 fi
262 fi
263 done
264
265 cd ..
266 rm -rf conftest.dir
267 else
268 am_cv_$1_dependencies_compiler_type=none
269 fi
270 ])
271 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
272 AM_CONDITIONAL([am__fastdep$1], [
273 test "x$enable_dependency_tracking" != xno \
274 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
275 ])
276
277
278 # AM_SET_DEPDIR
279 # -------------
280 # Choose a directory name for dependency files.
281 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
282 AC_DEFUN([AM_SET_DEPDIR],
283 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
284 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
285 ])
286
287
288 # AM_DEP_TRACK
289 # ------------
290 AC_DEFUN([AM_DEP_TRACK],
291 [AC_ARG_ENABLE(dependency-tracking,
292 [ --disable-dependency-tracking speeds up one-time build
293 --enable-dependency-tracking do not reject slow dependency extractors])
294 if test "x$enable_dependency_tracking" != xno; then
295 am_depcomp="$ac_aux_dir/depcomp"
296 AMDEPBACKSLASH='\'
297 fi
298 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
299 AC_SUBST([AMDEPBACKSLASH])dnl
300 _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
301 ])
302
303 # Generate code to set up dependency tracking. -*- Autoconf -*-
304
305 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
306 # Free Software Foundation, Inc.
307 #
308 # This file is free software; the Free Software Foundation
309 # gives unlimited permission to copy and/or distribute it,
310 # with or without modifications, as long as this notice is preserved.
311
312 #serial 3
313
314 # _AM_OUTPUT_DEPENDENCY_COMMANDS
315 # ------------------------------
316 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
317 [for mf in $CONFIG_FILES; do
318 # Strip MF so we end up with the name of the file.
319 mf=`echo "$mf" | sed -e 's/:.*$//'`
320 # Check whether this is an Automake generated Makefile or not.
321 # We used to match only the files named `Makefile.in', but
322 # some people rename them; so instead we look at the file content.
323 # Grep'ing the first line is not enough: some people post-process
324 # each Makefile.in and add a new line on top of each file to say so.
325 # Grep'ing the whole file is not good either: AIX grep has a line
326 # limit of 2048, but all sed's we know have understand at least 4000.
327 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
328 dirpart=`AS_DIRNAME("$mf")`
329 else
330 continue
331 fi
332 # Extract the definition of DEPDIR, am__include, and am__quote
333 # from the Makefile without running `make'.
334 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
335 test -z "$DEPDIR" && continue
336 am__include=`sed -n 's/^am__include = //p' < "$mf"`
337 test -z "am__include" && continue
338 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
339 # When using ansi2knr, U may be empty or an underscore; expand it
340 U=`sed -n 's/^U = //p' < "$mf"`
341 # Find all dependency output files, they are included files with
342 # $(DEPDIR) in their names. We invoke sed twice because it is the
343 # simplest approach to changing $(DEPDIR) to its actual value in the
344 # expansion.
345 for file in `sed -n "
346 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
347 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
348 # Make sure the directory exists.
349 test -f "$dirpart/$file" && continue
350 fdir=`AS_DIRNAME(["$file"])`
351 AS_MKDIR_P([$dirpart/$fdir])
352 # echo "creating $dirpart/$file"
353 echo '# dummy' > "$dirpart/$file"
354 done
355 done
356 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
357
358
359 # AM_OUTPUT_DEPENDENCY_COMMANDS
360 # -----------------------------
361 # This macro should only be invoked once -- use via AC_REQUIRE.
362 #
363 # This code is only required when automatic dependency tracking
364 # is enabled. FIXME. This creates each `.P' file that we will
365 # need in order to bootstrap the dependency handling code.
366 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
367 [AC_CONFIG_COMMANDS([depfiles],
368 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
369 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
370 ])
371
372 # Do all the work for Automake. -*- Autoconf -*-
373
374 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
375 # 2005, 2006, 2008 Free Software Foundation, Inc.
376 #
377 # This file is free software; the Free Software Foundation
378 # gives unlimited permission to copy and/or distribute it,
379 # with or without modifications, as long as this notice is preserved.
380
381 # serial 13
382
383 # This macro actually does too much. Some checks are only needed if
384 # your package does certain things. But this isn't really a big deal.
385
386 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
387 # AM_INIT_AUTOMAKE([OPTIONS])
388 # -----------------------------------------------
389 # The call with PACKAGE and VERSION arguments is the old style
390 # call (pre autoconf-2.50), which is being phased out. PACKAGE
391 # and VERSION should now be passed to AC_INIT and removed from
392 # the call to AM_INIT_AUTOMAKE.
393 # We support both call styles for the transition. After
394 # the next Automake release, Autoconf can make the AC_INIT
395 # arguments mandatory, and then we can depend on a new Autoconf
396 # release and drop the old call support.
397 AC_DEFUN([AM_INIT_AUTOMAKE],
398 [AC_PREREQ([2.60])dnl
399 dnl Autoconf wants to disallow AM_ names. We explicitly allow
400 dnl the ones we care about.
401 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
402 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
403 AC_REQUIRE([AC_PROG_INSTALL])dnl
404 if test "`cd $srcdir && pwd`" != "`pwd`"; then
405 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
406 # is not polluted with repeated "-I."
407 AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
408 # test to see if srcdir already configured
409 if test -f $srcdir/config.status; then
410 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
411 fi
412 fi
413
414 # test whether we have cygpath
415 if test -z "$CYGPATH_W"; then
416 if (cygpath --version) >/dev/null 2>/dev/null; then
417 CYGPATH_W='cygpath -w'
418 else
419 CYGPATH_W=echo
420 fi
421 fi
422 AC_SUBST([CYGPATH_W])
423
424 # Define the identity of the package.
425 dnl Distinguish between old-style and new-style calls.
426 m4_ifval([$2],
427 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
428 AC_SUBST([PACKAGE], [$1])dnl
429 AC_SUBST([VERSION], [$2])],
430 [_AM_SET_OPTIONS([$1])dnl
431 dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
432 m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
433 [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
434 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
435 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
436
437 _AM_IF_OPTION([no-define],,
438 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
439 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
440
441 # Some tools Automake needs.
442 AC_REQUIRE([AM_SANITY_CHECK])dnl
443 AC_REQUIRE([AC_ARG_PROGRAM])dnl
444 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
445 AM_MISSING_PROG(AUTOCONF, autoconf)
446 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
447 AM_MISSING_PROG(AUTOHEADER, autoheader)
448 AM_MISSING_PROG(MAKEINFO, makeinfo)
449 AM_PROG_INSTALL_SH
450 AM_PROG_INSTALL_STRIP
451 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
452 # We need awk for the "check" target. The system "awk" is bad on
453 # some platforms.
454 AC_REQUIRE([AC_PROG_AWK])dnl
455 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
456 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
457 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
458 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
459 [_AM_PROG_TAR([v7])])])
460 _AM_IF_OPTION([no-dependencies],,
461 [AC_PROVIDE_IFELSE([AC_PROG_CC],
462 [_AM_DEPENDENCIES(CC)],
463 [define([AC_PROG_CC],
464 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
465 AC_PROVIDE_IFELSE([AC_PROG_CXX],
466 [_AM_DEPENDENCIES(CXX)],
467 [define([AC_PROG_CXX],
468 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
469 AC_PROVIDE_IFELSE([AC_PROG_OBJC],
470 [_AM_DEPENDENCIES(OBJC)],
471 [define([AC_PROG_OBJC],
472 defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
473 ])
474 ])
475
476
477 # When config.status generates a header, we must update the stamp-h file.
478 # This file resides in the same directory as the config header
479 # that is generated. The stamp files are numbered to have different names.
480
481 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
482 # loop where config.status creates the headers, so we can generate
483 # our stamp files there.
484 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
485 [# Compute $1's index in $config_headers.
486 _am_arg=$1
487 _am_stamp_count=1
488 for _am_header in $config_headers :; do
489 case $_am_header in
490 $_am_arg | $_am_arg:* )
491 break ;;
492 * )
493 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
494 esac
495 done
496 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
497
498 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
499 #
500 # This file is free software; the Free Software Foundation
501 # gives unlimited permission to copy and/or distribute it,
502 # with or without modifications, as long as this notice is preserved.
503
504 # AM_PROG_INSTALL_SH
505 # ------------------
506 # Define $install_sh.
507 AC_DEFUN([AM_PROG_INSTALL_SH],
508 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
509 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
510 AC_SUBST(install_sh)])
511
512 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
513 #
514 # This file is free software; the Free Software Foundation
515 # gives unlimited permission to copy and/or distribute it,
516 # with or without modifications, as long as this notice is preserved.
517
518 # serial 2
519
520 # Check whether the underlying file-system supports filenames
521 # with a leading dot. For instance MS-DOS doesn't.
522 AC_DEFUN([AM_SET_LEADING_DOT],
523 [rm -rf .tst 2>/dev/null
524 mkdir .tst 2>/dev/null
525 if test -d .tst; then
526 am__leading_dot=.
527 else
528 am__leading_dot=_
529 fi
530 rmdir .tst 2>/dev/null
531 AC_SUBST([am__leading_dot])])
532
533 # Check to see how 'make' treats includes. -*- Autoconf -*-
534
535 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
536 #
537 # This file is free software; the Free Software Foundation
538 # gives unlimited permission to copy and/or distribute it,
539 # with or without modifications, as long as this notice is preserved.
540
541 # serial 3
542
543 # AM_MAKE_INCLUDE()
544 # -----------------
545 # Check to see how make treats includes.
546 AC_DEFUN([AM_MAKE_INCLUDE],
547 [am_make=${MAKE-make}
548 cat > confinc << 'END'
549 am__doit:
550 @echo done
551 .PHONY: am__doit
552 END
553 # If we don't find an include directive, just comment out the code.
554 AC_MSG_CHECKING([for style of include used by $am_make])
555 am__include="#"
556 am__quote=
557 _am_result=none
558 # First try GNU make style include.
559 echo "include confinc" > confmf
560 # We grep out `Entering directory' and `Leaving directory'
561 # messages which can occur if `w' ends up in MAKEFLAGS.
562 # In particular we don't look at `^make:' because GNU make might
563 # be invoked under some other name (usually "gmake"), in which
564 # case it prints its new name instead of `make'.
565 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
566 am__include=include
567 am__quote=
568 _am_result=GNU
569 fi
570 # Now try BSD make style include.
571 if test "$am__include" = "#"; then
572 echo '.include "confinc"' > confmf
573 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
574 am__include=.include
575 am__quote="\""
576 _am_result=BSD
577 fi
578 fi
579 AC_SUBST([am__include])
580 AC_SUBST([am__quote])
581 AC_MSG_RESULT([$_am_result])
582 rm -f confinc confmf
583 ])
584
585 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
586
587 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
588 # Free Software Foundation, Inc.
589 #
590 # This file is free software; the Free Software Foundation
591 # gives unlimited permission to copy and/or distribute it,
592 # with or without modifications, as long as this notice is preserved.
593
594 # serial 5
595
596 # AM_MISSING_PROG(NAME, PROGRAM)
597 # ------------------------------
598 AC_DEFUN([AM_MISSING_PROG],
599 [AC_REQUIRE([AM_MISSING_HAS_RUN])
600 $1=${$1-"${am_missing_run}$2"}
601 AC_SUBST($1)])
602
603
604 # AM_MISSING_HAS_RUN
605 # ------------------
606 # Define MISSING if not defined so far and test if it supports --run.
607 # If it does, set am_missing_run to use it, otherwise, to nothing.
608 AC_DEFUN([AM_MISSING_HAS_RUN],
609 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
610 AC_REQUIRE_AUX_FILE([missing])dnl
611 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
612 # Use eval to expand $SHELL
613 if eval "$MISSING --run true"; then
614 am_missing_run="$MISSING --run "
615 else
616 am_missing_run=
617 AC_MSG_WARN([`missing' script is too old or missing])
618 fi
619 ])
620
621 # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
622 #
623 # This file is free software; the Free Software Foundation
624 # gives unlimited permission to copy and/or distribute it,
625 # with or without modifications, as long as this notice is preserved.
626
627 # AM_PROG_MKDIR_P
628 # ---------------
629 # Check for `mkdir -p'.
630 AC_DEFUN([AM_PROG_MKDIR_P],
631 [AC_PREREQ([2.60])dnl
632 AC_REQUIRE([AC_PROG_MKDIR_P])dnl
633 dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
634 dnl while keeping a definition of mkdir_p for backward compatibility.
635 dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
636 dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
637 dnl Makefile.ins that do not define MKDIR_P, so we do our own
638 dnl adjustment using top_builddir (which is defined more often than
639 dnl MKDIR_P).
640 AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
641 case $mkdir_p in
642 [[\\/$]]* | ?:[[\\/]]*) ;;
643 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
644 esac
645 ])
646
647 # Helper functions for option handling. -*- Autoconf -*-
648
649 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
650 #
651 # This file is free software; the Free Software Foundation
652 # gives unlimited permission to copy and/or distribute it,
653 # with or without modifications, as long as this notice is preserved.
654
655 # serial 3
656
657 # _AM_MANGLE_OPTION(NAME)
658 # -----------------------
659 AC_DEFUN([_AM_MANGLE_OPTION],
660 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
661
662 # _AM_SET_OPTION(NAME)
663 # ------------------------------
664 # Set option NAME. Presently that only means defining a flag for this option.
665 AC_DEFUN([_AM_SET_OPTION],
666 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
667
668 # _AM_SET_OPTIONS(OPTIONS)
669 # ----------------------------------
670 # OPTIONS is a space-separated list of Automake options.
671 AC_DEFUN([_AM_SET_OPTIONS],
672 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
673
674 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
675 # -------------------------------------------
676 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
677 AC_DEFUN([_AM_IF_OPTION],
678 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
679
680 # Check to make sure that the build environment is sane. -*- Autoconf -*-
681
682 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
683 # Free Software Foundation, Inc.
684 #
685 # This file is free software; the Free Software Foundation
686 # gives unlimited permission to copy and/or distribute it,
687 # with or without modifications, as long as this notice is preserved.
688
689 # serial 4
690
691 # AM_SANITY_CHECK
692 # ---------------
693 AC_DEFUN([AM_SANITY_CHECK],
694 [AC_MSG_CHECKING([whether build environment is sane])
695 # Just in case
696 sleep 1
697 echo timestamp > conftest.file
698 # Do `set' in a subshell so we don't clobber the current shell's
699 # arguments. Must try -L first in case configure is actually a
700 # symlink; some systems play weird games with the mod time of symlinks
701 # (eg FreeBSD returns the mod time of the symlink's containing
702 # directory).
703 if (
704 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
705 if test "$[*]" = "X"; then
706 # -L didn't work.
707 set X `ls -t $srcdir/configure conftest.file`
708 fi
709 rm -f conftest.file
710 if test "$[*]" != "X $srcdir/configure conftest.file" \
711 && test "$[*]" != "X conftest.file $srcdir/configure"; then
712
713 # If neither matched, then we have a broken ls. This can happen
714 # if, for instance, CONFIG_SHELL is bash and it inherits a
715 # broken ls alias from the environment. This has actually
716 # happened. Such a system could not be considered "sane".
717 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
718 alias in your environment])
719 fi
720
721 test "$[2]" = conftest.file
722 )
723 then
724 # Ok.
725 :
726 else
727 AC_MSG_ERROR([newly created file is older than distributed files!
728 Check your system clock])
729 fi
730 AC_MSG_RESULT(yes)])
731
732 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
733 #
734 # This file is free software; the Free Software Foundation
735 # gives unlimited permission to copy and/or distribute it,
736 # with or without modifications, as long as this notice is preserved.
737
738 # AM_PROG_INSTALL_STRIP
739 # ---------------------
740 # One issue with vendor `install' (even GNU) is that you can't
741 # specify the program used to strip binaries. This is especially
742 # annoying in cross-compiling environments, where the build's strip
743 # is unlikely to handle the host's binaries.
744 # Fortunately install-sh will honor a STRIPPROG variable, so we
745 # always use install-sh in `make install-strip', and initialize
746 # STRIPPROG with the value of the STRIP variable (set by the user).
747 AC_DEFUN([AM_PROG_INSTALL_STRIP],
748 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
749 # Installed binaries are usually stripped using `strip' when the user
750 # run `make install-strip'. However `strip' might not be the right
751 # tool to use in cross-compilation environments, therefore Automake
752 # will honor the `STRIP' environment variable to overrule this program.
753 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
754 if test "$cross_compiling" != no; then
755 AC_CHECK_TOOL([STRIP], [strip], :)
756 fi
757 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
758 AC_SUBST([INSTALL_STRIP_PROGRAM])])
759
760 # Copyright (C) 2006 Free Software Foundation, Inc.
761 #
762 # This file is free software; the Free Software Foundation
763 # gives unlimited permission to copy and/or distribute it,
764 # with or without modifications, as long as this notice is preserved.
765
766 # _AM_SUBST_NOTMAKE(VARIABLE)
767 # ---------------------------
768 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
769 # This macro is traced by Automake.
770 AC_DEFUN([_AM_SUBST_NOTMAKE])
771
772 # Check how to create a tarball. -*- Autoconf -*-
773
774 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
775 #
776 # This file is free software; the Free Software Foundation
777 # gives unlimited permission to copy and/or distribute it,
778 # with or without modifications, as long as this notice is preserved.
779
780 # serial 2
781
782 # _AM_PROG_TAR(FORMAT)
783 # --------------------
784 # Check how to create a tarball in format FORMAT.
785 # FORMAT should be one of `v7', `ustar', or `pax'.
786 #
787 # Substitute a variable $(am__tar) that is a command
788 # writing to stdout a FORMAT-tarball containing the directory
789 # $tardir.
790 # tardir=directory && $(am__tar) > result.tar
791 #
792 # Substitute a variable $(am__untar) that extract such
793 # a tarball read from stdin.
794 # $(am__untar) < result.tar
795 AC_DEFUN([_AM_PROG_TAR],
796 [# Always define AMTAR for backward compatibility.
797 AM_MISSING_PROG([AMTAR], [tar])
798 m4_if([$1], [v7],
799 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
800 [m4_case([$1], [ustar],, [pax],,
801 [m4_fatal([Unknown tar format])])
802 AC_MSG_CHECKING([how to create a $1 tar archive])
803 # Loop over all known methods to create a tar archive until one works.
804 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
805 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
806 # Do not fold the above two line into one, because Tru64 sh and
807 # Solaris sh will not grok spaces in the rhs of `-'.
808 for _am_tool in $_am_tools
809 do
810 case $_am_tool in
811 gnutar)
812 for _am_tar in tar gnutar gtar;
813 do
814 AM_RUN_LOG([$_am_tar --version]) && break
815 done
816 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
817 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
818 am__untar="$_am_tar -xf -"
819 ;;
820 plaintar)
821 # Must skip GNU tar: if it does not support --format= it doesn't create
822 # ustar tarball either.
823 (tar --version) >/dev/null 2>&1 && continue
824 am__tar='tar chf - "$$tardir"'
825 am__tar_='tar chf - "$tardir"'
826 am__untar='tar xf -'
827 ;;
828 pax)
829 am__tar='pax -L -x $1 -w "$$tardir"'
830 am__tar_='pax -L -x $1 -w "$tardir"'
831 am__untar='pax -r'
832 ;;
833 cpio)
834 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
835 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
836 am__untar='cpio -i -H $1 -d'
837 ;;
838 none)
839 am__tar=false
840 am__tar_=false
841 am__untar=false
842 ;;
843 esac
844
845 # If the value was cached, stop now. We just wanted to have am__tar
846 # and am__untar set.
847 test -n "${am_cv_prog_tar_$1}" && break
848
849 # tar/untar a dummy directory, and stop if the command works
850 rm -rf conftest.dir
851 mkdir conftest.dir
852 echo GrepMe > conftest.dir/file
853 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
854 rm -rf conftest.dir
855 if test -s conftest.tar; then
856 AM_RUN_LOG([$am__untar <conftest.tar])
857 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
858 fi
859 done
860 rm -rf conftest.dir
861
862 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
863 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
864 AC_SUBST([am__tar])
865 AC_SUBST([am__untar])
866 ]) # _AM_PROG_TAR
867
0 #cmakedefine01 HAVE_APM_H
1 #cmakedefine01 HAVE_LIBACPI_H
2
3 #cmakedefine VERSION_STRING "@VERSION_STRING@"
4 #cmakedefine01 WANT_ACPI
+0
-80
config.h.in less more
0 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* Define to 1 if you have the <inttypes.h> header file. */
3 #undef HAVE_INTTYPES_H
4
5 /* Define to 1 if you have the <libacpi.h> header file. */
6 #undef HAVE_LIBACPI_H
7
8 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and
9 to 0 otherwise. */
10 #undef HAVE_MALLOC
11
12 /* Define to 1 if you have the <memory.h> header file. */
13 #undef HAVE_MEMORY_H
14
15 /* Define to 1 if you have the <stdint.h> header file. */
16 #undef HAVE_STDINT_H
17
18 /* Define to 1 if you have the <stdlib.h> header file. */
19 #undef HAVE_STDLIB_H
20
21 /* Define to 1 if you have the `strerror' function. */
22 #undef HAVE_STRERROR
23
24 /* Define to 1 if you have the <strings.h> header file. */
25 #undef HAVE_STRINGS_H
26
27 /* Define to 1 if you have the <string.h> header file. */
28 #undef HAVE_STRING_H
29
30 /* Define to 1 if you have the `strtol' function. */
31 #undef HAVE_STRTOL
32
33 /* Define to 1 if you have the <syslog.h> header file. */
34 #undef HAVE_SYSLOG_H
35
36 /* Define to 1 if you have the <sys/stat.h> header file. */
37 #undef HAVE_SYS_STAT_H
38
39 /* Define to 1 if you have the <sys/types.h> header file. */
40 #undef HAVE_SYS_TYPES_H
41
42 /* Define to 1 if you have the <unistd.h> header file. */
43 #undef HAVE_UNISTD_H
44
45 /* Name of package */
46 #undef PACKAGE
47
48 /* Define to the address where bug reports for this package should be sent. */
49 #undef PACKAGE_BUGREPORT
50
51 /* Define to the full name of this package. */
52 #undef PACKAGE_NAME
53
54 /* Define to the full name and version of this package. */
55 #undef PACKAGE_STRING
56
57 /* Define to the one symbol short name of this package. */
58 #undef PACKAGE_TARNAME
59
60 /* Define to the version of this package. */
61 #undef PACKAGE_VERSION
62
63 /* Define to 1 if you have the ANSI C header files. */
64 #undef STDC_HEADERS
65
66 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
67 #undef TM_IN_SYS_TIME
68
69 /* Version number of package */
70 #undef VERSION
71
72 /* Enabling ACPI support */
73 #undef WANT_ACPI
74
75 /* Define to empty if `const' does not conform to ANSI C. */
76 #undef const
77
78 /* Define to rpl_malloc if the replacement function should be used. */
79 #undef malloc
+0
-6278
configure less more
0 #! /bin/sh
1 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.61 for battery-stats 0.3.4.
3 #
4 # Report bugs to <battery-stats@dyne.org>.
5 #
6 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10 ## --------------------- ##
11 ## M4sh Initialization. ##
12 ## --------------------- ##
13
14 # Be more Bourne compatible
15 DUALCASE=1; export DUALCASE # for MKS sh
16 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17 emulate sh
18 NULLCMD=:
19 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20 # is contrary to our usage. Disable this feature.
21 alias -g '${1+"$@"}'='"$@"'
22 setopt NO_GLOB_SUBST
23 else
24 case `(set -o) 2>/dev/null` in
25 *posix*) set -o posix ;;
26 esac
27
28 fi
29
30
31
32
33 # PATH needs CR
34 # Avoid depending upon Character Ranges.
35 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
37 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
38 as_cr_digits='0123456789'
39 as_cr_alnum=$as_cr_Letters$as_cr_digits
40
41 # The user is always right.
42 if test "${PATH_SEPARATOR+set}" != set; then
43 echo "#! /bin/sh" >conf$$.sh
44 echo "exit 0" >>conf$$.sh
45 chmod +x conf$$.sh
46 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
47 PATH_SEPARATOR=';'
48 else
49 PATH_SEPARATOR=:
50 fi
51 rm -f conf$$.sh
52 fi
53
54 # Support unset when possible.
55 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
56 as_unset=unset
57 else
58 as_unset=false
59 fi
60
61
62 # IFS
63 # We need space, tab and new line, in precisely that order. Quoting is
64 # there to prevent editors from complaining about space-tab.
65 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
66 # splitting by setting IFS to empty value.)
67 as_nl='
68 '
69 IFS=" "" $as_nl"
70
71 # Find who we are. Look in the path if we contain no directory separator.
72 case $0 in
73 *[\\/]* ) as_myself=$0 ;;
74 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
75 for as_dir in $PATH
76 do
77 IFS=$as_save_IFS
78 test -z "$as_dir" && as_dir=.
79 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
80 done
81 IFS=$as_save_IFS
82
83 ;;
84 esac
85 # We did not find ourselves, most probably we were run as `sh COMMAND'
86 # in which case we are not to be found in the path.
87 if test "x$as_myself" = x; then
88 as_myself=$0
89 fi
90 if test ! -f "$as_myself"; then
91 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
92 { (exit 1); exit 1; }
93 fi
94
95 # Work around bugs in pre-3.0 UWIN ksh.
96 for as_var in ENV MAIL MAILPATH
97 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
98 done
99 PS1='$ '
100 PS2='> '
101 PS4='+ '
102
103 # NLS nuisances.
104 for as_var in \
105 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
106 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
107 LC_TELEPHONE LC_TIME
108 do
109 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
110 eval $as_var=C; export $as_var
111 else
112 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
113 fi
114 done
115
116 # Required to use basename.
117 if expr a : '\(a\)' >/dev/null 2>&1 &&
118 test "X`expr 00001 : '.*\(...\)'`" = X001; then
119 as_expr=expr
120 else
121 as_expr=false
122 fi
123
124 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
125 as_basename=basename
126 else
127 as_basename=false
128 fi
129
130
131 # Name of the executable.
132 as_me=`$as_basename -- "$0" ||
133 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
134 X"$0" : 'X\(//\)$' \| \
135 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
136 echo X/"$0" |
137 sed '/^.*\/\([^/][^/]*\)\/*$/{
138 s//\1/
139 q
140 }
141 /^X\/\(\/\/\)$/{
142 s//\1/
143 q
144 }
145 /^X\/\(\/\).*/{
146 s//\1/
147 q
148 }
149 s/.*/./; q'`
150
151 # CDPATH.
152 $as_unset CDPATH
153
154
155 if test "x$CONFIG_SHELL" = x; then
156 if (eval ":") 2>/dev/null; then
157 as_have_required=yes
158 else
159 as_have_required=no
160 fi
161
162 if test $as_have_required = yes && (eval ":
163 (as_func_return () {
164 (exit \$1)
165 }
166 as_func_success () {
167 as_func_return 0
168 }
169 as_func_failure () {
170 as_func_return 1
171 }
172 as_func_ret_success () {
173 return 0
174 }
175 as_func_ret_failure () {
176 return 1
177 }
178
179 exitcode=0
180 if as_func_success; then
181 :
182 else
183 exitcode=1
184 echo as_func_success failed.
185 fi
186
187 if as_func_failure; then
188 exitcode=1
189 echo as_func_failure succeeded.
190 fi
191
192 if as_func_ret_success; then
193 :
194 else
195 exitcode=1
196 echo as_func_ret_success failed.
197 fi
198
199 if as_func_ret_failure; then
200 exitcode=1
201 echo as_func_ret_failure succeeded.
202 fi
203
204 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
205 :
206 else
207 exitcode=1
208 echo positional parameters were not saved.
209 fi
210
211 test \$exitcode = 0) || { (exit 1); exit 1; }
212
213 (
214 as_lineno_1=\$LINENO
215 as_lineno_2=\$LINENO
216 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
217 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
218 ") 2> /dev/null; then
219 :
220 else
221 as_candidate_shells=
222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
223 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
224 do
225 IFS=$as_save_IFS
226 test -z "$as_dir" && as_dir=.
227 case $as_dir in
228 /*)
229 for as_base in sh bash ksh sh5; do
230 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
231 done;;
232 esac
233 done
234 IFS=$as_save_IFS
235
236
237 for as_shell in $as_candidate_shells $SHELL; do
238 # Try only shells that exist, to save several forks.
239 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
240 { ("$as_shell") 2> /dev/null <<\_ASEOF
241 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
242 emulate sh
243 NULLCMD=:
244 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
245 # is contrary to our usage. Disable this feature.
246 alias -g '${1+"$@"}'='"$@"'
247 setopt NO_GLOB_SUBST
248 else
249 case `(set -o) 2>/dev/null` in
250 *posix*) set -o posix ;;
251 esac
252
253 fi
254
255
256 :
257 _ASEOF
258 }; then
259 CONFIG_SHELL=$as_shell
260 as_have_required=yes
261 if { "$as_shell" 2> /dev/null <<\_ASEOF
262 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263 emulate sh
264 NULLCMD=:
265 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
266 # is contrary to our usage. Disable this feature.
267 alias -g '${1+"$@"}'='"$@"'
268 setopt NO_GLOB_SUBST
269 else
270 case `(set -o) 2>/dev/null` in
271 *posix*) set -o posix ;;
272 esac
273
274 fi
275
276
277 :
278 (as_func_return () {
279 (exit $1)
280 }
281 as_func_success () {
282 as_func_return 0
283 }
284 as_func_failure () {
285 as_func_return 1
286 }
287 as_func_ret_success () {
288 return 0
289 }
290 as_func_ret_failure () {
291 return 1
292 }
293
294 exitcode=0
295 if as_func_success; then
296 :
297 else
298 exitcode=1
299 echo as_func_success failed.
300 fi
301
302 if as_func_failure; then
303 exitcode=1
304 echo as_func_failure succeeded.
305 fi
306
307 if as_func_ret_success; then
308 :
309 else
310 exitcode=1
311 echo as_func_ret_success failed.
312 fi
313
314 if as_func_ret_failure; then
315 exitcode=1
316 echo as_func_ret_failure succeeded.
317 fi
318
319 if ( set x; as_func_ret_success y && test x = "$1" ); then
320 :
321 else
322 exitcode=1
323 echo positional parameters were not saved.
324 fi
325
326 test $exitcode = 0) || { (exit 1); exit 1; }
327
328 (
329 as_lineno_1=$LINENO
330 as_lineno_2=$LINENO
331 test "x$as_lineno_1" != "x$as_lineno_2" &&
332 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
333
334 _ASEOF
335 }; then
336 break
337 fi
338
339 fi
340
341 done
342
343 if test "x$CONFIG_SHELL" != x; then
344 for as_var in BASH_ENV ENV
345 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
346 done
347 export CONFIG_SHELL
348 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
349 fi
350
351
352 if test $as_have_required = no; then
353 echo This script requires a shell more modern than all the
354 echo shells that I found on your system. Please install a
355 echo modern shell, or manually run the script under such a
356 echo shell if you do have one.
357 { (exit 1); exit 1; }
358 fi
359
360
361 fi
362
363 fi
364
365
366
367 (eval "as_func_return () {
368 (exit \$1)
369 }
370 as_func_success () {
371 as_func_return 0
372 }
373 as_func_failure () {
374 as_func_return 1
375 }
376 as_func_ret_success () {
377 return 0
378 }
379 as_func_ret_failure () {
380 return 1
381 }
382
383 exitcode=0
384 if as_func_success; then
385 :
386 else
387 exitcode=1
388 echo as_func_success failed.
389 fi
390
391 if as_func_failure; then
392 exitcode=1
393 echo as_func_failure succeeded.
394 fi
395
396 if as_func_ret_success; then
397 :
398 else
399 exitcode=1
400 echo as_func_ret_success failed.
401 fi
402
403 if as_func_ret_failure; then
404 exitcode=1
405 echo as_func_ret_failure succeeded.
406 fi
407
408 if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
409 :
410 else
411 exitcode=1
412 echo positional parameters were not saved.
413 fi
414
415 test \$exitcode = 0") || {
416 echo No shell found that supports shell functions.
417 echo Please tell autoconf@gnu.org about your system,
418 echo including any error possibly output before this
419 echo message
420 }
421
422
423
424 as_lineno_1=$LINENO
425 as_lineno_2=$LINENO
426 test "x$as_lineno_1" != "x$as_lineno_2" &&
427 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
428
429 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
430 # uniformly replaced by the line number. The first 'sed' inserts a
431 # line-number line after each line using $LINENO; the second 'sed'
432 # does the real work. The second script uses 'N' to pair each
433 # line-number line with the line containing $LINENO, and appends
434 # trailing '-' during substitution so that $LINENO is not a special
435 # case at line end.
436 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
437 # scripts with optimization help from Paolo Bonzini. Blame Lee
438 # E. McMahon (1931-1989) for sed's syntax. :-)
439 sed -n '
440 p
441 /[$]LINENO/=
442 ' <$as_myself |
443 sed '
444 s/[$]LINENO.*/&-/
445 t lineno
446 b
447 :lineno
448 N
449 :loop
450 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
451 t loop
452 s/-\n.*//
453 ' >$as_me.lineno &&
454 chmod +x "$as_me.lineno" ||
455 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
456 { (exit 1); exit 1; }; }
457
458 # Don't try to exec as it changes $[0], causing all sort of problems
459 # (the dirname of $[0] is not the place where we might find the
460 # original and so on. Autoconf is especially sensitive to this).
461 . "./$as_me.lineno"
462 # Exit status is that of the last command.
463 exit
464 }
465
466
467 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
468 as_dirname=dirname
469 else
470 as_dirname=false
471 fi
472
473 ECHO_C= ECHO_N= ECHO_T=
474 case `echo -n x` in
475 -n*)
476 case `echo 'x\c'` in
477 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
478 *) ECHO_C='\c';;
479 esac;;
480 *)
481 ECHO_N='-n';;
482 esac
483
484 if expr a : '\(a\)' >/dev/null 2>&1 &&
485 test "X`expr 00001 : '.*\(...\)'`" = X001; then
486 as_expr=expr
487 else
488 as_expr=false
489 fi
490
491 rm -f conf$$ conf$$.exe conf$$.file
492 if test -d conf$$.dir; then
493 rm -f conf$$.dir/conf$$.file
494 else
495 rm -f conf$$.dir
496 mkdir conf$$.dir
497 fi
498 echo >conf$$.file
499 if ln -s conf$$.file conf$$ 2>/dev/null; then
500 as_ln_s='ln -s'
501 # ... but there are two gotchas:
502 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
503 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
504 # In both cases, we have to default to `cp -p'.
505 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
506 as_ln_s='cp -p'
507 elif ln conf$$.file conf$$ 2>/dev/null; then
508 as_ln_s=ln
509 else
510 as_ln_s='cp -p'
511 fi
512 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
513 rmdir conf$$.dir 2>/dev/null
514
515 if mkdir -p . 2>/dev/null; then
516 as_mkdir_p=:
517 else
518 test -d ./-p && rmdir ./-p
519 as_mkdir_p=false
520 fi
521
522 if test -x / >/dev/null 2>&1; then
523 as_test_x='test -x'
524 else
525 if ls -dL / >/dev/null 2>&1; then
526 as_ls_L_option=L
527 else
528 as_ls_L_option=
529 fi
530 as_test_x='
531 eval sh -c '\''
532 if test -d "$1"; then
533 test -d "$1/.";
534 else
535 case $1 in
536 -*)set "./$1";;
537 esac;
538 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
539 ???[sx]*):;;*)false;;esac;fi
540 '\'' sh
541 '
542 fi
543 as_executable_p=$as_test_x
544
545 # Sed expression to map a string onto a valid CPP name.
546 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
547
548 # Sed expression to map a string onto a valid variable name.
549 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
550
551
552
553 exec 7<&0 </dev/null 6>&1
554
555 # Name of the host.
556 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
557 # so uname gets run too.
558 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
559
560 #
561 # Initializations.
562 #
563 ac_default_prefix=/usr/local
564 ac_clean_files=
565 ac_config_libobj_dir=.
566 LIBOBJS=
567 cross_compiling=no
568 subdirs=
569 MFLAGS=
570 MAKEFLAGS=
571 SHELL=${CONFIG_SHELL-/bin/sh}
572
573 # Identity of this package.
574 PACKAGE_NAME='battery-stats'
575 PACKAGE_TARNAME='battery-stats'
576 PACKAGE_VERSION='0.3.4'
577 PACKAGE_STRING='battery-stats 0.3.4'
578 PACKAGE_BUGREPORT='battery-stats@dyne.org'
579
580 # Factoring default headers for most tests.
581 ac_includes_default="\
582 #include <stdio.h>
583 #ifdef HAVE_SYS_TYPES_H
584 # include <sys/types.h>
585 #endif
586 #ifdef HAVE_SYS_STAT_H
587 # include <sys/stat.h>
588 #endif
589 #ifdef STDC_HEADERS
590 # include <stdlib.h>
591 # include <stddef.h>
592 #else
593 # ifdef HAVE_STDLIB_H
594 # include <stdlib.h>
595 # endif
596 #endif
597 #ifdef HAVE_STRING_H
598 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
599 # include <memory.h>
600 # endif
601 # include <string.h>
602 #endif
603 #ifdef HAVE_STRINGS_H
604 # include <strings.h>
605 #endif
606 #ifdef HAVE_INTTYPES_H
607 # include <inttypes.h>
608 #endif
609 #ifdef HAVE_STDINT_H
610 # include <stdint.h>
611 #endif
612 #ifdef HAVE_UNISTD_H
613 # include <unistd.h>
614 #endif"
615
616 ac_subst_vars='SHELL
617 PATH_SEPARATOR
618 PACKAGE_NAME
619 PACKAGE_TARNAME
620 PACKAGE_VERSION
621 PACKAGE_STRING
622 PACKAGE_BUGREPORT
623 exec_prefix
624 prefix
625 program_transform_name
626 bindir
627 sbindir
628 libexecdir
629 datarootdir
630 datadir
631 sysconfdir
632 sharedstatedir
633 localstatedir
634 includedir
635 oldincludedir
636 docdir
637 infodir
638 htmldir
639 dvidir
640 pdfdir
641 psdir
642 libdir
643 localedir
644 mandir
645 DEFS
646 ECHO_C
647 ECHO_N
648 ECHO_T
649 LIBS
650 build_alias
651 host_alias
652 target_alias
653 INSTALL_PROGRAM
654 INSTALL_SCRIPT
655 INSTALL_DATA
656 am__isrc
657 CYGPATH_W
658 PACKAGE
659 VERSION
660 ACLOCAL
661 AUTOCONF
662 AUTOMAKE
663 AUTOHEADER
664 MAKEINFO
665 install_sh
666 STRIP
667 INSTALL_STRIP_PROGRAM
668 mkdir_p
669 AWK
670 SET_MAKE
671 am__leading_dot
672 AMTAR
673 am__tar
674 am__untar
675 CC
676 CFLAGS
677 LDFLAGS
678 CPPFLAGS
679 ac_ct_CC
680 EXEEXT
681 OBJEXT
682 DEPDIR
683 am__include
684 am__quote
685 AMDEP_TRUE
686 AMDEP_FALSE
687 AMDEPBACKSLASH
688 CCDEPMODE
689 am__fastdepCC_TRUE
690 am__fastdepCC_FALSE
691 GNUPLOT
692 APMLIB
693 ACPILIB
694 CPP
695 GREP
696 EGREP
697 LIBOBJS
698 LTLIBOBJS'
699 ac_subst_files=''
700 ac_precious_vars='build_alias
701 host_alias
702 target_alias
703 CC
704 CFLAGS
705 LDFLAGS
706 LIBS
707 CPPFLAGS
708 CPP'
709
710
711 # Initialize some variables set by options.
712 ac_init_help=
713 ac_init_version=false
714 # The variables have the same names as the options, with
715 # dashes changed to underlines.
716 cache_file=/dev/null
717 exec_prefix=NONE
718 no_create=
719 no_recursion=
720 prefix=NONE
721 program_prefix=NONE
722 program_suffix=NONE
723 program_transform_name=s,x,x,
724 silent=
725 site=
726 srcdir=
727 verbose=
728 x_includes=NONE
729 x_libraries=NONE
730
731 # Installation directory options.
732 # These are left unexpanded so users can "make install exec_prefix=/foo"
733 # and all the variables that are supposed to be based on exec_prefix
734 # by default will actually change.
735 # Use braces instead of parens because sh, perl, etc. also accept them.
736 # (The list follows the same order as the GNU Coding Standards.)
737 bindir='${exec_prefix}/bin'
738 sbindir='${exec_prefix}/sbin'
739 libexecdir='${exec_prefix}/libexec'
740 datarootdir='${prefix}/share'
741 datadir='${datarootdir}'
742 sysconfdir='${prefix}/etc'
743 sharedstatedir='${prefix}/com'
744 localstatedir='${prefix}/var'
745 includedir='${prefix}/include'
746 oldincludedir='/usr/include'
747 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
748 infodir='${datarootdir}/info'
749 htmldir='${docdir}'
750 dvidir='${docdir}'
751 pdfdir='${docdir}'
752 psdir='${docdir}'
753 libdir='${exec_prefix}/lib'
754 localedir='${datarootdir}/locale'
755 mandir='${datarootdir}/man'
756
757 ac_prev=
758 ac_dashdash=
759 for ac_option
760 do
761 # If the previous option needs an argument, assign it.
762 if test -n "$ac_prev"; then
763 eval $ac_prev=\$ac_option
764 ac_prev=
765 continue
766 fi
767
768 case $ac_option in
769 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
770 *) ac_optarg=yes ;;
771 esac
772
773 # Accept the important Cygnus configure options, so we can diagnose typos.
774
775 case $ac_dashdash$ac_option in
776 --)
777 ac_dashdash=yes ;;
778
779 -bindir | --bindir | --bindi | --bind | --bin | --bi)
780 ac_prev=bindir ;;
781 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
782 bindir=$ac_optarg ;;
783
784 -build | --build | --buil | --bui | --bu)
785 ac_prev=build_alias ;;
786 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
787 build_alias=$ac_optarg ;;
788
789 -cache-file | --cache-file | --cache-fil | --cache-fi \
790 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
791 ac_prev=cache_file ;;
792 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
793 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
794 cache_file=$ac_optarg ;;
795
796 --config-cache | -C)
797 cache_file=config.cache ;;
798
799 -datadir | --datadir | --datadi | --datad)
800 ac_prev=datadir ;;
801 -datadir=* | --datadir=* | --datadi=* | --datad=*)
802 datadir=$ac_optarg ;;
803
804 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
805 | --dataroo | --dataro | --datar)
806 ac_prev=datarootdir ;;
807 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
808 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
809 datarootdir=$ac_optarg ;;
810
811 -disable-* | --disable-*)
812 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
813 # Reject names that are not valid shell variable names.
814 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
815 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
816 { (exit 1); exit 1; }; }
817 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
818 eval enable_$ac_feature=no ;;
819
820 -docdir | --docdir | --docdi | --doc | --do)
821 ac_prev=docdir ;;
822 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
823 docdir=$ac_optarg ;;
824
825 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
826 ac_prev=dvidir ;;
827 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
828 dvidir=$ac_optarg ;;
829
830 -enable-* | --enable-*)
831 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
832 # Reject names that are not valid shell variable names.
833 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null &&
834 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
835 { (exit 1); exit 1; }; }
836 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'`
837 eval enable_$ac_feature=\$ac_optarg ;;
838
839 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
840 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
841 | --exec | --exe | --ex)
842 ac_prev=exec_prefix ;;
843 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
844 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
845 | --exec=* | --exe=* | --ex=*)
846 exec_prefix=$ac_optarg ;;
847
848 -gas | --gas | --ga | --g)
849 # Obsolete; use --with-gas.
850 with_gas=yes ;;
851
852 -help | --help | --hel | --he | -h)
853 ac_init_help=long ;;
854 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
855 ac_init_help=recursive ;;
856 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
857 ac_init_help=short ;;
858
859 -host | --host | --hos | --ho)
860 ac_prev=host_alias ;;
861 -host=* | --host=* | --hos=* | --ho=*)
862 host_alias=$ac_optarg ;;
863
864 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
865 ac_prev=htmldir ;;
866 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
867 | --ht=*)
868 htmldir=$ac_optarg ;;
869
870 -includedir | --includedir | --includedi | --included | --include \
871 | --includ | --inclu | --incl | --inc)
872 ac_prev=includedir ;;
873 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
874 | --includ=* | --inclu=* | --incl=* | --inc=*)
875 includedir=$ac_optarg ;;
876
877 -infodir | --infodir | --infodi | --infod | --info | --inf)
878 ac_prev=infodir ;;
879 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
880 infodir=$ac_optarg ;;
881
882 -libdir | --libdir | --libdi | --libd)
883 ac_prev=libdir ;;
884 -libdir=* | --libdir=* | --libdi=* | --libd=*)
885 libdir=$ac_optarg ;;
886
887 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
888 | --libexe | --libex | --libe)
889 ac_prev=libexecdir ;;
890 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
891 | --libexe=* | --libex=* | --libe=*)
892 libexecdir=$ac_optarg ;;
893
894 -localedir | --localedir | --localedi | --localed | --locale)
895 ac_prev=localedir ;;
896 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
897 localedir=$ac_optarg ;;
898
899 -localstatedir | --localstatedir | --localstatedi | --localstated \
900 | --localstate | --localstat | --localsta | --localst | --locals)
901 ac_prev=localstatedir ;;
902 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
903 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
904 localstatedir=$ac_optarg ;;
905
906 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
907 ac_prev=mandir ;;
908 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
909 mandir=$ac_optarg ;;
910
911 -nfp | --nfp | --nf)
912 # Obsolete; use --without-fp.
913 with_fp=no ;;
914
915 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
916 | --no-cr | --no-c | -n)
917 no_create=yes ;;
918
919 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
920 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
921 no_recursion=yes ;;
922
923 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
924 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
925 | --oldin | --oldi | --old | --ol | --o)
926 ac_prev=oldincludedir ;;
927 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
928 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
929 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
930 oldincludedir=$ac_optarg ;;
931
932 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
933 ac_prev=prefix ;;
934 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
935 prefix=$ac_optarg ;;
936
937 -program-prefix | --program-prefix | --program-prefi | --program-pref \
938 | --program-pre | --program-pr | --program-p)
939 ac_prev=program_prefix ;;
940 -program-prefix=* | --program-prefix=* | --program-prefi=* \
941 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
942 program_prefix=$ac_optarg ;;
943
944 -program-suffix | --program-suffix | --program-suffi | --program-suff \
945 | --program-suf | --program-su | --program-s)
946 ac_prev=program_suffix ;;
947 -program-suffix=* | --program-suffix=* | --program-suffi=* \
948 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
949 program_suffix=$ac_optarg ;;
950
951 -program-transform-name | --program-transform-name \
952 | --program-transform-nam | --program-transform-na \
953 | --program-transform-n | --program-transform- \
954 | --program-transform | --program-transfor \
955 | --program-transfo | --program-transf \
956 | --program-trans | --program-tran \
957 | --progr-tra | --program-tr | --program-t)
958 ac_prev=program_transform_name ;;
959 -program-transform-name=* | --program-transform-name=* \
960 | --program-transform-nam=* | --program-transform-na=* \
961 | --program-transform-n=* | --program-transform-=* \
962 | --program-transform=* | --program-transfor=* \
963 | --program-transfo=* | --program-transf=* \
964 | --program-trans=* | --program-tran=* \
965 | --progr-tra=* | --program-tr=* | --program-t=*)
966 program_transform_name=$ac_optarg ;;
967
968 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
969 ac_prev=pdfdir ;;
970 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
971 pdfdir=$ac_optarg ;;
972
973 -psdir | --psdir | --psdi | --psd | --ps)
974 ac_prev=psdir ;;
975 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
976 psdir=$ac_optarg ;;
977
978 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
979 | -silent | --silent | --silen | --sile | --sil)
980 silent=yes ;;
981
982 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
983 ac_prev=sbindir ;;
984 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
985 | --sbi=* | --sb=*)
986 sbindir=$ac_optarg ;;
987
988 -sharedstatedir | --sharedstatedir | --sharedstatedi \
989 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
990 | --sharedst | --shareds | --shared | --share | --shar \
991 | --sha | --sh)
992 ac_prev=sharedstatedir ;;
993 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
994 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
995 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
996 | --sha=* | --sh=*)
997 sharedstatedir=$ac_optarg ;;
998
999 -site | --site | --sit)
1000 ac_prev=site ;;
1001 -site=* | --site=* | --sit=*)
1002 site=$ac_optarg ;;
1003
1004 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1005 ac_prev=srcdir ;;
1006 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1007 srcdir=$ac_optarg ;;
1008
1009 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1010 | --syscon | --sysco | --sysc | --sys | --sy)
1011 ac_prev=sysconfdir ;;
1012 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1013 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1014 sysconfdir=$ac_optarg ;;
1015
1016 -target | --target | --targe | --targ | --tar | --ta | --t)
1017 ac_prev=target_alias ;;
1018 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1019 target_alias=$ac_optarg ;;
1020
1021 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1022 verbose=yes ;;
1023
1024 -version | --version | --versio | --versi | --vers | -V)
1025 ac_init_version=: ;;
1026
1027 -with-* | --with-*)
1028 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1029 # Reject names that are not valid shell variable names.
1030 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1031 { echo "$as_me: error: invalid package name: $ac_package" >&2
1032 { (exit 1); exit 1; }; }
1033 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1034 eval with_$ac_package=\$ac_optarg ;;
1035
1036 -without-* | --without-*)
1037 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1038 # Reject names that are not valid shell variable names.
1039 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1040 { echo "$as_me: error: invalid package name: $ac_package" >&2
1041 { (exit 1); exit 1; }; }
1042 ac_package=`echo $ac_package | sed 's/[-.]/_/g'`
1043 eval with_$ac_package=no ;;
1044
1045 --x)
1046 # Obsolete; use --with-x.
1047 with_x=yes ;;
1048
1049 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1050 | --x-incl | --x-inc | --x-in | --x-i)
1051 ac_prev=x_includes ;;
1052 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1053 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1054 x_includes=$ac_optarg ;;
1055
1056 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1057 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1058 ac_prev=x_libraries ;;
1059 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1060 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1061 x_libraries=$ac_optarg ;;
1062
1063 -*) { echo "$as_me: error: unrecognized option: $ac_option
1064 Try \`$0 --help' for more information." >&2
1065 { (exit 1); exit 1; }; }
1066 ;;
1067
1068 *=*)
1069 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1070 # Reject names that are not valid shell variable names.
1071 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
1072 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
1073 { (exit 1); exit 1; }; }
1074 eval $ac_envvar=\$ac_optarg
1075 export $ac_envvar ;;
1076
1077 *)
1078 # FIXME: should be removed in autoconf 3.0.
1079 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1080 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1081 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1082 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
1083 ;;
1084
1085 esac
1086 done
1087
1088 if test -n "$ac_prev"; then
1089 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1090 { echo "$as_me: error: missing argument to $ac_option" >&2
1091 { (exit 1); exit 1; }; }
1092 fi
1093
1094 # Be sure to have absolute directory names.
1095 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1096 datadir sysconfdir sharedstatedir localstatedir includedir \
1097 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1098 libdir localedir mandir
1099 do
1100 eval ac_val=\$$ac_var
1101 case $ac_val in
1102 [\\/$]* | ?:[\\/]* ) continue;;
1103 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1104 esac
1105 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
1106 { (exit 1); exit 1; }; }
1107 done
1108
1109 # There might be people who depend on the old broken behavior: `$host'
1110 # used to hold the argument of --host etc.
1111 # FIXME: To remove some day.
1112 build=$build_alias
1113 host=$host_alias
1114 target=$target_alias
1115
1116 # FIXME: To remove some day.
1117 if test "x$host_alias" != x; then
1118 if test "x$build_alias" = x; then
1119 cross_compiling=maybe
1120 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1121 If a cross compiler is detected then cross compile mode will be used." >&2
1122 elif test "x$build_alias" != "x$host_alias"; then
1123 cross_compiling=yes
1124 fi
1125 fi
1126
1127 ac_tool_prefix=
1128 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1129
1130 test "$silent" = yes && exec 6>/dev/null
1131
1132
1133 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1134 ac_ls_di=`ls -di .` &&
1135 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1136 { echo "$as_me: error: Working directory cannot be determined" >&2
1137 { (exit 1); exit 1; }; }
1138 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1139 { echo "$as_me: error: pwd does not report name of working directory" >&2
1140 { (exit 1); exit 1; }; }
1141
1142
1143 # Find the source files, if location was not specified.
1144 if test -z "$srcdir"; then
1145 ac_srcdir_defaulted=yes
1146 # Try the directory containing this script, then the parent directory.
1147 ac_confdir=`$as_dirname -- "$0" ||
1148 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1149 X"$0" : 'X\(//\)[^/]' \| \
1150 X"$0" : 'X\(//\)$' \| \
1151 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
1152 echo X"$0" |
1153 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1154 s//\1/
1155 q
1156 }
1157 /^X\(\/\/\)[^/].*/{
1158 s//\1/
1159 q
1160 }
1161 /^X\(\/\/\)$/{
1162 s//\1/
1163 q
1164 }
1165 /^X\(\/\).*/{
1166 s//\1/
1167 q
1168 }
1169 s/.*/./; q'`
1170 srcdir=$ac_confdir
1171 if test ! -r "$srcdir/$ac_unique_file"; then
1172 srcdir=..
1173 fi
1174 else
1175 ac_srcdir_defaulted=no
1176 fi
1177 if test ! -r "$srcdir/$ac_unique_file"; then
1178 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1179 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
1180 { (exit 1); exit 1; }; }
1181 fi
1182 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1183 ac_abs_confdir=`(
1184 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2
1185 { (exit 1); exit 1; }; }
1186 pwd)`
1187 # When building in place, set srcdir=.
1188 if test "$ac_abs_confdir" = "$ac_pwd"; then
1189 srcdir=.
1190 fi
1191 # Remove unnecessary trailing slashes from srcdir.
1192 # Double slashes in file names in object file debugging info
1193 # mess up M-x gdb in Emacs.
1194 case $srcdir in
1195 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1196 esac
1197 for ac_var in $ac_precious_vars; do
1198 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1199 eval ac_env_${ac_var}_value=\$${ac_var}
1200 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1201 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1202 done
1203
1204 #
1205 # Report the --help message.
1206 #
1207 if test "$ac_init_help" = "long"; then
1208 # Omit some internal or obsolete options to make the list less imposing.
1209 # This message is too long to be a string in the A/UX 3.1 sh.
1210 cat <<_ACEOF
1211 \`configure' configures battery-stats 0.3.4 to adapt to many kinds of systems.
1212
1213 Usage: $0 [OPTION]... [VAR=VALUE]...
1214
1215 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1216 VAR=VALUE. See below for descriptions of some of the useful variables.
1217
1218 Defaults for the options are specified in brackets.
1219
1220 Configuration:
1221 -h, --help display this help and exit
1222 --help=short display options specific to this package
1223 --help=recursive display the short help of all the included packages
1224 -V, --version display version information and exit
1225 -q, --quiet, --silent do not print \`checking...' messages
1226 --cache-file=FILE cache test results in FILE [disabled]
1227 -C, --config-cache alias for \`--cache-file=config.cache'
1228 -n, --no-create do not create output files
1229 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1230
1231 Installation directories:
1232 --prefix=PREFIX install architecture-independent files in PREFIX
1233 [$ac_default_prefix]
1234 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1235 [PREFIX]
1236
1237 By default, \`make install' will install all the files in
1238 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1239 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1240 for instance \`--prefix=\$HOME'.
1241
1242 For better control, use the options below.
1243
1244 Fine tuning of the installation directories:
1245 --bindir=DIR user executables [EPREFIX/bin]
1246 --sbindir=DIR system admin executables [EPREFIX/sbin]
1247 --libexecdir=DIR program executables [EPREFIX/libexec]
1248 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1249 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1250 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1251 --libdir=DIR object code libraries [EPREFIX/lib]
1252 --includedir=DIR C header files [PREFIX/include]
1253 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1254 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1255 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1256 --infodir=DIR info documentation [DATAROOTDIR/info]
1257 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1258 --mandir=DIR man documentation [DATAROOTDIR/man]
1259 --docdir=DIR documentation root [DATAROOTDIR/doc/battery-stats]
1260 --htmldir=DIR html documentation [DOCDIR]
1261 --dvidir=DIR dvi documentation [DOCDIR]
1262 --pdfdir=DIR pdf documentation [DOCDIR]
1263 --psdir=DIR ps documentation [DOCDIR]
1264 _ACEOF
1265
1266 cat <<\_ACEOF
1267
1268 Program names:
1269 --program-prefix=PREFIX prepend PREFIX to installed program names
1270 --program-suffix=SUFFIX append SUFFIX to installed program names
1271 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1272 _ACEOF
1273 fi
1274
1275 if test -n "$ac_init_help"; then
1276 case $ac_init_help in
1277 short | recursive ) echo "Configuration of battery-stats 0.3.4:";;
1278 esac
1279 cat <<\_ACEOF
1280
1281 Optional Features:
1282 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1283 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1284 --disable-dependency-tracking speeds up one-time build
1285 --enable-dependency-tracking do not reject slow dependency extractors
1286
1287 Some influential environment variables:
1288 CC C compiler command
1289 CFLAGS C compiler flags
1290 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1291 nonstandard directory <lib dir>
1292 LIBS libraries to pass to the linker, e.g. -l<library>
1293 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1294 you have headers in a nonstandard directory <include dir>
1295 CPP C preprocessor
1296
1297 Use these variables to override the choices made by `configure' or to help
1298 it to find libraries and programs with nonstandard names/locations.
1299
1300 Report bugs to <battery-stats@dyne.org>.
1301 _ACEOF
1302 ac_status=$?
1303 fi
1304
1305 if test "$ac_init_help" = "recursive"; then
1306 # If there are subdirs, report their specific --help.
1307 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1308 test -d "$ac_dir" || continue
1309 ac_builddir=.
1310
1311 case "$ac_dir" in
1312 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1313 *)
1314 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
1315 # A ".." for each directory in $ac_dir_suffix.
1316 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
1317 case $ac_top_builddir_sub in
1318 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1319 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1320 esac ;;
1321 esac
1322 ac_abs_top_builddir=$ac_pwd
1323 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1324 # for backward compatibility:
1325 ac_top_builddir=$ac_top_build_prefix
1326
1327 case $srcdir in
1328 .) # We are building in place.
1329 ac_srcdir=.
1330 ac_top_srcdir=$ac_top_builddir_sub
1331 ac_abs_top_srcdir=$ac_pwd ;;
1332 [\\/]* | ?:[\\/]* ) # Absolute name.
1333 ac_srcdir=$srcdir$ac_dir_suffix;
1334 ac_top_srcdir=$srcdir
1335 ac_abs_top_srcdir=$srcdir ;;
1336 *) # Relative name.
1337 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1338 ac_top_srcdir=$ac_top_build_prefix$srcdir
1339 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1340 esac
1341 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1342
1343 cd "$ac_dir" || { ac_status=$?; continue; }
1344 # Check for guested configure.
1345 if test -f "$ac_srcdir/configure.gnu"; then
1346 echo &&
1347 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1348 elif test -f "$ac_srcdir/configure"; then
1349 echo &&
1350 $SHELL "$ac_srcdir/configure" --help=recursive
1351 else
1352 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1353 fi || ac_status=$?
1354 cd "$ac_pwd" || { ac_status=$?; break; }
1355 done
1356 fi
1357
1358 test -n "$ac_init_help" && exit $ac_status
1359 if $ac_init_version; then
1360 cat <<\_ACEOF
1361 battery-stats configure 0.3.4
1362 generated by GNU Autoconf 2.61
1363
1364 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
1365 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1366 This configure script is free software; the Free Software Foundation
1367 gives unlimited permission to copy, distribute and modify it.
1368 _ACEOF
1369 exit
1370 fi
1371 cat >config.log <<_ACEOF
1372 This file contains any messages produced by compilers while
1373 running configure, to aid debugging if configure makes a mistake.
1374
1375 It was created by battery-stats $as_me 0.3.4, which was
1376 generated by GNU Autoconf 2.61. Invocation command line was
1377
1378 $ $0 $@
1379
1380 _ACEOF
1381 exec 5>>config.log
1382 {
1383 cat <<_ASUNAME
1384 ## --------- ##
1385 ## Platform. ##
1386 ## --------- ##
1387
1388 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1389 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1390 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1391 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1392 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1393
1394 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1395 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1396
1397 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1398 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1399 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1400 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1401 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1402 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1403 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1404
1405 _ASUNAME
1406
1407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1408 for as_dir in $PATH
1409 do
1410 IFS=$as_save_IFS
1411 test -z "$as_dir" && as_dir=.
1412 echo "PATH: $as_dir"
1413 done
1414 IFS=$as_save_IFS
1415
1416 } >&5
1417
1418 cat >&5 <<_ACEOF
1419
1420
1421 ## ----------- ##
1422 ## Core tests. ##
1423 ## ----------- ##
1424
1425 _ACEOF
1426
1427
1428 # Keep a trace of the command line.
1429 # Strip out --no-create and --no-recursion so they do not pile up.
1430 # Strip out --silent because we don't want to record it for future runs.
1431 # Also quote any args containing shell meta-characters.
1432 # Make two passes to allow for proper duplicate-argument suppression.
1433 ac_configure_args=
1434 ac_configure_args0=
1435 ac_configure_args1=
1436 ac_must_keep_next=false
1437 for ac_pass in 1 2
1438 do
1439 for ac_arg
1440 do
1441 case $ac_arg in
1442 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1443 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1444 | -silent | --silent | --silen | --sile | --sil)
1445 continue ;;
1446 *\'*)
1447 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1448 esac
1449 case $ac_pass in
1450 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1451 2)
1452 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1453 if test $ac_must_keep_next = true; then
1454 ac_must_keep_next=false # Got value, back to normal.
1455 else
1456 case $ac_arg in
1457 *=* | --config-cache | -C | -disable-* | --disable-* \
1458 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1459 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1460 | -with-* | --with-* | -without-* | --without-* | --x)
1461 case "$ac_configure_args0 " in
1462 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1463 esac
1464 ;;
1465 -* ) ac_must_keep_next=true ;;
1466 esac
1467 fi
1468 ac_configure_args="$ac_configure_args '$ac_arg'"
1469 ;;
1470 esac
1471 done
1472 done
1473 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1474 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
1475
1476 # When interrupted or exit'd, cleanup temporary files, and complete
1477 # config.log. We remove comments because anyway the quotes in there
1478 # would cause problems or look ugly.
1479 # WARNING: Use '\'' to represent an apostrophe within the trap.
1480 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1481 trap 'exit_status=$?
1482 # Save into config.log some information that might help in debugging.
1483 {
1484 echo
1485
1486 cat <<\_ASBOX
1487 ## ---------------- ##
1488 ## Cache variables. ##
1489 ## ---------------- ##
1490 _ASBOX
1491 echo
1492 # The following way of writing the cache mishandles newlines in values,
1493 (
1494 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1495 eval ac_val=\$$ac_var
1496 case $ac_val in #(
1497 *${as_nl}*)
1498 case $ac_var in #(
1499 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
1500 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1501 esac
1502 case $ac_var in #(
1503 _ | IFS | as_nl) ;; #(
1504 *) $as_unset $ac_var ;;
1505 esac ;;
1506 esac
1507 done
1508 (set) 2>&1 |
1509 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1510 *${as_nl}ac_space=\ *)
1511 sed -n \
1512 "s/'\''/'\''\\\\'\'''\''/g;
1513 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1514 ;; #(
1515 *)
1516 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1517 ;;
1518 esac |
1519 sort
1520 )
1521 echo
1522
1523 cat <<\_ASBOX
1524 ## ----------------- ##
1525 ## Output variables. ##
1526 ## ----------------- ##
1527 _ASBOX
1528 echo
1529 for ac_var in $ac_subst_vars
1530 do
1531 eval ac_val=\$$ac_var
1532 case $ac_val in
1533 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1534 esac
1535 echo "$ac_var='\''$ac_val'\''"
1536 done | sort
1537 echo
1538
1539 if test -n "$ac_subst_files"; then
1540 cat <<\_ASBOX
1541 ## ------------------- ##
1542 ## File substitutions. ##
1543 ## ------------------- ##
1544 _ASBOX
1545 echo
1546 for ac_var in $ac_subst_files
1547 do
1548 eval ac_val=\$$ac_var
1549 case $ac_val in
1550 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1551 esac
1552 echo "$ac_var='\''$ac_val'\''"
1553 done | sort
1554 echo
1555 fi
1556
1557 if test -s confdefs.h; then
1558 cat <<\_ASBOX
1559 ## ----------- ##
1560 ## confdefs.h. ##
1561 ## ----------- ##
1562 _ASBOX
1563 echo
1564 cat confdefs.h
1565 echo
1566 fi
1567 test "$ac_signal" != 0 &&
1568 echo "$as_me: caught signal $ac_signal"
1569 echo "$as_me: exit $exit_status"
1570 } >&5
1571 rm -f core *.core core.conftest.* &&
1572 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1573 exit $exit_status
1574 ' 0
1575 for ac_signal in 1 2 13 15; do
1576 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1577 done
1578 ac_signal=0
1579
1580 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1581 rm -f -r conftest* confdefs.h
1582
1583 # Predefined preprocessor variables.
1584
1585 cat >>confdefs.h <<_ACEOF
1586 #define PACKAGE_NAME "$PACKAGE_NAME"
1587 _ACEOF
1588
1589
1590 cat >>confdefs.h <<_ACEOF
1591 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1592 _ACEOF
1593
1594
1595 cat >>confdefs.h <<_ACEOF
1596 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1597 _ACEOF
1598
1599
1600 cat >>confdefs.h <<_ACEOF
1601 #define PACKAGE_STRING "$PACKAGE_STRING"
1602 _ACEOF
1603
1604
1605 cat >>confdefs.h <<_ACEOF
1606 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1607 _ACEOF
1608
1609
1610 # Let the site file select an alternate cache file if it wants to.
1611 # Prefer explicitly selected file to automatically selected ones.
1612 if test -n "$CONFIG_SITE"; then
1613 set x "$CONFIG_SITE"
1614 elif test "x$prefix" != xNONE; then
1615 set x "$prefix/share/config.site" "$prefix/etc/config.site"
1616 else
1617 set x "$ac_default_prefix/share/config.site" \
1618 "$ac_default_prefix/etc/config.site"
1619 fi
1620 shift
1621 for ac_site_file
1622 do
1623 if test -r "$ac_site_file"; then
1624 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1625 echo "$as_me: loading site script $ac_site_file" >&6;}
1626 sed 's/^/| /' "$ac_site_file" >&5
1627 . "$ac_site_file"
1628 fi
1629 done
1630
1631 if test -r "$cache_file"; then
1632 # Some versions of bash will fail to source /dev/null (special
1633 # files actually), so we avoid doing that.
1634 if test -f "$cache_file"; then
1635 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1636 echo "$as_me: loading cache $cache_file" >&6;}
1637 case $cache_file in
1638 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1639 *) . "./$cache_file";;
1640 esac
1641 fi
1642 else
1643 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1644 echo "$as_me: creating cache $cache_file" >&6;}
1645 >$cache_file
1646 fi
1647
1648 # Check that the precious variables saved in the cache have kept the same
1649 # value.
1650 ac_cache_corrupted=false
1651 for ac_var in $ac_precious_vars; do
1652 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1653 eval ac_new_set=\$ac_env_${ac_var}_set
1654 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1655 eval ac_new_val=\$ac_env_${ac_var}_value
1656 case $ac_old_set,$ac_new_set in
1657 set,)
1658 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1659 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1660 ac_cache_corrupted=: ;;
1661 ,set)
1662 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1663 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1664 ac_cache_corrupted=: ;;
1665 ,);;
1666 *)
1667 if test "x$ac_old_val" != "x$ac_new_val"; then
1668 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1669 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1670 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
1671 echo "$as_me: former value: $ac_old_val" >&2;}
1672 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
1673 echo "$as_me: current value: $ac_new_val" >&2;}
1674 ac_cache_corrupted=:
1675 fi;;
1676 esac
1677 # Pass precious variables to config.status.
1678 if test "$ac_new_set" = set; then
1679 case $ac_new_val in
1680 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1681 *) ac_arg=$ac_var=$ac_new_val ;;
1682 esac
1683 case " $ac_configure_args " in
1684 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1685 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1686 esac
1687 fi
1688 done
1689 if $ac_cache_corrupted; then
1690 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1691 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1692 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1693 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1694 { (exit 1); exit 1; }; }
1695 fi
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721 ac_ext=c
1722 ac_cpp='$CPP $CPPFLAGS'
1723 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1724 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1725 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1726
1727
1728
1729 # automake init
1730 am__api_version='1.10'
1731
1732 ac_aux_dir=
1733 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
1734 if test -f "$ac_dir/install-sh"; then
1735 ac_aux_dir=$ac_dir
1736 ac_install_sh="$ac_aux_dir/install-sh -c"
1737 break
1738 elif test -f "$ac_dir/install.sh"; then
1739 ac_aux_dir=$ac_dir
1740 ac_install_sh="$ac_aux_dir/install.sh -c"
1741 break
1742 elif test -f "$ac_dir/shtool"; then
1743 ac_aux_dir=$ac_dir
1744 ac_install_sh="$ac_aux_dir/shtool install -c"
1745 break
1746 fi
1747 done
1748 if test -z "$ac_aux_dir"; then
1749 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
1750 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
1751 { (exit 1); exit 1; }; }
1752 fi
1753
1754 # These three variables are undocumented and unsupported,
1755 # and are intended to be withdrawn in a future Autoconf release.
1756 # They can cause serious problems if a builder's source tree is in a directory
1757 # whose full name contains unusual characters.
1758 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
1759 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
1760 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
1761
1762
1763 # Find a good install program. We prefer a C program (faster),
1764 # so one script is as good as another. But avoid the broken or
1765 # incompatible versions:
1766 # SysV /etc/install, /usr/sbin/install
1767 # SunOS /usr/etc/install
1768 # IRIX /sbin/install
1769 # AIX /bin/install
1770 # AmigaOS /C/install, which installs bootblocks on floppy discs
1771 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1772 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1773 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1774 # OS/2's system install, which has a completely different semantic
1775 # ./install, which can be erroneously created by make from ./install.sh.
1776 { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
1777 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
1778 if test -z "$INSTALL"; then
1779 if test "${ac_cv_path_install+set}" = set; then
1780 echo $ECHO_N "(cached) $ECHO_C" >&6
1781 else
1782 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1783 for as_dir in $PATH
1784 do
1785 IFS=$as_save_IFS
1786 test -z "$as_dir" && as_dir=.
1787 # Account for people who put trailing slashes in PATH elements.
1788 case $as_dir/ in
1789 ./ | .// | /cC/* | \
1790 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
1791 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
1792 /usr/ucb/* ) ;;
1793 *)
1794 # OSF1 and SCO ODT 3.0 have their own names for install.
1795 # Don't use installbsd from OSF since it installs stuff as root
1796 # by default.
1797 for ac_prog in ginstall scoinst install; do
1798 for ac_exec_ext in '' $ac_executable_extensions; do
1799 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
1800 if test $ac_prog = install &&
1801 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1802 # AIX install. It has an incompatible calling convention.
1803 :
1804 elif test $ac_prog = install &&
1805 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
1806 # program-specific install script used by HP pwplus--don't use.
1807 :
1808 else
1809 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
1810 break 3
1811 fi
1812 fi
1813 done
1814 done
1815 ;;
1816 esac
1817 done
1818 IFS=$as_save_IFS
1819
1820
1821 fi
1822 if test "${ac_cv_path_install+set}" = set; then
1823 INSTALL=$ac_cv_path_install
1824 else
1825 # As a last resort, use the slow shell script. Don't cache a
1826 # value for INSTALL within a source directory, because that will
1827 # break other packages using the cache if that directory is
1828 # removed, or if the value is a relative name.
1829 INSTALL=$ac_install_sh
1830 fi
1831 fi
1832 { echo "$as_me:$LINENO: result: $INSTALL" >&5
1833 echo "${ECHO_T}$INSTALL" >&6; }
1834
1835 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1836 # It thinks the first close brace ends the variable substitution.
1837 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1838
1839 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1840
1841 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1842
1843 { echo "$as_me:$LINENO: checking whether build environment is sane" >&5
1844 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; }
1845 # Just in case
1846 sleep 1
1847 echo timestamp > conftest.file
1848 # Do `set' in a subshell so we don't clobber the current shell's
1849 # arguments. Must try -L first in case configure is actually a
1850 # symlink; some systems play weird games with the mod time of symlinks
1851 # (eg FreeBSD returns the mod time of the symlink's containing
1852 # directory).
1853 if (
1854 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1855 if test "$*" = "X"; then
1856 # -L didn't work.
1857 set X `ls -t $srcdir/configure conftest.file`
1858 fi
1859 rm -f conftest.file
1860 if test "$*" != "X $srcdir/configure conftest.file" \
1861 && test "$*" != "X conftest.file $srcdir/configure"; then
1862
1863 # If neither matched, then we have a broken ls. This can happen
1864 # if, for instance, CONFIG_SHELL is bash and it inherits a
1865 # broken ls alias from the environment. This has actually
1866 # happened. Such a system could not be considered "sane".
1867 { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
1868 alias in your environment" >&5
1869 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
1870 alias in your environment" >&2;}
1871 { (exit 1); exit 1; }; }
1872 fi
1873
1874 test "$2" = conftest.file
1875 )
1876 then
1877 # Ok.
1878 :
1879 else
1880 { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
1881 Check your system clock" >&5
1882 echo "$as_me: error: newly created file is older than distributed files!
1883 Check your system clock" >&2;}
1884 { (exit 1); exit 1; }; }
1885 fi
1886 { echo "$as_me:$LINENO: result: yes" >&5
1887 echo "${ECHO_T}yes" >&6; }
1888 test "$program_prefix" != NONE &&
1889 program_transform_name="s&^&$program_prefix&;$program_transform_name"
1890 # Use a double $ so make ignores it.
1891 test "$program_suffix" != NONE &&
1892 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
1893 # Double any \ or $. echo might interpret backslashes.
1894 # By default was `s,x,x', remove it if useless.
1895 cat <<\_ACEOF >conftest.sed
1896 s/[\\$]/&&/g;s/;s,x,x,$//
1897 _ACEOF
1898 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1899 rm -f conftest.sed
1900
1901 # expand $ac_aux_dir to an absolute path
1902 am_aux_dir=`cd $ac_aux_dir && pwd`
1903
1904 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1905 # Use eval to expand $SHELL
1906 if eval "$MISSING --run true"; then
1907 am_missing_run="$MISSING --run "
1908 else
1909 am_missing_run=
1910 { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
1911 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
1912 fi
1913
1914 { echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
1915 echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; }
1916 if test -z "$MKDIR_P"; then
1917 if test "${ac_cv_path_mkdir+set}" = set; then
1918 echo $ECHO_N "(cached) $ECHO_C" >&6
1919 else
1920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1921 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
1922 do
1923 IFS=$as_save_IFS
1924 test -z "$as_dir" && as_dir=.
1925 for ac_prog in mkdir gmkdir; do
1926 for ac_exec_ext in '' $ac_executable_extensions; do
1927 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
1928 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
1929 'mkdir (GNU coreutils) '* | \
1930 'mkdir (coreutils) '* | \
1931 'mkdir (fileutils) '4.1*)
1932 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
1933 break 3;;
1934 esac
1935 done
1936 done
1937 done
1938 IFS=$as_save_IFS
1939
1940 fi
1941
1942 if test "${ac_cv_path_mkdir+set}" = set; then
1943 MKDIR_P="$ac_cv_path_mkdir -p"
1944 else
1945 # As a last resort, use the slow shell script. Don't cache a
1946 # value for MKDIR_P within a source directory, because that will
1947 # break other packages using the cache if that directory is
1948 # removed, or if the value is a relative name.
1949 test -d ./--version && rmdir ./--version
1950 MKDIR_P="$ac_install_sh -d"
1951 fi
1952 fi
1953 { echo "$as_me:$LINENO: result: $MKDIR_P" >&5
1954 echo "${ECHO_T}$MKDIR_P" >&6; }
1955
1956 mkdir_p="$MKDIR_P"
1957 case $mkdir_p in
1958 [\\/$]* | ?:[\\/]*) ;;
1959 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
1960 esac
1961
1962 for ac_prog in gawk mawk nawk awk
1963 do
1964 # Extract the first word of "$ac_prog", so it can be a program name with args.
1965 set dummy $ac_prog; ac_word=$2
1966 { echo "$as_me:$LINENO: checking for $ac_word" >&5
1967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
1968 if test "${ac_cv_prog_AWK+set}" = set; then
1969 echo $ECHO_N "(cached) $ECHO_C" >&6
1970 else
1971 if test -n "$AWK"; then
1972 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1973 else
1974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1975 for as_dir in $PATH
1976 do
1977 IFS=$as_save_IFS
1978 test -z "$as_dir" && as_dir=.
1979 for ac_exec_ext in '' $ac_executable_extensions; do
1980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1981 ac_cv_prog_AWK="$ac_prog"
1982 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1983 break 2
1984 fi
1985 done
1986 done
1987 IFS=$as_save_IFS
1988
1989 fi
1990 fi
1991 AWK=$ac_cv_prog_AWK
1992 if test -n "$AWK"; then
1993 { echo "$as_me:$LINENO: result: $AWK" >&5
1994 echo "${ECHO_T}$AWK" >&6; }
1995 else
1996 { echo "$as_me:$LINENO: result: no" >&5
1997 echo "${ECHO_T}no" >&6; }
1998 fi
1999
2000
2001 test -n "$AWK" && break
2002 done
2003
2004 { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
2005 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; }
2006 set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
2007 if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
2008 echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010 cat >conftest.make <<\_ACEOF
2011 SHELL = /bin/sh
2012 all:
2013 @echo '@@@%%%=$(MAKE)=@@@%%%'
2014 _ACEOF
2015 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2016 case `${MAKE-make} -f conftest.make 2>/dev/null` in
2017 *@@@%%%=?*=@@@%%%*)
2018 eval ac_cv_prog_make_${ac_make}_set=yes;;
2019 *)
2020 eval ac_cv_prog_make_${ac_make}_set=no;;
2021 esac
2022 rm -f conftest.make
2023 fi
2024 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
2025 { echo "$as_me:$LINENO: result: yes" >&5
2026 echo "${ECHO_T}yes" >&6; }
2027 SET_MAKE=
2028 else
2029 { echo "$as_me:$LINENO: result: no" >&5
2030 echo "${ECHO_T}no" >&6; }
2031 SET_MAKE="MAKE=${MAKE-make}"
2032 fi
2033
2034 rm -rf .tst 2>/dev/null
2035 mkdir .tst 2>/dev/null
2036 if test -d .tst; then
2037 am__leading_dot=.
2038 else
2039 am__leading_dot=_
2040 fi
2041 rmdir .tst 2>/dev/null
2042
2043 if test "`cd $srcdir && pwd`" != "`pwd`"; then
2044 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
2045 # is not polluted with repeated "-I."
2046 am__isrc=' -I$(srcdir)'
2047 # test to see if srcdir already configured
2048 if test -f $srcdir/config.status; then
2049 { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
2050 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
2051 { (exit 1); exit 1; }; }
2052 fi
2053 fi
2054
2055 # test whether we have cygpath
2056 if test -z "$CYGPATH_W"; then
2057 if (cygpath --version) >/dev/null 2>/dev/null; then
2058 CYGPATH_W='cygpath -w'
2059 else
2060 CYGPATH_W=echo
2061 fi
2062 fi
2063
2064
2065 # Define the identity of the package.
2066 PACKAGE='battery-stats'
2067 VERSION='0.3.4'
2068
2069
2070 cat >>confdefs.h <<_ACEOF
2071 #define PACKAGE "$PACKAGE"
2072 _ACEOF
2073
2074
2075 cat >>confdefs.h <<_ACEOF
2076 #define VERSION "$VERSION"
2077 _ACEOF
2078
2079 # Some tools Automake needs.
2080
2081 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
2082
2083
2084 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
2085
2086
2087 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
2088
2089
2090 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
2091
2092
2093 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
2094
2095 install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
2096
2097 # Installed binaries are usually stripped using `strip' when the user
2098 # run `make install-strip'. However `strip' might not be the right
2099 # tool to use in cross-compilation environments, therefore Automake
2100 # will honor the `STRIP' environment variable to overrule this program.
2101 if test "$cross_compiling" != no; then
2102 if test -n "$ac_tool_prefix"; then
2103 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
2104 set dummy ${ac_tool_prefix}strip; ac_word=$2
2105 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2106 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2107 if test "${ac_cv_prog_STRIP+set}" = set; then
2108 echo $ECHO_N "(cached) $ECHO_C" >&6
2109 else
2110 if test -n "$STRIP"; then
2111 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
2112 else
2113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2114 for as_dir in $PATH
2115 do
2116 IFS=$as_save_IFS
2117 test -z "$as_dir" && as_dir=.
2118 for ac_exec_ext in '' $ac_executable_extensions; do
2119 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2120 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
2121 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2122 break 2
2123 fi
2124 done
2125 done
2126 IFS=$as_save_IFS
2127
2128 fi
2129 fi
2130 STRIP=$ac_cv_prog_STRIP
2131 if test -n "$STRIP"; then
2132 { echo "$as_me:$LINENO: result: $STRIP" >&5
2133 echo "${ECHO_T}$STRIP" >&6; }
2134 else
2135 { echo "$as_me:$LINENO: result: no" >&5
2136 echo "${ECHO_T}no" >&6; }
2137 fi
2138
2139
2140 fi
2141 if test -z "$ac_cv_prog_STRIP"; then
2142 ac_ct_STRIP=$STRIP
2143 # Extract the first word of "strip", so it can be a program name with args.
2144 set dummy strip; ac_word=$2
2145 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2146 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2147 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
2148 echo $ECHO_N "(cached) $ECHO_C" >&6
2149 else
2150 if test -n "$ac_ct_STRIP"; then
2151 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
2152 else
2153 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2154 for as_dir in $PATH
2155 do
2156 IFS=$as_save_IFS
2157 test -z "$as_dir" && as_dir=.
2158 for ac_exec_ext in '' $ac_executable_extensions; do
2159 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2160 ac_cv_prog_ac_ct_STRIP="strip"
2161 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2162 break 2
2163 fi
2164 done
2165 done
2166 IFS=$as_save_IFS
2167
2168 fi
2169 fi
2170 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
2171 if test -n "$ac_ct_STRIP"; then
2172 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
2173 echo "${ECHO_T}$ac_ct_STRIP" >&6; }
2174 else
2175 { echo "$as_me:$LINENO: result: no" >&5
2176 echo "${ECHO_T}no" >&6; }
2177 fi
2178
2179 if test "x$ac_ct_STRIP" = x; then
2180 STRIP=":"
2181 else
2182 case $cross_compiling:$ac_tool_warned in
2183 yes:)
2184 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2185 whose name does not start with the host triplet. If you think this
2186 configuration is useful to you, please write to autoconf@gnu.org." >&5
2187 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2188 whose name does not start with the host triplet. If you think this
2189 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2190 ac_tool_warned=yes ;;
2191 esac
2192 STRIP=$ac_ct_STRIP
2193 fi
2194 else
2195 STRIP="$ac_cv_prog_STRIP"
2196 fi
2197
2198 fi
2199 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
2200
2201 # We need awk for the "check" target. The system "awk" is bad on
2202 # some platforms.
2203 # Always define AMTAR for backward compatibility.
2204
2205 AMTAR=${AMTAR-"${am_missing_run}tar"}
2206
2207 am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
2208
2209
2210
2211
2212
2213
2214 ###### Check for progarms
2215
2216 # compiler
2217 ac_ext=c
2218 ac_cpp='$CPP $CPPFLAGS'
2219 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2220 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2221 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2222 if test -n "$ac_tool_prefix"; then
2223 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2224 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2225 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2227 if test "${ac_cv_prog_CC+set}" = set; then
2228 echo $ECHO_N "(cached) $ECHO_C" >&6
2229 else
2230 if test -n "$CC"; then
2231 ac_cv_prog_CC="$CC" # Let the user override the test.
2232 else
2233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2234 for as_dir in $PATH
2235 do
2236 IFS=$as_save_IFS
2237 test -z "$as_dir" && as_dir=.
2238 for ac_exec_ext in '' $ac_executable_extensions; do
2239 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2240 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2241 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2242 break 2
2243 fi
2244 done
2245 done
2246 IFS=$as_save_IFS
2247
2248 fi
2249 fi
2250 CC=$ac_cv_prog_CC
2251 if test -n "$CC"; then
2252 { echo "$as_me:$LINENO: result: $CC" >&5
2253 echo "${ECHO_T}$CC" >&6; }
2254 else
2255 { echo "$as_me:$LINENO: result: no" >&5
2256 echo "${ECHO_T}no" >&6; }
2257 fi
2258
2259
2260 fi
2261 if test -z "$ac_cv_prog_CC"; then
2262 ac_ct_CC=$CC
2263 # Extract the first word of "gcc", so it can be a program name with args.
2264 set dummy gcc; ac_word=$2
2265 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2266 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2267 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
2269 else
2270 if test -n "$ac_ct_CC"; then
2271 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2272 else
2273 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2274 for as_dir in $PATH
2275 do
2276 IFS=$as_save_IFS
2277 test -z "$as_dir" && as_dir=.
2278 for ac_exec_ext in '' $ac_executable_extensions; do
2279 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2280 ac_cv_prog_ac_ct_CC="gcc"
2281 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2282 break 2
2283 fi
2284 done
2285 done
2286 IFS=$as_save_IFS
2287
2288 fi
2289 fi
2290 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2291 if test -n "$ac_ct_CC"; then
2292 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2293 echo "${ECHO_T}$ac_ct_CC" >&6; }
2294 else
2295 { echo "$as_me:$LINENO: result: no" >&5
2296 echo "${ECHO_T}no" >&6; }
2297 fi
2298
2299 if test "x$ac_ct_CC" = x; then
2300 CC=""
2301 else
2302 case $cross_compiling:$ac_tool_warned in
2303 yes:)
2304 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2305 whose name does not start with the host triplet. If you think this
2306 configuration is useful to you, please write to autoconf@gnu.org." >&5
2307 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2308 whose name does not start with the host triplet. If you think this
2309 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2310 ac_tool_warned=yes ;;
2311 esac
2312 CC=$ac_ct_CC
2313 fi
2314 else
2315 CC="$ac_cv_prog_CC"
2316 fi
2317
2318 if test -z "$CC"; then
2319 if test -n "$ac_tool_prefix"; then
2320 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2321 set dummy ${ac_tool_prefix}cc; ac_word=$2
2322 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2324 if test "${ac_cv_prog_CC+set}" = set; then
2325 echo $ECHO_N "(cached) $ECHO_C" >&6
2326 else
2327 if test -n "$CC"; then
2328 ac_cv_prog_CC="$CC" # Let the user override the test.
2329 else
2330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2331 for as_dir in $PATH
2332 do
2333 IFS=$as_save_IFS
2334 test -z "$as_dir" && as_dir=.
2335 for ac_exec_ext in '' $ac_executable_extensions; do
2336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2337 ac_cv_prog_CC="${ac_tool_prefix}cc"
2338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2339 break 2
2340 fi
2341 done
2342 done
2343 IFS=$as_save_IFS
2344
2345 fi
2346 fi
2347 CC=$ac_cv_prog_CC
2348 if test -n "$CC"; then
2349 { echo "$as_me:$LINENO: result: $CC" >&5
2350 echo "${ECHO_T}$CC" >&6; }
2351 else
2352 { echo "$as_me:$LINENO: result: no" >&5
2353 echo "${ECHO_T}no" >&6; }
2354 fi
2355
2356
2357 fi
2358 fi
2359 if test -z "$CC"; then
2360 # Extract the first word of "cc", so it can be a program name with args.
2361 set dummy cc; ac_word=$2
2362 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2363 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2364 if test "${ac_cv_prog_CC+set}" = set; then
2365 echo $ECHO_N "(cached) $ECHO_C" >&6
2366 else
2367 if test -n "$CC"; then
2368 ac_cv_prog_CC="$CC" # Let the user override the test.
2369 else
2370 ac_prog_rejected=no
2371 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2372 for as_dir in $PATH
2373 do
2374 IFS=$as_save_IFS
2375 test -z "$as_dir" && as_dir=.
2376 for ac_exec_ext in '' $ac_executable_extensions; do
2377 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2378 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2379 ac_prog_rejected=yes
2380 continue
2381 fi
2382 ac_cv_prog_CC="cc"
2383 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2384 break 2
2385 fi
2386 done
2387 done
2388 IFS=$as_save_IFS
2389
2390 if test $ac_prog_rejected = yes; then
2391 # We found a bogon in the path, so make sure we never use it.
2392 set dummy $ac_cv_prog_CC
2393 shift
2394 if test $# != 0; then
2395 # We chose a different compiler from the bogus one.
2396 # However, it has the same basename, so the bogon will be chosen
2397 # first if we set CC to just the basename; use the full file name.
2398 shift
2399 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2400 fi
2401 fi
2402 fi
2403 fi
2404 CC=$ac_cv_prog_CC
2405 if test -n "$CC"; then
2406 { echo "$as_me:$LINENO: result: $CC" >&5
2407 echo "${ECHO_T}$CC" >&6; }
2408 else
2409 { echo "$as_me:$LINENO: result: no" >&5
2410 echo "${ECHO_T}no" >&6; }
2411 fi
2412
2413
2414 fi
2415 if test -z "$CC"; then
2416 if test -n "$ac_tool_prefix"; then
2417 for ac_prog in cl.exe
2418 do
2419 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2420 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2421 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2422 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2423 if test "${ac_cv_prog_CC+set}" = set; then
2424 echo $ECHO_N "(cached) $ECHO_C" >&6
2425 else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428 else
2429 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430 for as_dir in $PATH
2431 do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
2435 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2436 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2438 break 2
2439 fi
2440 done
2441 done
2442 IFS=$as_save_IFS
2443
2444 fi
2445 fi
2446 CC=$ac_cv_prog_CC
2447 if test -n "$CC"; then
2448 { echo "$as_me:$LINENO: result: $CC" >&5
2449 echo "${ECHO_T}$CC" >&6; }
2450 else
2451 { echo "$as_me:$LINENO: result: no" >&5
2452 echo "${ECHO_T}no" >&6; }
2453 fi
2454
2455
2456 test -n "$CC" && break
2457 done
2458 fi
2459 if test -z "$CC"; then
2460 ac_ct_CC=$CC
2461 for ac_prog in cl.exe
2462 do
2463 # Extract the first word of "$ac_prog", so it can be a program name with args.
2464 set dummy $ac_prog; ac_word=$2
2465 { echo "$as_me:$LINENO: checking for $ac_word" >&5
2466 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
2467 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2468 echo $ECHO_N "(cached) $ECHO_C" >&6
2469 else
2470 if test -n "$ac_ct_CC"; then
2471 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2472 else
2473 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2474 for as_dir in $PATH
2475 do
2476 IFS=$as_save_IFS
2477 test -z "$as_dir" && as_dir=.
2478 for ac_exec_ext in '' $ac_executable_extensions; do
2479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2480 ac_cv_prog_ac_ct_CC="$ac_prog"
2481 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2482 break 2
2483 fi
2484 done
2485 done
2486 IFS=$as_save_IFS
2487
2488 fi
2489 fi
2490 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2491 if test -n "$ac_ct_CC"; then
2492 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2493 echo "${ECHO_T}$ac_ct_CC" >&6; }
2494 else
2495 { echo "$as_me:$LINENO: result: no" >&5
2496 echo "${ECHO_T}no" >&6; }
2497 fi
2498
2499
2500 test -n "$ac_ct_CC" && break
2501 done
2502
2503 if test "x$ac_ct_CC" = x; then
2504 CC=""
2505 else
2506 case $cross_compiling:$ac_tool_warned in
2507 yes:)
2508 { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2509 whose name does not start with the host triplet. If you think this
2510 configuration is useful to you, please write to autoconf@gnu.org." >&5
2511 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2512 whose name does not start with the host triplet. If you think this
2513 configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2514 ac_tool_warned=yes ;;
2515 esac
2516 CC=$ac_ct_CC
2517 fi
2518 fi
2519
2520 fi
2521
2522
2523 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2524 See \`config.log' for more details." >&5
2525 echo "$as_me: error: no acceptable C compiler found in \$PATH
2526 See \`config.log' for more details." >&2;}
2527 { (exit 1); exit 1; }; }
2528
2529 # Provide some information about the compiler.
2530 echo "$as_me:$LINENO: checking for C compiler version" >&5
2531 ac_compiler=`set X $ac_compile; echo $2`
2532 { (ac_try="$ac_compiler --version >&5"
2533 case "(($ac_try" in
2534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535 *) ac_try_echo=$ac_try;;
2536 esac
2537 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2538 (eval "$ac_compiler --version >&5") 2>&5
2539 ac_status=$?
2540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2541 (exit $ac_status); }
2542 { (ac_try="$ac_compiler -v >&5"
2543 case "(($ac_try" in
2544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545 *) ac_try_echo=$ac_try;;
2546 esac
2547 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2548 (eval "$ac_compiler -v >&5") 2>&5
2549 ac_status=$?
2550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2551 (exit $ac_status); }
2552 { (ac_try="$ac_compiler -V >&5"
2553 case "(($ac_try" in
2554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2555 *) ac_try_echo=$ac_try;;
2556 esac
2557 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2558 (eval "$ac_compiler -V >&5") 2>&5
2559 ac_status=$?
2560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561 (exit $ac_status); }
2562
2563 cat >conftest.$ac_ext <<_ACEOF
2564 /* confdefs.h. */
2565 _ACEOF
2566 cat confdefs.h >>conftest.$ac_ext
2567 cat >>conftest.$ac_ext <<_ACEOF
2568 /* end confdefs.h. */
2569
2570 int
2571 main ()
2572 {
2573
2574 ;
2575 return 0;
2576 }
2577 _ACEOF
2578 ac_clean_files_save=$ac_clean_files
2579 ac_clean_files="$ac_clean_files a.out a.exe b.out"
2580 # Try to create an executable without -o first, disregard a.out.
2581 # It will help us diagnose broken compilers, and finding out an intuition
2582 # of exeext.
2583 { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2584 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2585 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2586 #
2587 # List of possible output files, starting from the most likely.
2588 # The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2589 # only as a last resort. b.out is created by i960 compilers.
2590 ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2591 #
2592 # The IRIX 6 linker writes into existing files which may not be
2593 # executable, retaining their permissions. Remove them first so a
2594 # subsequent execution test works.
2595 ac_rmfiles=
2596 for ac_file in $ac_files
2597 do
2598 case $ac_file in
2599 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2600 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2601 esac
2602 done
2603 rm -f $ac_rmfiles
2604
2605 if { (ac_try="$ac_link_default"
2606 case "(($ac_try" in
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2609 esac
2610 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2611 (eval "$ac_link_default") 2>&5
2612 ac_status=$?
2613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2614 (exit $ac_status); }; then
2615 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2616 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2617 # in a Makefile. We should not override ac_cv_exeext if it was cached,
2618 # so that the user can short-circuit this test for compilers unknown to
2619 # Autoconf.
2620 for ac_file in $ac_files ''
2621 do
2622 test -f "$ac_file" || continue
2623 case $ac_file in
2624 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
2625 ;;
2626 [ab].out )
2627 # We found the default executable, but exeext='' is most
2628 # certainly right.
2629 break;;
2630 *.* )
2631 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2632 then :; else
2633 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2634 fi
2635 # We set ac_cv_exeext here because the later test for it is not
2636 # safe: cross compilers may not add the suffix if given an `-o'
2637 # argument, so we may need to know it at that point already.
2638 # Even if this section looks crufty: it has the advantage of
2639 # actually working.
2640 break;;
2641 * )
2642 break;;
2643 esac
2644 done
2645 test "$ac_cv_exeext" = no && ac_cv_exeext=
2646
2647 else
2648 ac_file=''
2649 fi
2650
2651 { echo "$as_me:$LINENO: result: $ac_file" >&5
2652 echo "${ECHO_T}$ac_file" >&6; }
2653 if test -z "$ac_file"; then
2654 echo "$as_me: failed program was:" >&5
2655 sed 's/^/| /' conftest.$ac_ext >&5
2656
2657 { { echo "$as_me:$LINENO: error: C compiler cannot create executables
2658 See \`config.log' for more details." >&5
2659 echo "$as_me: error: C compiler cannot create executables
2660 See \`config.log' for more details." >&2;}
2661 { (exit 77); exit 77; }; }
2662 fi
2663
2664 ac_exeext=$ac_cv_exeext
2665
2666 # Check that the compiler produces executables we can run. If not, either
2667 # the compiler is broken, or we cross compile.
2668 { echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2669 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2670 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2671 # If not cross compiling, check that we can run a simple program.
2672 if test "$cross_compiling" != yes; then
2673 if { ac_try='./$ac_file'
2674 { (case "(($ac_try" in
2675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2676 *) ac_try_echo=$ac_try;;
2677 esac
2678 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2679 (eval "$ac_try") 2>&5
2680 ac_status=$?
2681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2682 (exit $ac_status); }; }; then
2683 cross_compiling=no
2684 else
2685 if test "$cross_compiling" = maybe; then
2686 cross_compiling=yes
2687 else
2688 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2689 If you meant to cross compile, use \`--host'.
2690 See \`config.log' for more details." >&5
2691 echo "$as_me: error: cannot run C compiled programs.
2692 If you meant to cross compile, use \`--host'.
2693 See \`config.log' for more details." >&2;}
2694 { (exit 1); exit 1; }; }
2695 fi
2696 fi
2697 fi
2698 { echo "$as_me:$LINENO: result: yes" >&5
2699 echo "${ECHO_T}yes" >&6; }
2700
2701 rm -f a.out a.exe conftest$ac_cv_exeext b.out
2702 ac_clean_files=$ac_clean_files_save
2703 # Check that the compiler produces executables we can run. If not, either
2704 # the compiler is broken, or we cross compile.
2705 { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2706 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2707 { echo "$as_me:$LINENO: result: $cross_compiling" >&5
2708 echo "${ECHO_T}$cross_compiling" >&6; }
2709
2710 { echo "$as_me:$LINENO: checking for suffix of executables" >&5
2711 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2712 if { (ac_try="$ac_link"
2713 case "(($ac_try" in
2714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2715 *) ac_try_echo=$ac_try;;
2716 esac
2717 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2718 (eval "$ac_link") 2>&5
2719 ac_status=$?
2720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2721 (exit $ac_status); }; then
2722 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2723 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2724 # work properly (i.e., refer to `conftest.exe'), while it won't with
2725 # `rm'.
2726 for ac_file in conftest.exe conftest conftest.*; do
2727 test -f "$ac_file" || continue
2728 case $ac_file in
2729 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2730 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2731 break;;
2732 * ) break;;
2733 esac
2734 done
2735 else
2736 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2737 See \`config.log' for more details." >&5
2738 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2739 See \`config.log' for more details." >&2;}
2740 { (exit 1); exit 1; }; }
2741 fi
2742
2743 rm -f conftest$ac_cv_exeext
2744 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2745 echo "${ECHO_T}$ac_cv_exeext" >&6; }
2746
2747 rm -f conftest.$ac_ext
2748 EXEEXT=$ac_cv_exeext
2749 ac_exeext=$EXEEXT
2750 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
2751 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
2752 if test "${ac_cv_objext+set}" = set; then
2753 echo $ECHO_N "(cached) $ECHO_C" >&6
2754 else
2755 cat >conftest.$ac_ext <<_ACEOF
2756 /* confdefs.h. */
2757 _ACEOF
2758 cat confdefs.h >>conftest.$ac_ext
2759 cat >>conftest.$ac_ext <<_ACEOF
2760 /* end confdefs.h. */
2761
2762 int
2763 main ()
2764 {
2765
2766 ;
2767 return 0;
2768 }
2769 _ACEOF
2770 rm -f conftest.o conftest.obj
2771 if { (ac_try="$ac_compile"
2772 case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775 esac
2776 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2777 (eval "$ac_compile") 2>&5
2778 ac_status=$?
2779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2780 (exit $ac_status); }; then
2781 for ac_file in conftest.o conftest.obj conftest.*; do
2782 test -f "$ac_file" || continue;
2783 case $ac_file in
2784 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
2785 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2786 break;;
2787 esac
2788 done
2789 else
2790 echo "$as_me: failed program was:" >&5
2791 sed 's/^/| /' conftest.$ac_ext >&5
2792
2793 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2794 See \`config.log' for more details." >&5
2795 echo "$as_me: error: cannot compute suffix of object files: cannot compile
2796 See \`config.log' for more details." >&2;}
2797 { (exit 1); exit 1; }; }
2798 fi
2799
2800 rm -f conftest.$ac_cv_objext conftest.$ac_ext
2801 fi
2802 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2803 echo "${ECHO_T}$ac_cv_objext" >&6; }
2804 OBJEXT=$ac_cv_objext
2805 ac_objext=$OBJEXT
2806 { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2807 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
2808 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2809 echo $ECHO_N "(cached) $ECHO_C" >&6
2810 else
2811 cat >conftest.$ac_ext <<_ACEOF
2812 /* confdefs.h. */
2813 _ACEOF
2814 cat confdefs.h >>conftest.$ac_ext
2815 cat >>conftest.$ac_ext <<_ACEOF
2816 /* end confdefs.h. */
2817
2818 int
2819 main ()
2820 {
2821 #ifndef __GNUC__
2822 choke me
2823 #endif
2824
2825 ;
2826 return 0;
2827 }
2828 _ACEOF
2829 rm -f conftest.$ac_objext
2830 if { (ac_try="$ac_compile"
2831 case "(($ac_try" in
2832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2833 *) ac_try_echo=$ac_try;;
2834 esac
2835 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2836 (eval "$ac_compile") 2>conftest.er1
2837 ac_status=$?
2838 grep -v '^ *+' conftest.er1 >conftest.err
2839 rm -f conftest.er1
2840 cat conftest.err >&5
2841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2842 (exit $ac_status); } && {
2843 test -z "$ac_c_werror_flag" ||
2844 test ! -s conftest.err
2845 } && test -s conftest.$ac_objext; then
2846 ac_compiler_gnu=yes
2847 else
2848 echo "$as_me: failed program was:" >&5
2849 sed 's/^/| /' conftest.$ac_ext >&5
2850
2851 ac_compiler_gnu=no
2852 fi
2853
2854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2856
2857 fi
2858 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2859 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
2860 GCC=`test $ac_compiler_gnu = yes && echo yes`
2861 ac_test_CFLAGS=${CFLAGS+set}
2862 ac_save_CFLAGS=$CFLAGS
2863 { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2864 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
2865 if test "${ac_cv_prog_cc_g+set}" = set; then
2866 echo $ECHO_N "(cached) $ECHO_C" >&6
2867 else
2868 ac_save_c_werror_flag=$ac_c_werror_flag
2869 ac_c_werror_flag=yes
2870 ac_cv_prog_cc_g=no
2871 CFLAGS="-g"
2872 cat >conftest.$ac_ext <<_ACEOF
2873 /* confdefs.h. */
2874 _ACEOF
2875 cat confdefs.h >>conftest.$ac_ext
2876 cat >>conftest.$ac_ext <<_ACEOF
2877 /* end confdefs.h. */
2878
2879 int
2880 main ()
2881 {
2882
2883 ;
2884 return 0;
2885 }
2886 _ACEOF
2887 rm -f conftest.$ac_objext
2888 if { (ac_try="$ac_compile"
2889 case "(($ac_try" in
2890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2891 *) ac_try_echo=$ac_try;;
2892 esac
2893 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2894 (eval "$ac_compile") 2>conftest.er1
2895 ac_status=$?
2896 grep -v '^ *+' conftest.er1 >conftest.err
2897 rm -f conftest.er1
2898 cat conftest.err >&5
2899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2900 (exit $ac_status); } && {
2901 test -z "$ac_c_werror_flag" ||
2902 test ! -s conftest.err
2903 } && test -s conftest.$ac_objext; then
2904 ac_cv_prog_cc_g=yes
2905 else
2906 echo "$as_me: failed program was:" >&5
2907 sed 's/^/| /' conftest.$ac_ext >&5
2908
2909 CFLAGS=""
2910 cat >conftest.$ac_ext <<_ACEOF
2911 /* confdefs.h. */
2912 _ACEOF
2913 cat confdefs.h >>conftest.$ac_ext
2914 cat >>conftest.$ac_ext <<_ACEOF
2915 /* end confdefs.h. */
2916
2917 int
2918 main ()
2919 {
2920
2921 ;
2922 return 0;
2923 }
2924 _ACEOF
2925 rm -f conftest.$ac_objext
2926 if { (ac_try="$ac_compile"
2927 case "(($ac_try" in
2928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2929 *) ac_try_echo=$ac_try;;
2930 esac
2931 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2932 (eval "$ac_compile") 2>conftest.er1
2933 ac_status=$?
2934 grep -v '^ *+' conftest.er1 >conftest.err
2935 rm -f conftest.er1
2936 cat conftest.err >&5
2937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2938 (exit $ac_status); } && {
2939 test -z "$ac_c_werror_flag" ||
2940 test ! -s conftest.err
2941 } && test -s conftest.$ac_objext; then
2942 :
2943 else
2944 echo "$as_me: failed program was:" >&5
2945 sed 's/^/| /' conftest.$ac_ext >&5
2946
2947 ac_c_werror_flag=$ac_save_c_werror_flag
2948 CFLAGS="-g"
2949 cat >conftest.$ac_ext <<_ACEOF
2950 /* confdefs.h. */
2951 _ACEOF
2952 cat confdefs.h >>conftest.$ac_ext
2953 cat >>conftest.$ac_ext <<_ACEOF
2954 /* end confdefs.h. */
2955
2956 int
2957 main ()
2958 {
2959
2960 ;
2961 return 0;
2962 }
2963 _ACEOF
2964 rm -f conftest.$ac_objext
2965 if { (ac_try="$ac_compile"
2966 case "(($ac_try" in
2967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2968 *) ac_try_echo=$ac_try;;
2969 esac
2970 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2971 (eval "$ac_compile") 2>conftest.er1
2972 ac_status=$?
2973 grep -v '^ *+' conftest.er1 >conftest.err
2974 rm -f conftest.er1
2975 cat conftest.err >&5
2976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2977 (exit $ac_status); } && {
2978 test -z "$ac_c_werror_flag" ||
2979 test ! -s conftest.err
2980 } && test -s conftest.$ac_objext; then
2981 ac_cv_prog_cc_g=yes
2982 else
2983 echo "$as_me: failed program was:" >&5
2984 sed 's/^/| /' conftest.$ac_ext >&5
2985
2986
2987 fi
2988
2989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2990 fi
2991
2992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2993 fi
2994
2995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2996 ac_c_werror_flag=$ac_save_c_werror_flag
2997 fi
2998 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2999 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
3000 if test "$ac_test_CFLAGS" = set; then
3001 CFLAGS=$ac_save_CFLAGS
3002 elif test $ac_cv_prog_cc_g = yes; then
3003 if test "$GCC" = yes; then
3004 CFLAGS="-g -O2"
3005 else
3006 CFLAGS="-g"
3007 fi
3008 else
3009 if test "$GCC" = yes; then
3010 CFLAGS="-O2"
3011 else
3012 CFLAGS=
3013 fi
3014 fi
3015 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3016 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
3017 if test "${ac_cv_prog_cc_c89+set}" = set; then
3018 echo $ECHO_N "(cached) $ECHO_C" >&6
3019 else
3020 ac_cv_prog_cc_c89=no
3021 ac_save_CC=$CC
3022 cat >conftest.$ac_ext <<_ACEOF
3023 /* confdefs.h. */
3024 _ACEOF
3025 cat confdefs.h >>conftest.$ac_ext
3026 cat >>conftest.$ac_ext <<_ACEOF
3027 /* end confdefs.h. */
3028 #include <stdarg.h>
3029 #include <stdio.h>
3030 #include <sys/types.h>
3031 #include <sys/stat.h>
3032 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3033 struct buf { int x; };
3034 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3035 static char *e (p, i)
3036 char **p;
3037 int i;
3038 {
3039 return p[i];
3040 }
3041 static char *f (char * (*g) (char **, int), char **p, ...)
3042 {
3043 char *s;
3044 va_list v;
3045 va_start (v,p);
3046 s = g (p, va_arg (v,int));
3047 va_end (v);
3048 return s;
3049 }
3050
3051 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3052 function prototypes and stuff, but not '\xHH' hex character constants.
3053 These don't provoke an error unfortunately, instead are silently treated
3054 as 'x'. The following induces an error, until -std is added to get
3055 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3056 array size at least. It's necessary to write '\x00'==0 to get something
3057 that's true only with -std. */
3058 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3059
3060 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3061 inside strings and character constants. */
3062 #define FOO(x) 'x'
3063 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3064
3065 int test (int i, double x);
3066 struct s1 {int (*f) (int a);};
3067 struct s2 {int (*f) (double a);};
3068 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3069 int argc;
3070 char **argv;
3071 int
3072 main ()
3073 {
3074 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3075 ;
3076 return 0;
3077 }
3078 _ACEOF
3079 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3080 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3081 do
3082 CC="$ac_save_CC $ac_arg"
3083 rm -f conftest.$ac_objext
3084 if { (ac_try="$ac_compile"
3085 case "(($ac_try" in
3086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3087 *) ac_try_echo=$ac_try;;
3088 esac
3089 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3090 (eval "$ac_compile") 2>conftest.er1
3091 ac_status=$?
3092 grep -v '^ *+' conftest.er1 >conftest.err
3093 rm -f conftest.er1
3094 cat conftest.err >&5
3095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3096 (exit $ac_status); } && {
3097 test -z "$ac_c_werror_flag" ||
3098 test ! -s conftest.err
3099 } && test -s conftest.$ac_objext; then
3100 ac_cv_prog_cc_c89=$ac_arg
3101 else
3102 echo "$as_me: failed program was:" >&5
3103 sed 's/^/| /' conftest.$ac_ext >&5
3104
3105
3106 fi
3107
3108 rm -f core conftest.err conftest.$ac_objext
3109 test "x$ac_cv_prog_cc_c89" != "xno" && break
3110 done
3111 rm -f conftest.$ac_ext
3112 CC=$ac_save_CC
3113
3114 fi
3115 # AC_CACHE_VAL
3116 case "x$ac_cv_prog_cc_c89" in
3117 x)
3118 { echo "$as_me:$LINENO: result: none needed" >&5
3119 echo "${ECHO_T}none needed" >&6; } ;;
3120 xno)
3121 { echo "$as_me:$LINENO: result: unsupported" >&5
3122 echo "${ECHO_T}unsupported" >&6; } ;;
3123 *)
3124 CC="$CC $ac_cv_prog_cc_c89"
3125 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3126 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
3127 esac
3128
3129
3130 ac_ext=c
3131 ac_cpp='$CPP $CPPFLAGS'
3132 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3133 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3134 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3135 DEPDIR="${am__leading_dot}deps"
3136
3137 ac_config_commands="$ac_config_commands depfiles"
3138
3139
3140 am_make=${MAKE-make}
3141 cat > confinc << 'END'
3142 am__doit:
3143 @echo done
3144 .PHONY: am__doit
3145 END
3146 # If we don't find an include directive, just comment out the code.
3147 { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
3148 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; }
3149 am__include="#"
3150 am__quote=
3151 _am_result=none
3152 # First try GNU make style include.
3153 echo "include confinc" > confmf
3154 # We grep out `Entering directory' and `Leaving directory'
3155 # messages which can occur if `w' ends up in MAKEFLAGS.
3156 # In particular we don't look at `^make:' because GNU make might
3157 # be invoked under some other name (usually "gmake"), in which
3158 # case it prints its new name instead of `make'.
3159 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
3160 am__include=include
3161 am__quote=
3162 _am_result=GNU
3163 fi
3164 # Now try BSD make style include.
3165 if test "$am__include" = "#"; then
3166 echo '.include "confinc"' > confmf
3167 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
3168 am__include=.include
3169 am__quote="\""
3170 _am_result=BSD
3171 fi
3172 fi
3173
3174
3175 { echo "$as_me:$LINENO: result: $_am_result" >&5
3176 echo "${ECHO_T}$_am_result" >&6; }
3177 rm -f confinc confmf
3178
3179 # Check whether --enable-dependency-tracking was given.
3180 if test "${enable_dependency_tracking+set}" = set; then
3181 enableval=$enable_dependency_tracking;
3182 fi
3183
3184 if test "x$enable_dependency_tracking" != xno; then
3185 am_depcomp="$ac_aux_dir/depcomp"
3186 AMDEPBACKSLASH='\'
3187 fi
3188 if test "x$enable_dependency_tracking" != xno; then
3189 AMDEP_TRUE=
3190 AMDEP_FALSE='#'
3191 else
3192 AMDEP_TRUE='#'
3193 AMDEP_FALSE=
3194 fi
3195
3196
3197
3198 depcc="$CC" am_compiler_list=
3199
3200 { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
3201 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; }
3202 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
3203 echo $ECHO_N "(cached) $ECHO_C" >&6
3204 else
3205 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
3206 # We make a subdir and do the tests there. Otherwise we can end up
3207 # making bogus files that we don't know about and never remove. For
3208 # instance it was reported that on HP-UX the gcc test will end up
3209 # making a dummy file named `D' -- because `-MD' means `put the output
3210 # in D'.
3211 mkdir conftest.dir
3212 # Copy depcomp to subdir because otherwise we won't find it if we're
3213 # using a relative directory.
3214 cp "$am_depcomp" conftest.dir
3215 cd conftest.dir
3216 # We will build objects and dependencies in a subdirectory because
3217 # it helps to detect inapplicable dependency modes. For instance
3218 # both Tru64's cc and ICC support -MD to output dependencies as a
3219 # side effect of compilation, but ICC will put the dependencies in
3220 # the current directory while Tru64 will put them in the object
3221 # directory.
3222 mkdir sub
3223
3224 am_cv_CC_dependencies_compiler_type=none
3225 if test "$am_compiler_list" = ""; then
3226 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
3227 fi
3228 for depmode in $am_compiler_list; do
3229 # Setup a source with many dependencies, because some compilers
3230 # like to wrap large dependency lists on column 80 (with \), and
3231 # we should not choose a depcomp mode which is confused by this.
3232 #
3233 # We need to recreate these files for each test, as the compiler may
3234 # overwrite some of them when testing with obscure command lines.
3235 # This happens at least with the AIX C compiler.
3236 : > sub/conftest.c
3237 for i in 1 2 3 4 5 6; do
3238 echo '#include "conftst'$i'.h"' >> sub/conftest.c
3239 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
3240 # Solaris 8's {/usr,}/bin/sh.
3241 touch sub/conftst$i.h
3242 done
3243 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
3244
3245 case $depmode in
3246 nosideeffect)
3247 # after this tag, mechanisms are not by side-effect, so they'll
3248 # only be used when explicitly requested
3249 if test "x$enable_dependency_tracking" = xyes; then
3250 continue
3251 else
3252 break
3253 fi
3254 ;;
3255 none) break ;;
3256 esac
3257 # We check with `-c' and `-o' for the sake of the "dashmstdout"
3258 # mode. It turns out that the SunPro C++ compiler does not properly
3259 # handle `-M -o', and we need to detect this.
3260 if depmode=$depmode \
3261 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
3262 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
3263 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
3264 >/dev/null 2>conftest.err &&
3265 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
3266 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
3267 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
3268 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
3269 # icc doesn't choke on unknown options, it will just issue warnings
3270 # or remarks (even with -Werror). So we grep stderr for any message
3271 # that says an option was ignored or not supported.
3272 # When given -MP, icc 7.0 and 7.1 complain thusly:
3273 # icc: Command line warning: ignoring option '-M'; no argument required
3274 # The diagnosis changed in icc 8.0:
3275 # icc: Command line remark: option '-MP' not supported
3276 if (grep 'ignoring option' conftest.err ||
3277 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3278 am_cv_CC_dependencies_compiler_type=$depmode
3279 break
3280 fi
3281 fi
3282 done
3283
3284 cd ..
3285 rm -rf conftest.dir
3286 else
3287 am_cv_CC_dependencies_compiler_type=none
3288 fi
3289
3290 fi
3291 { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
3292 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; }
3293 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
3294
3295 if
3296 test "x$enable_dependency_tracking" != xno \
3297 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
3298 am__fastdepCC_TRUE=
3299 am__fastdepCC_FALSE='#'
3300 else
3301 am__fastdepCC_TRUE='#'
3302 am__fastdepCC_FALSE=
3303 fi
3304
3305
3306
3307 # gnuplot
3308 for ac_prog in gnuplot
3309 do
3310 # Extract the first word of "$ac_prog", so it can be a program name with args.
3311 set dummy $ac_prog; ac_word=$2
3312 { echo "$as_me:$LINENO: checking for $ac_word" >&5
3313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
3314 if test "${ac_cv_prog_GNUPLOT+set}" = set; then
3315 echo $ECHO_N "(cached) $ECHO_C" >&6
3316 else
3317 if test -n "$GNUPLOT"; then
3318 ac_cv_prog_GNUPLOT="$GNUPLOT" # Let the user override the test.
3319 else
3320 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3321 for as_dir in $PATH
3322 do
3323 IFS=$as_save_IFS
3324 test -z "$as_dir" && as_dir=.
3325 for ac_exec_ext in '' $ac_executable_extensions; do
3326 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3327 ac_cv_prog_GNUPLOT="$ac_prog"
3328 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3329 break 2
3330 fi
3331 done
3332 done
3333 IFS=$as_save_IFS
3334
3335 fi
3336 fi
3337 GNUPLOT=$ac_cv_prog_GNUPLOT
3338 if test -n "$GNUPLOT"; then
3339 { echo "$as_me:$LINENO: result: $GNUPLOT" >&5
3340 echo "${ECHO_T}$GNUPLOT" >&6; }
3341 else
3342 { echo "$as_me:$LINENO: result: no" >&5
3343 echo "${ECHO_T}no" >&6; }
3344 fi
3345
3346
3347 test -n "$GNUPLOT" && break
3348 done
3349 test -n "$GNUPLOT" || GNUPLOT=":"
3350
3351 if test "$GNUPLOT" = :; then
3352 { { echo "$as_me:$LINENO: error: This package needs gnuplot to operate properly" >&5
3353 echo "$as_me: error: This package needs gnuplot to operate properly" >&2;}
3354 { (exit 1); exit 1; }; }
3355 fi
3356
3357
3358 ###### Check for libraries
3359
3360 # libapm and apmread
3361
3362 { echo "$as_me:$LINENO: checking for apm_read in -lapm" >&5
3363 echo $ECHO_N "checking for apm_read in -lapm... $ECHO_C" >&6; }
3364 if test "${ac_cv_lib_apm_apm_read+set}" = set; then
3365 echo $ECHO_N "(cached) $ECHO_C" >&6
3366 else
3367 ac_check_lib_save_LIBS=$LIBS
3368 LIBS="-lapm $LIBS"
3369 cat >conftest.$ac_ext <<_ACEOF
3370 /* confdefs.h. */
3371 _ACEOF
3372 cat confdefs.h >>conftest.$ac_ext
3373 cat >>conftest.$ac_ext <<_ACEOF
3374 /* end confdefs.h. */
3375
3376 /* Override any GCC internal prototype to avoid an error.
3377 Use char because int might match the return type of a GCC
3378 builtin and then its argument prototype would still apply. */
3379 #ifdef __cplusplus
3380 extern "C"
3381 #endif
3382 char apm_read ();
3383 int
3384 main ()
3385 {
3386 return apm_read ();
3387 ;
3388 return 0;
3389 }
3390 _ACEOF
3391 rm -f conftest.$ac_objext conftest$ac_exeext
3392 if { (ac_try="$ac_link"
3393 case "(($ac_try" in
3394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3395 *) ac_try_echo=$ac_try;;
3396 esac
3397 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3398 (eval "$ac_link") 2>conftest.er1
3399 ac_status=$?
3400 grep -v '^ *+' conftest.er1 >conftest.err
3401 rm -f conftest.er1
3402 cat conftest.err >&5
3403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3404 (exit $ac_status); } && {
3405 test -z "$ac_c_werror_flag" ||
3406 test ! -s conftest.err
3407 } && test -s conftest$ac_exeext &&
3408 $as_test_x conftest$ac_exeext; then
3409 ac_cv_lib_apm_apm_read=yes
3410 else
3411 echo "$as_me: failed program was:" >&5
3412 sed 's/^/| /' conftest.$ac_ext >&5
3413
3414 ac_cv_lib_apm_apm_read=no
3415 fi
3416
3417 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3418 conftest$ac_exeext conftest.$ac_ext
3419 LIBS=$ac_check_lib_save_LIBS
3420 fi
3421 { echo "$as_me:$LINENO: result: $ac_cv_lib_apm_apm_read" >&5
3422 echo "${ECHO_T}$ac_cv_lib_apm_apm_read" >&6; }
3423 if test $ac_cv_lib_apm_apm_read = yes; then
3424 APMLIB=-lapm
3425 fi
3426
3427 if test "$APMLIB" = :; then
3428 { { echo "$as_me:$LINENO: error: APM lib needs to be installed for this package to work properly" >&5
3429 echo "$as_me: error: APM lib needs to be installed for this package to work properly" >&2;}
3430 { (exit 1); exit 1; }; }
3431 fi
3432
3433
3434 # acpilib
3435 { echo "$as_me:$LINENO: checking for init_acpi_batt in -lacpi" >&5
3436 echo $ECHO_N "checking for init_acpi_batt in -lacpi... $ECHO_C" >&6; }
3437 if test "${ac_cv_lib_acpi_init_acpi_batt+set}" = set; then
3438 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 else
3440 ac_check_lib_save_LIBS=$LIBS
3441 LIBS="-lacpi $LIBS"
3442 cat >conftest.$ac_ext <<_ACEOF
3443 /* confdefs.h. */
3444 _ACEOF
3445 cat confdefs.h >>conftest.$ac_ext
3446 cat >>conftest.$ac_ext <<_ACEOF
3447 /* end confdefs.h. */
3448
3449 /* Override any GCC internal prototype to avoid an error.
3450 Use char because int might match the return type of a GCC
3451 builtin and then its argument prototype would still apply. */
3452 #ifdef __cplusplus
3453 extern "C"
3454 #endif
3455 char init_acpi_batt ();
3456 int
3457 main ()
3458 {
3459 return init_acpi_batt ();
3460 ;
3461 return 0;
3462 }
3463 _ACEOF
3464 rm -f conftest.$ac_objext conftest$ac_exeext
3465 if { (ac_try="$ac_link"
3466 case "(($ac_try" in
3467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3468 *) ac_try_echo=$ac_try;;
3469 esac
3470 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3471 (eval "$ac_link") 2>conftest.er1
3472 ac_status=$?
3473 grep -v '^ *+' conftest.er1 >conftest.err
3474 rm -f conftest.er1
3475 cat conftest.err >&5
3476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3477 (exit $ac_status); } && {
3478 test -z "$ac_c_werror_flag" ||
3479 test ! -s conftest.err
3480 } && test -s conftest$ac_exeext &&
3481 $as_test_x conftest$ac_exeext; then
3482 ac_cv_lib_acpi_init_acpi_batt=yes
3483 else
3484 echo "$as_me: failed program was:" >&5
3485 sed 's/^/| /' conftest.$ac_ext >&5
3486
3487 ac_cv_lib_acpi_init_acpi_batt=no
3488 fi
3489
3490 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
3491 conftest$ac_exeext conftest.$ac_ext
3492 LIBS=$ac_check_lib_save_LIBS
3493 fi
3494 { echo "$as_me:$LINENO: result: $ac_cv_lib_acpi_init_acpi_batt" >&5
3495 echo "${ECHO_T}$ac_cv_lib_acpi_init_acpi_batt" >&6; }
3496 if test $ac_cv_lib_acpi_init_acpi_batt = yes; then
3497 ACPILIB=-lacpi
3498 fi
3499
3500 if test "$ACPILIB" = -lacpi; then
3501
3502 cat >>confdefs.h <<\_ACEOF
3503 #define WANT_ACPI 1
3504 _ACEOF
3505
3506 fi
3507
3508
3509
3510 #### Checks for headers files
3511 ac_ext=c
3512 ac_cpp='$CPP $CPPFLAGS'
3513 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3514 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3515 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3516 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3517 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
3518 # On Suns, sometimes $CPP names a directory.
3519 if test -n "$CPP" && test -d "$CPP"; then
3520 CPP=
3521 fi
3522 if test -z "$CPP"; then
3523 if test "${ac_cv_prog_CPP+set}" = set; then
3524 echo $ECHO_N "(cached) $ECHO_C" >&6
3525 else
3526 # Double quotes because CPP needs to be expanded
3527 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3528 do
3529 ac_preproc_ok=false
3530 for ac_c_preproc_warn_flag in '' yes
3531 do
3532 # Use a header file that comes with gcc, so configuring glibc
3533 # with a fresh cross-compiler works.
3534 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3535 # <limits.h> exists even on freestanding compilers.
3536 # On the NeXT, cc -E runs the code through the compiler's parser,
3537 # not just through cpp. "Syntax error" is here to catch this case.
3538 cat >conftest.$ac_ext <<_ACEOF
3539 /* confdefs.h. */
3540 _ACEOF
3541 cat confdefs.h >>conftest.$ac_ext
3542 cat >>conftest.$ac_ext <<_ACEOF
3543 /* end confdefs.h. */
3544 #ifdef __STDC__
3545 # include <limits.h>
3546 #else
3547 # include <assert.h>
3548 #endif
3549 Syntax error
3550 _ACEOF
3551 if { (ac_try="$ac_cpp conftest.$ac_ext"
3552 case "(($ac_try" in
3553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3554 *) ac_try_echo=$ac_try;;
3555 esac
3556 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3557 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3558 ac_status=$?
3559 grep -v '^ *+' conftest.er1 >conftest.err
3560 rm -f conftest.er1
3561 cat conftest.err >&5
3562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3563 (exit $ac_status); } >/dev/null && {
3564 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3565 test ! -s conftest.err
3566 }; then
3567 :
3568 else
3569 echo "$as_me: failed program was:" >&5
3570 sed 's/^/| /' conftest.$ac_ext >&5
3571
3572 # Broken: fails on valid input.
3573 continue
3574 fi
3575
3576 rm -f conftest.err conftest.$ac_ext
3577
3578 # OK, works on sane cases. Now check whether nonexistent headers
3579 # can be detected and how.
3580 cat >conftest.$ac_ext <<_ACEOF
3581 /* confdefs.h. */
3582 _ACEOF
3583 cat confdefs.h >>conftest.$ac_ext
3584 cat >>conftest.$ac_ext <<_ACEOF
3585 /* end confdefs.h. */
3586 #include <ac_nonexistent.h>
3587 _ACEOF
3588 if { (ac_try="$ac_cpp conftest.$ac_ext"
3589 case "(($ac_try" in
3590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3591 *) ac_try_echo=$ac_try;;
3592 esac
3593 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3595 ac_status=$?
3596 grep -v '^ *+' conftest.er1 >conftest.err
3597 rm -f conftest.er1
3598 cat conftest.err >&5
3599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3600 (exit $ac_status); } >/dev/null && {
3601 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3602 test ! -s conftest.err
3603 }; then
3604 # Broken: success on invalid input.
3605 continue
3606 else
3607 echo "$as_me: failed program was:" >&5
3608 sed 's/^/| /' conftest.$ac_ext >&5
3609
3610 # Passes both tests.
3611 ac_preproc_ok=:
3612 break
3613 fi
3614
3615 rm -f conftest.err conftest.$ac_ext
3616
3617 done
3618 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3619 rm -f conftest.err conftest.$ac_ext
3620 if $ac_preproc_ok; then
3621 break
3622 fi
3623
3624 done
3625 ac_cv_prog_CPP=$CPP
3626
3627 fi
3628 CPP=$ac_cv_prog_CPP
3629 else
3630 ac_cv_prog_CPP=$CPP
3631 fi
3632 { echo "$as_me:$LINENO: result: $CPP" >&5
3633 echo "${ECHO_T}$CPP" >&6; }
3634 ac_preproc_ok=false
3635 for ac_c_preproc_warn_flag in '' yes
3636 do
3637 # Use a header file that comes with gcc, so configuring glibc
3638 # with a fresh cross-compiler works.
3639 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3640 # <limits.h> exists even on freestanding compilers.
3641 # On the NeXT, cc -E runs the code through the compiler's parser,
3642 # not just through cpp. "Syntax error" is here to catch this case.
3643 cat >conftest.$ac_ext <<_ACEOF
3644 /* confdefs.h. */
3645 _ACEOF
3646 cat confdefs.h >>conftest.$ac_ext
3647 cat >>conftest.$ac_ext <<_ACEOF
3648 /* end confdefs.h. */
3649 #ifdef __STDC__
3650 # include <limits.h>
3651 #else
3652 # include <assert.h>
3653 #endif
3654 Syntax error
3655 _ACEOF
3656 if { (ac_try="$ac_cpp conftest.$ac_ext"
3657 case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660 esac
3661 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3662 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3663 ac_status=$?
3664 grep -v '^ *+' conftest.er1 >conftest.err
3665 rm -f conftest.er1
3666 cat conftest.err >&5
3667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3668 (exit $ac_status); } >/dev/null && {
3669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3670 test ! -s conftest.err
3671 }; then
3672 :
3673 else
3674 echo "$as_me: failed program was:" >&5
3675 sed 's/^/| /' conftest.$ac_ext >&5
3676
3677 # Broken: fails on valid input.
3678 continue
3679 fi
3680
3681 rm -f conftest.err conftest.$ac_ext
3682
3683 # OK, works on sane cases. Now check whether nonexistent headers
3684 # can be detected and how.
3685 cat >conftest.$ac_ext <<_ACEOF
3686 /* confdefs.h. */
3687 _ACEOF
3688 cat confdefs.h >>conftest.$ac_ext
3689 cat >>conftest.$ac_ext <<_ACEOF
3690 /* end confdefs.h. */
3691 #include <ac_nonexistent.h>
3692 _ACEOF
3693 if { (ac_try="$ac_cpp conftest.$ac_ext"
3694 case "(($ac_try" in
3695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3696 *) ac_try_echo=$ac_try;;
3697 esac
3698 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3700 ac_status=$?
3701 grep -v '^ *+' conftest.er1 >conftest.err
3702 rm -f conftest.er1
3703 cat conftest.err >&5
3704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3705 (exit $ac_status); } >/dev/null && {
3706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3707 test ! -s conftest.err
3708 }; then
3709 # Broken: success on invalid input.
3710 continue
3711 else
3712 echo "$as_me: failed program was:" >&5
3713 sed 's/^/| /' conftest.$ac_ext >&5
3714
3715 # Passes both tests.
3716 ac_preproc_ok=:
3717 break
3718 fi
3719
3720 rm -f conftest.err conftest.$ac_ext
3721
3722 done
3723 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3724 rm -f conftest.err conftest.$ac_ext
3725 if $ac_preproc_ok; then
3726 :
3727 else
3728 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3729 See \`config.log' for more details." >&5
3730 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3731 See \`config.log' for more details." >&2;}
3732 { (exit 1); exit 1; }; }
3733 fi
3734
3735 ac_ext=c
3736 ac_cpp='$CPP $CPPFLAGS'
3737 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3738 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3739 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3740
3741
3742 { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3743 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
3744 if test "${ac_cv_path_GREP+set}" = set; then
3745 echo $ECHO_N "(cached) $ECHO_C" >&6
3746 else
3747 # Extract the first word of "grep ggrep" to use in msg output
3748 if test -z "$GREP"; then
3749 set dummy grep ggrep; ac_prog_name=$2
3750 if test "${ac_cv_path_GREP+set}" = set; then
3751 echo $ECHO_N "(cached) $ECHO_C" >&6
3752 else
3753 ac_path_GREP_found=false
3754 # Loop through the user's path and test for each of PROGNAME-LIST
3755 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3756 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3757 do
3758 IFS=$as_save_IFS
3759 test -z "$as_dir" && as_dir=.
3760 for ac_prog in grep ggrep; do
3761 for ac_exec_ext in '' $ac_executable_extensions; do
3762 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3763 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3764 # Check for GNU ac_path_GREP and select it if it is found.
3765 # Check for GNU $ac_path_GREP
3766 case `"$ac_path_GREP" --version 2>&1` in
3767 *GNU*)
3768 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3769 *)
3770 ac_count=0
3771 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3772 while :
3773 do
3774 cat "conftest.in" "conftest.in" >"conftest.tmp"
3775 mv "conftest.tmp" "conftest.in"
3776 cp "conftest.in" "conftest.nl"
3777 echo 'GREP' >> "conftest.nl"
3778 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3779 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3780 ac_count=`expr $ac_count + 1`
3781 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3782 # Best one so far, save it but keep looking for a better one
3783 ac_cv_path_GREP="$ac_path_GREP"
3784 ac_path_GREP_max=$ac_count
3785 fi
3786 # 10*(2^10) chars as input seems more than enough
3787 test $ac_count -gt 10 && break
3788 done
3789 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3790 esac
3791
3792
3793 $ac_path_GREP_found && break 3
3794 done
3795 done
3796
3797 done
3798 IFS=$as_save_IFS
3799
3800
3801 fi
3802
3803 GREP="$ac_cv_path_GREP"
3804 if test -z "$GREP"; then
3805 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3806 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3807 { (exit 1); exit 1; }; }
3808 fi
3809
3810 else
3811 ac_cv_path_GREP=$GREP
3812 fi
3813
3814
3815 fi
3816 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3817 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
3818 GREP="$ac_cv_path_GREP"
3819
3820
3821 { echo "$as_me:$LINENO: checking for egrep" >&5
3822 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
3823 if test "${ac_cv_path_EGREP+set}" = set; then
3824 echo $ECHO_N "(cached) $ECHO_C" >&6
3825 else
3826 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3827 then ac_cv_path_EGREP="$GREP -E"
3828 else
3829 # Extract the first word of "egrep" to use in msg output
3830 if test -z "$EGREP"; then
3831 set dummy egrep; ac_prog_name=$2
3832 if test "${ac_cv_path_EGREP+set}" = set; then
3833 echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835 ac_path_EGREP_found=false
3836 # Loop through the user's path and test for each of PROGNAME-LIST
3837 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3838 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3839 do
3840 IFS=$as_save_IFS
3841 test -z "$as_dir" && as_dir=.
3842 for ac_prog in egrep; do
3843 for ac_exec_ext in '' $ac_executable_extensions; do
3844 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3845 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3846 # Check for GNU ac_path_EGREP and select it if it is found.
3847 # Check for GNU $ac_path_EGREP
3848 case `"$ac_path_EGREP" --version 2>&1` in
3849 *GNU*)
3850 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3851 *)
3852 ac_count=0
3853 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
3854 while :
3855 do
3856 cat "conftest.in" "conftest.in" >"conftest.tmp"
3857 mv "conftest.tmp" "conftest.in"
3858 cp "conftest.in" "conftest.nl"
3859 echo 'EGREP' >> "conftest.nl"
3860 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3861 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3862 ac_count=`expr $ac_count + 1`
3863 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3864 # Best one so far, save it but keep looking for a better one
3865 ac_cv_path_EGREP="$ac_path_EGREP"
3866 ac_path_EGREP_max=$ac_count
3867 fi
3868 # 10*(2^10) chars as input seems more than enough
3869 test $ac_count -gt 10 && break
3870 done
3871 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3872 esac
3873
3874
3875 $ac_path_EGREP_found && break 3
3876 done
3877 done
3878
3879 done
3880 IFS=$as_save_IFS
3881
3882
3883 fi
3884
3885 EGREP="$ac_cv_path_EGREP"
3886 if test -z "$EGREP"; then
3887 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3888 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3889 { (exit 1); exit 1; }; }
3890 fi
3891
3892 else
3893 ac_cv_path_EGREP=$EGREP
3894 fi
3895
3896
3897 fi
3898 fi
3899 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3900 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
3901 EGREP="$ac_cv_path_EGREP"
3902
3903
3904 { echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3905 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
3906 if test "${ac_cv_header_stdc+set}" = set; then
3907 echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909 cat >conftest.$ac_ext <<_ACEOF
3910 /* confdefs.h. */
3911 _ACEOF
3912 cat confdefs.h >>conftest.$ac_ext
3913 cat >>conftest.$ac_ext <<_ACEOF
3914 /* end confdefs.h. */
3915 #include <stdlib.h>
3916 #include <stdarg.h>
3917 #include <string.h>
3918 #include <float.h>
3919
3920 int
3921 main ()
3922 {
3923
3924 ;
3925 return 0;
3926 }
3927 _ACEOF
3928 rm -f conftest.$ac_objext
3929 if { (ac_try="$ac_compile"
3930 case "(($ac_try" in
3931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3932 *) ac_try_echo=$ac_try;;
3933 esac
3934 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3935 (eval "$ac_compile") 2>conftest.er1
3936 ac_status=$?
3937 grep -v '^ *+' conftest.er1 >conftest.err
3938 rm -f conftest.er1
3939 cat conftest.err >&5
3940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941 (exit $ac_status); } && {
3942 test -z "$ac_c_werror_flag" ||
3943 test ! -s conftest.err
3944 } && test -s conftest.$ac_objext; then
3945 ac_cv_header_stdc=yes
3946 else
3947 echo "$as_me: failed program was:" >&5
3948 sed 's/^/| /' conftest.$ac_ext >&5
3949
3950 ac_cv_header_stdc=no
3951 fi
3952
3953 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3954
3955 if test $ac_cv_header_stdc = yes; then
3956 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3957 cat >conftest.$ac_ext <<_ACEOF
3958 /* confdefs.h. */
3959 _ACEOF
3960 cat confdefs.h >>conftest.$ac_ext
3961 cat >>conftest.$ac_ext <<_ACEOF
3962 /* end confdefs.h. */
3963 #include <string.h>
3964
3965 _ACEOF
3966 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3967 $EGREP "memchr" >/dev/null 2>&1; then
3968 :
3969 else
3970 ac_cv_header_stdc=no
3971 fi
3972 rm -f conftest*
3973
3974 fi
3975
3976 if test $ac_cv_header_stdc = yes; then
3977 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3978 cat >conftest.$ac_ext <<_ACEOF
3979 /* confdefs.h. */
3980 _ACEOF
3981 cat confdefs.h >>conftest.$ac_ext
3982 cat >>conftest.$ac_ext <<_ACEOF
3983 /* end confdefs.h. */
3984 #include <stdlib.h>
3985
3986 _ACEOF
3987 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3988 $EGREP "free" >/dev/null 2>&1; then
3989 :
3990 else
3991 ac_cv_header_stdc=no
3992 fi
3993 rm -f conftest*
3994
3995 fi
3996
3997 if test $ac_cv_header_stdc = yes; then
3998 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3999 if test "$cross_compiling" = yes; then
4000 :
4001 else
4002 cat >conftest.$ac_ext <<_ACEOF
4003 /* confdefs.h. */
4004 _ACEOF
4005 cat confdefs.h >>conftest.$ac_ext
4006 cat >>conftest.$ac_ext <<_ACEOF
4007 /* end confdefs.h. */
4008 #include <ctype.h>
4009 #include <stdlib.h>
4010 #if ((' ' & 0x0FF) == 0x020)
4011 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4012 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4013 #else
4014 # define ISLOWER(c) \
4015 (('a' <= (c) && (c) <= 'i') \
4016 || ('j' <= (c) && (c) <= 'r') \
4017 || ('s' <= (c) && (c) <= 'z'))
4018 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4019 #endif
4020
4021 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4022 int
4023 main ()
4024 {
4025 int i;
4026 for (i = 0; i < 256; i++)
4027 if (XOR (islower (i), ISLOWER (i))
4028 || toupper (i) != TOUPPER (i))
4029 return 2;
4030 return 0;
4031 }
4032 _ACEOF
4033 rm -f conftest$ac_exeext
4034 if { (ac_try="$ac_link"
4035 case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038 esac
4039 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4040 (eval "$ac_link") 2>&5
4041 ac_status=$?
4042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4044 { (case "(($ac_try" in
4045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4046 *) ac_try_echo=$ac_try;;
4047 esac
4048 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4049 (eval "$ac_try") 2>&5
4050 ac_status=$?
4051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4052 (exit $ac_status); }; }; then
4053 :
4054 else
4055 echo "$as_me: program exited with status $ac_status" >&5
4056 echo "$as_me: failed program was:" >&5
4057 sed 's/^/| /' conftest.$ac_ext >&5
4058
4059 ( exit $ac_status )
4060 ac_cv_header_stdc=no
4061 fi
4062 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4063 fi
4064
4065
4066 fi
4067 fi
4068 { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4069 echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
4070 if test $ac_cv_header_stdc = yes; then
4071
4072 cat >>confdefs.h <<\_ACEOF
4073 #define STDC_HEADERS 1
4074 _ACEOF
4075
4076 fi
4077
4078 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4089 inttypes.h stdint.h unistd.h
4090 do
4091 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4092 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4093 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4094 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4095 echo $ECHO_N "(cached) $ECHO_C" >&6
4096 else
4097 cat >conftest.$ac_ext <<_ACEOF
4098 /* confdefs.h. */
4099 _ACEOF
4100 cat confdefs.h >>conftest.$ac_ext
4101 cat >>conftest.$ac_ext <<_ACEOF
4102 /* end confdefs.h. */
4103 $ac_includes_default
4104
4105 #include <$ac_header>
4106 _ACEOF
4107 rm -f conftest.$ac_objext
4108 if { (ac_try="$ac_compile"
4109 case "(($ac_try" in
4110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4111 *) ac_try_echo=$ac_try;;
4112 esac
4113 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4114 (eval "$ac_compile") 2>conftest.er1
4115 ac_status=$?
4116 grep -v '^ *+' conftest.er1 >conftest.err
4117 rm -f conftest.er1
4118 cat conftest.err >&5
4119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4120 (exit $ac_status); } && {
4121 test -z "$ac_c_werror_flag" ||
4122 test ! -s conftest.err
4123 } && test -s conftest.$ac_objext; then
4124 eval "$as_ac_Header=yes"
4125 else
4126 echo "$as_me: failed program was:" >&5
4127 sed 's/^/| /' conftest.$ac_ext >&5
4128
4129 eval "$as_ac_Header=no"
4130 fi
4131
4132 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4133 fi
4134 ac_res=`eval echo '${'$as_ac_Header'}'`
4135 { echo "$as_me:$LINENO: result: $ac_res" >&5
4136 echo "${ECHO_T}$ac_res" >&6; }
4137 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4138 cat >>confdefs.h <<_ACEOF
4139 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4140 _ACEOF
4141
4142 fi
4143
4144 done
4145
4146
4147
4148
4149
4150
4151 for ac_header in stdlib.h string.h syslog.h unistd.h
4152 do
4153 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4154 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4155 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4156 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4157 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4158 echo $ECHO_N "(cached) $ECHO_C" >&6
4159 fi
4160 ac_res=`eval echo '${'$as_ac_Header'}'`
4161 { echo "$as_me:$LINENO: result: $ac_res" >&5
4162 echo "${ECHO_T}$ac_res" >&6; }
4163 else
4164 # Is the header compilable?
4165 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4166 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4167 cat >conftest.$ac_ext <<_ACEOF
4168 /* confdefs.h. */
4169 _ACEOF
4170 cat confdefs.h >>conftest.$ac_ext
4171 cat >>conftest.$ac_ext <<_ACEOF
4172 /* end confdefs.h. */
4173 $ac_includes_default
4174 #include <$ac_header>
4175 _ACEOF
4176 rm -f conftest.$ac_objext
4177 if { (ac_try="$ac_compile"
4178 case "(($ac_try" in
4179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4180 *) ac_try_echo=$ac_try;;
4181 esac
4182 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4183 (eval "$ac_compile") 2>conftest.er1
4184 ac_status=$?
4185 grep -v '^ *+' conftest.er1 >conftest.err
4186 rm -f conftest.er1
4187 cat conftest.err >&5
4188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4189 (exit $ac_status); } && {
4190 test -z "$ac_c_werror_flag" ||
4191 test ! -s conftest.err
4192 } && test -s conftest.$ac_objext; then
4193 ac_header_compiler=yes
4194 else
4195 echo "$as_me: failed program was:" >&5
4196 sed 's/^/| /' conftest.$ac_ext >&5
4197
4198 ac_header_compiler=no
4199 fi
4200
4201 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4202 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4203 echo "${ECHO_T}$ac_header_compiler" >&6; }
4204
4205 # Is the header present?
4206 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4207 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4208 cat >conftest.$ac_ext <<_ACEOF
4209 /* confdefs.h. */
4210 _ACEOF
4211 cat confdefs.h >>conftest.$ac_ext
4212 cat >>conftest.$ac_ext <<_ACEOF
4213 /* end confdefs.h. */
4214 #include <$ac_header>
4215 _ACEOF
4216 if { (ac_try="$ac_cpp conftest.$ac_ext"
4217 case "(($ac_try" in
4218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4219 *) ac_try_echo=$ac_try;;
4220 esac
4221 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4222 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4223 ac_status=$?
4224 grep -v '^ *+' conftest.er1 >conftest.err
4225 rm -f conftest.er1
4226 cat conftest.err >&5
4227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4228 (exit $ac_status); } >/dev/null && {
4229 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4230 test ! -s conftest.err
4231 }; then
4232 ac_header_preproc=yes
4233 else
4234 echo "$as_me: failed program was:" >&5
4235 sed 's/^/| /' conftest.$ac_ext >&5
4236
4237 ac_header_preproc=no
4238 fi
4239
4240 rm -f conftest.err conftest.$ac_ext
4241 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4242 echo "${ECHO_T}$ac_header_preproc" >&6; }
4243
4244 # So? What about this header?
4245 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4246 yes:no: )
4247 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4248 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4249 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4250 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4251 ac_header_preproc=yes
4252 ;;
4253 no:yes:* )
4254 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4255 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4256 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4257 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4258 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4259 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4260 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4261 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4262 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4263 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4264 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4265 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4266 ( cat <<\_ASBOX
4267 ## ------------------------------------- ##
4268 ## Report this to battery-stats@dyne.org ##
4269 ## ------------------------------------- ##
4270 _ASBOX
4271 ) | sed "s/^/$as_me: WARNING: /" >&2
4272 ;;
4273 esac
4274 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4275 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4276 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4277 echo $ECHO_N "(cached) $ECHO_C" >&6
4278 else
4279 eval "$as_ac_Header=\$ac_header_preproc"
4280 fi
4281 ac_res=`eval echo '${'$as_ac_Header'}'`
4282 { echo "$as_me:$LINENO: result: $ac_res" >&5
4283 echo "${ECHO_T}$ac_res" >&6; }
4284
4285 fi
4286 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4287 cat >>confdefs.h <<_ACEOF
4288 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4289 _ACEOF
4290
4291 fi
4292
4293 done
4294
4295
4296 for ac_header in libacpi.h
4297 do
4298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4299 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4300 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4302 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4303 echo $ECHO_N "(cached) $ECHO_C" >&6
4304 fi
4305 ac_res=`eval echo '${'$as_ac_Header'}'`
4306 { echo "$as_me:$LINENO: result: $ac_res" >&5
4307 echo "${ECHO_T}$ac_res" >&6; }
4308 else
4309 # Is the header compilable?
4310 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4311 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4312 cat >conftest.$ac_ext <<_ACEOF
4313 /* confdefs.h. */
4314 _ACEOF
4315 cat confdefs.h >>conftest.$ac_ext
4316 cat >>conftest.$ac_ext <<_ACEOF
4317 /* end confdefs.h. */
4318 $ac_includes_default
4319 #include <$ac_header>
4320 _ACEOF
4321 rm -f conftest.$ac_objext
4322 if { (ac_try="$ac_compile"
4323 case "(($ac_try" in
4324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4325 *) ac_try_echo=$ac_try;;
4326 esac
4327 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4328 (eval "$ac_compile") 2>conftest.er1
4329 ac_status=$?
4330 grep -v '^ *+' conftest.er1 >conftest.err
4331 rm -f conftest.er1
4332 cat conftest.err >&5
4333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4334 (exit $ac_status); } && {
4335 test -z "$ac_c_werror_flag" ||
4336 test ! -s conftest.err
4337 } && test -s conftest.$ac_objext; then
4338 ac_header_compiler=yes
4339 else
4340 echo "$as_me: failed program was:" >&5
4341 sed 's/^/| /' conftest.$ac_ext >&5
4342
4343 ac_header_compiler=no
4344 fi
4345
4346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4347 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4348 echo "${ECHO_T}$ac_header_compiler" >&6; }
4349
4350 # Is the header present?
4351 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4352 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4353 cat >conftest.$ac_ext <<_ACEOF
4354 /* confdefs.h. */
4355 _ACEOF
4356 cat confdefs.h >>conftest.$ac_ext
4357 cat >>conftest.$ac_ext <<_ACEOF
4358 /* end confdefs.h. */
4359 #include <$ac_header>
4360 _ACEOF
4361 if { (ac_try="$ac_cpp conftest.$ac_ext"
4362 case "(($ac_try" in
4363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4364 *) ac_try_echo=$ac_try;;
4365 esac
4366 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4367 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4368 ac_status=$?
4369 grep -v '^ *+' conftest.er1 >conftest.err
4370 rm -f conftest.er1
4371 cat conftest.err >&5
4372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4373 (exit $ac_status); } >/dev/null && {
4374 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4375 test ! -s conftest.err
4376 }; then
4377 ac_header_preproc=yes
4378 else
4379 echo "$as_me: failed program was:" >&5
4380 sed 's/^/| /' conftest.$ac_ext >&5
4381
4382 ac_header_preproc=no
4383 fi
4384
4385 rm -f conftest.err conftest.$ac_ext
4386 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4387 echo "${ECHO_T}$ac_header_preproc" >&6; }
4388
4389 # So? What about this header?
4390 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4391 yes:no: )
4392 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4393 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4394 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4395 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4396 ac_header_preproc=yes
4397 ;;
4398 no:yes:* )
4399 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4400 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4401 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4402 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4403 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4404 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4405 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4406 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4407 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4408 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4409 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4410 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4411 ( cat <<\_ASBOX
4412 ## ------------------------------------- ##
4413 ## Report this to battery-stats@dyne.org ##
4414 ## ------------------------------------- ##
4415 _ASBOX
4416 ) | sed "s/^/$as_me: WARNING: /" >&2
4417 ;;
4418 esac
4419 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4420 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4421 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4422 echo $ECHO_N "(cached) $ECHO_C" >&6
4423 else
4424 eval "$as_ac_Header=\$ac_header_preproc"
4425 fi
4426 ac_res=`eval echo '${'$as_ac_Header'}'`
4427 { echo "$as_me:$LINENO: result: $ac_res" >&5
4428 echo "${ECHO_T}$ac_res" >&6; }
4429
4430 fi
4431 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4432 cat >>confdefs.h <<_ACEOF
4433 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4434 _ACEOF
4435
4436 fi
4437
4438 done
4439
4440
4441 #### Checks for typedefs, structures, and compiler characteristics.
4442 { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
4443 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
4444 if test "${ac_cv_c_const+set}" = set; then
4445 echo $ECHO_N "(cached) $ECHO_C" >&6
4446 else
4447 cat >conftest.$ac_ext <<_ACEOF
4448 /* confdefs.h. */
4449 _ACEOF
4450 cat confdefs.h >>conftest.$ac_ext
4451 cat >>conftest.$ac_ext <<_ACEOF
4452 /* end confdefs.h. */
4453
4454 int
4455 main ()
4456 {
4457 /* FIXME: Include the comments suggested by Paul. */
4458 #ifndef __cplusplus
4459 /* Ultrix mips cc rejects this. */
4460 typedef int charset[2];
4461 const charset cs;
4462 /* SunOS 4.1.1 cc rejects this. */
4463 char const *const *pcpcc;
4464 char **ppc;
4465 /* NEC SVR4.0.2 mips cc rejects this. */
4466 struct point {int x, y;};
4467 static struct point const zero = {0,0};
4468 /* AIX XL C 1.02.0.0 rejects this.
4469 It does not let you subtract one const X* pointer from another in
4470 an arm of an if-expression whose if-part is not a constant
4471 expression */
4472 const char *g = "string";
4473 pcpcc = &g + (g ? g-g : 0);
4474 /* HPUX 7.0 cc rejects these. */
4475 ++pcpcc;
4476 ppc = (char**) pcpcc;
4477 pcpcc = (char const *const *) ppc;
4478 { /* SCO 3.2v4 cc rejects this. */
4479 char *t;
4480 char const *s = 0 ? (char *) 0 : (char const *) 0;
4481
4482 *t++ = 0;
4483 if (s) return 0;
4484 }
4485 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4486 int x[] = {25, 17};
4487 const int *foo = &x[0];
4488 ++foo;
4489 }
4490 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4491 typedef const int *iptr;
4492 iptr p = 0;
4493 ++p;
4494 }
4495 { /* AIX XL C 1.02.0.0 rejects this saying
4496 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4497 struct s { int j; const int *ap[3]; };
4498 struct s *b; b->j = 5;
4499 }
4500 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4501 const int foo = 10;
4502 if (!foo) return 0;
4503 }
4504 return !cs[0] && !zero.x;
4505 #endif
4506
4507 ;
4508 return 0;
4509 }
4510 _ACEOF
4511 rm -f conftest.$ac_objext
4512 if { (ac_try="$ac_compile"
4513 case "(($ac_try" in
4514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4515 *) ac_try_echo=$ac_try;;
4516 esac
4517 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4518 (eval "$ac_compile") 2>conftest.er1
4519 ac_status=$?
4520 grep -v '^ *+' conftest.er1 >conftest.err
4521 rm -f conftest.er1
4522 cat conftest.err >&5
4523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4524 (exit $ac_status); } && {
4525 test -z "$ac_c_werror_flag" ||
4526 test ! -s conftest.err
4527 } && test -s conftest.$ac_objext; then
4528 ac_cv_c_const=yes
4529 else
4530 echo "$as_me: failed program was:" >&5
4531 sed 's/^/| /' conftest.$ac_ext >&5
4532
4533 ac_cv_c_const=no
4534 fi
4535
4536 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4537 fi
4538 { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
4539 echo "${ECHO_T}$ac_cv_c_const" >&6; }
4540 if test $ac_cv_c_const = no; then
4541
4542 cat >>confdefs.h <<\_ACEOF
4543 #define const
4544 _ACEOF
4545
4546 fi
4547
4548 { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
4549 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; }
4550 if test "${ac_cv_struct_tm+set}" = set; then
4551 echo $ECHO_N "(cached) $ECHO_C" >&6
4552 else
4553 cat >conftest.$ac_ext <<_ACEOF
4554 /* confdefs.h. */
4555 _ACEOF
4556 cat confdefs.h >>conftest.$ac_ext
4557 cat >>conftest.$ac_ext <<_ACEOF
4558 /* end confdefs.h. */
4559 #include <sys/types.h>
4560 #include <time.h>
4561
4562 int
4563 main ()
4564 {
4565 struct tm tm;
4566 int *p = &tm.tm_sec;
4567 return !p;
4568 ;
4569 return 0;
4570 }
4571 _ACEOF
4572 rm -f conftest.$ac_objext
4573 if { (ac_try="$ac_compile"
4574 case "(($ac_try" in
4575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4576 *) ac_try_echo=$ac_try;;
4577 esac
4578 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4579 (eval "$ac_compile") 2>conftest.er1
4580 ac_status=$?
4581 grep -v '^ *+' conftest.er1 >conftest.err
4582 rm -f conftest.er1
4583 cat conftest.err >&5
4584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4585 (exit $ac_status); } && {
4586 test -z "$ac_c_werror_flag" ||
4587 test ! -s conftest.err
4588 } && test -s conftest.$ac_objext; then
4589 ac_cv_struct_tm=time.h
4590 else
4591 echo "$as_me: failed program was:" >&5
4592 sed 's/^/| /' conftest.$ac_ext >&5
4593
4594 ac_cv_struct_tm=sys/time.h
4595 fi
4596
4597 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4598 fi
4599 { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
4600 echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
4601 if test $ac_cv_struct_tm = sys/time.h; then
4602
4603 cat >>confdefs.h <<\_ACEOF
4604 #define TM_IN_SYS_TIME 1
4605 _ACEOF
4606
4607 fi
4608
4609
4610 #### Checks for library functions.
4611
4612 for ac_header in stdlib.h
4613 do
4614 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4615 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4616 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4617 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4618 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4619 echo $ECHO_N "(cached) $ECHO_C" >&6
4620 fi
4621 ac_res=`eval echo '${'$as_ac_Header'}'`
4622 { echo "$as_me:$LINENO: result: $ac_res" >&5
4623 echo "${ECHO_T}$ac_res" >&6; }
4624 else
4625 # Is the header compilable?
4626 { echo "$as_me:$LINENO: checking $ac_header usability" >&5
4627 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
4628 cat >conftest.$ac_ext <<_ACEOF
4629 /* confdefs.h. */
4630 _ACEOF
4631 cat confdefs.h >>conftest.$ac_ext
4632 cat >>conftest.$ac_ext <<_ACEOF
4633 /* end confdefs.h. */
4634 $ac_includes_default
4635 #include <$ac_header>
4636 _ACEOF
4637 rm -f conftest.$ac_objext
4638 if { (ac_try="$ac_compile"
4639 case "(($ac_try" in
4640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4641 *) ac_try_echo=$ac_try;;
4642 esac
4643 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4644 (eval "$ac_compile") 2>conftest.er1
4645 ac_status=$?
4646 grep -v '^ *+' conftest.er1 >conftest.err
4647 rm -f conftest.er1
4648 cat conftest.err >&5
4649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4650 (exit $ac_status); } && {
4651 test -z "$ac_c_werror_flag" ||
4652 test ! -s conftest.err
4653 } && test -s conftest.$ac_objext; then
4654 ac_header_compiler=yes
4655 else
4656 echo "$as_me: failed program was:" >&5
4657 sed 's/^/| /' conftest.$ac_ext >&5
4658
4659 ac_header_compiler=no
4660 fi
4661
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4663 { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4664 echo "${ECHO_T}$ac_header_compiler" >&6; }
4665
4666 # Is the header present?
4667 { echo "$as_me:$LINENO: checking $ac_header presence" >&5
4668 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
4669 cat >conftest.$ac_ext <<_ACEOF
4670 /* confdefs.h. */
4671 _ACEOF
4672 cat confdefs.h >>conftest.$ac_ext
4673 cat >>conftest.$ac_ext <<_ACEOF
4674 /* end confdefs.h. */
4675 #include <$ac_header>
4676 _ACEOF
4677 if { (ac_try="$ac_cpp conftest.$ac_ext"
4678 case "(($ac_try" in
4679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4680 *) ac_try_echo=$ac_try;;
4681 esac
4682 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4683 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4684 ac_status=$?
4685 grep -v '^ *+' conftest.er1 >conftest.err
4686 rm -f conftest.er1
4687 cat conftest.err >&5
4688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4689 (exit $ac_status); } >/dev/null && {
4690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4691 test ! -s conftest.err
4692 }; then
4693 ac_header_preproc=yes
4694 else
4695 echo "$as_me: failed program was:" >&5
4696 sed 's/^/| /' conftest.$ac_ext >&5
4697
4698 ac_header_preproc=no
4699 fi
4700
4701 rm -f conftest.err conftest.$ac_ext
4702 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4703 echo "${ECHO_T}$ac_header_preproc" >&6; }
4704
4705 # So? What about this header?
4706 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4707 yes:no: )
4708 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4709 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
4710 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4711 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4712 ac_header_preproc=yes
4713 ;;
4714 no:yes:* )
4715 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4716 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4717 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4718 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4719 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4720 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4721 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4722 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
4723 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4724 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4725 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4726 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
4727 ( cat <<\_ASBOX
4728 ## ------------------------------------- ##
4729 ## Report this to battery-stats@dyne.org ##
4730 ## ------------------------------------- ##
4731 _ASBOX
4732 ) | sed "s/^/$as_me: WARNING: /" >&2
4733 ;;
4734 esac
4735 { echo "$as_me:$LINENO: checking for $ac_header" >&5
4736 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
4737 if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4738 echo $ECHO_N "(cached) $ECHO_C" >&6
4739 else
4740 eval "$as_ac_Header=\$ac_header_preproc"
4741 fi
4742 ac_res=`eval echo '${'$as_ac_Header'}'`
4743 { echo "$as_me:$LINENO: result: $ac_res" >&5
4744 echo "${ECHO_T}$ac_res" >&6; }
4745
4746 fi
4747 if test `eval echo '${'$as_ac_Header'}'` = yes; then
4748 cat >>confdefs.h <<_ACEOF
4749 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4750 _ACEOF
4751
4752 fi
4753
4754 done
4755
4756 { echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5
4757 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; }
4758 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then
4759 echo $ECHO_N "(cached) $ECHO_C" >&6
4760 else
4761 if test "$cross_compiling" = yes; then
4762 ac_cv_func_malloc_0_nonnull=no
4763 else
4764 cat >conftest.$ac_ext <<_ACEOF
4765 /* confdefs.h. */
4766 _ACEOF
4767 cat confdefs.h >>conftest.$ac_ext
4768 cat >>conftest.$ac_ext <<_ACEOF
4769 /* end confdefs.h. */
4770 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
4771 # include <stdlib.h>
4772 #else
4773 char *malloc ();
4774 #endif
4775
4776 int
4777 main ()
4778 {
4779 return ! malloc (0);
4780 ;
4781 return 0;
4782 }
4783 _ACEOF
4784 rm -f conftest$ac_exeext
4785 if { (ac_try="$ac_link"
4786 case "(($ac_try" in
4787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4788 *) ac_try_echo=$ac_try;;
4789 esac
4790 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4791 (eval "$ac_link") 2>&5
4792 ac_status=$?
4793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4794 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4795 { (case "(($ac_try" in
4796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4797 *) ac_try_echo=$ac_try;;
4798 esac
4799 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4800 (eval "$ac_try") 2>&5
4801 ac_status=$?
4802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4804 ac_cv_func_malloc_0_nonnull=yes
4805 else
4806 echo "$as_me: program exited with status $ac_status" >&5
4807 echo "$as_me: failed program was:" >&5
4808 sed 's/^/| /' conftest.$ac_ext >&5
4809
4810 ( exit $ac_status )
4811 ac_cv_func_malloc_0_nonnull=no
4812 fi
4813 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4814 fi
4815
4816
4817 fi
4818 { echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5
4819 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; }
4820 if test $ac_cv_func_malloc_0_nonnull = yes; then
4821
4822 cat >>confdefs.h <<\_ACEOF
4823 #define HAVE_MALLOC 1
4824 _ACEOF
4825
4826 else
4827 cat >>confdefs.h <<\_ACEOF
4828 #define HAVE_MALLOC 0
4829 _ACEOF
4830
4831 case " $LIBOBJS " in
4832 *" malloc.$ac_objext "* ) ;;
4833 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
4834 ;;
4835 esac
4836
4837
4838 cat >>confdefs.h <<\_ACEOF
4839 #define malloc rpl_malloc
4840 _ACEOF
4841
4842 fi
4843
4844
4845
4846
4847
4848 for ac_func in strerror strtol
4849 do
4850 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4851 { echo "$as_me:$LINENO: checking for $ac_func" >&5
4852 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
4853 if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
4854 echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856 cat >conftest.$ac_ext <<_ACEOF
4857 /* confdefs.h. */
4858 _ACEOF
4859 cat confdefs.h >>conftest.$ac_ext
4860 cat >>conftest.$ac_ext <<_ACEOF
4861 /* end confdefs.h. */
4862 /* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
4863 For example, HP-UX 11i <limits.h> declares gettimeofday. */
4864 #define $ac_func innocuous_$ac_func
4865
4866 /* System header to define __stub macros and hopefully few prototypes,
4867 which can conflict with char $ac_func (); below.
4868 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4869 <limits.h> exists even on freestanding compilers. */
4870
4871 #ifdef __STDC__
4872 # include <limits.h>
4873 #else
4874 # include <assert.h>
4875 #endif
4876
4877 #undef $ac_func
4878
4879 /* Override any GCC internal prototype to avoid an error.
4880 Use char because int might match the return type of a GCC
4881 builtin and then its argument prototype would still apply. */
4882 #ifdef __cplusplus
4883 extern "C"
4884 #endif
4885 char $ac_func ();
4886 /* The GNU C library defines this for functions which it implements
4887 to always fail with ENOSYS. Some functions are actually named
4888 something starting with __ and the normal name is an alias. */
4889 #if defined __stub_$ac_func || defined __stub___$ac_func
4890 choke me
4891 #endif
4892
4893 int
4894 main ()
4895 {
4896 return $ac_func ();
4897 ;
4898 return 0;
4899 }
4900 _ACEOF
4901 rm -f conftest.$ac_objext conftest$ac_exeext
4902 if { (ac_try="$ac_link"
4903 case "(($ac_try" in
4904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4905 *) ac_try_echo=$ac_try;;
4906 esac
4907 eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4908 (eval "$ac_link") 2>conftest.er1
4909 ac_status=$?
4910 grep -v '^ *+' conftest.er1 >conftest.err
4911 rm -f conftest.er1
4912 cat conftest.err >&5
4913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4914 (exit $ac_status); } && {
4915 test -z "$ac_c_werror_flag" ||
4916 test ! -s conftest.err
4917 } && test -s conftest$ac_exeext &&
4918 $as_test_x conftest$ac_exeext; then
4919 eval "$as_ac_var=yes"
4920 else
4921 echo "$as_me: failed program was:" >&5
4922 sed 's/^/| /' conftest.$ac_ext >&5
4923
4924 eval "$as_ac_var=no"
4925 fi
4926
4927 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
4928 conftest$ac_exeext conftest.$ac_ext
4929 fi
4930 ac_res=`eval echo '${'$as_ac_var'}'`
4931 { echo "$as_me:$LINENO: result: $ac_res" >&5
4932 echo "${ECHO_T}$ac_res" >&6; }
4933 if test `eval echo '${'$as_ac_var'}'` = yes; then
4934 cat >>confdefs.h <<_ACEOF
4935 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4936 _ACEOF
4937
4938 fi
4939 done
4940
4941
4942
4943 #### Output
4944 ac_config_headers="$ac_config_headers config.h"
4945
4946 ac_config_files="$ac_config_files Makefile src/Makefile man/Makefile src/battery-graph pixmaps/Makefile"
4947
4948 cat >confcache <<\_ACEOF
4949 # This file is a shell script that caches the results of configure
4950 # tests run on this system so they can be shared between configure
4951 # scripts and configure runs, see configure's option --config-cache.
4952 # It is not useful on other systems. If it contains results you don't
4953 # want to keep, you may remove or edit it.
4954 #
4955 # config.status only pays attention to the cache file if you give it
4956 # the --recheck option to rerun configure.
4957 #
4958 # `ac_cv_env_foo' variables (set or unset) will be overridden when
4959 # loading this file, other *unset* `ac_cv_foo' will be assigned the
4960 # following values.
4961
4962 _ACEOF
4963
4964 # The following way of writing the cache mishandles newlines in values,
4965 # but we know of no workaround that is simple, portable, and efficient.
4966 # So, we kill variables containing newlines.
4967 # Ultrix sh set writes to stderr and can't be redirected directly,
4968 # and sets the high bit in the cache file unless we assign to the vars.
4969 (
4970 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4971 eval ac_val=\$$ac_var
4972 case $ac_val in #(
4973 *${as_nl}*)
4974 case $ac_var in #(
4975 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
4976 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
4977 esac
4978 case $ac_var in #(
4979 _ | IFS | as_nl) ;; #(
4980 *) $as_unset $ac_var ;;
4981 esac ;;
4982 esac
4983 done
4984
4985 (set) 2>&1 |
4986 case $as_nl`(ac_space=' '; set) 2>&1` in #(
4987 *${as_nl}ac_space=\ *)
4988 # `set' does not quote correctly, so add quotes (double-quote
4989 # substitution turns \\\\ into \\, and sed turns \\ into \).
4990 sed -n \
4991 "s/'/'\\\\''/g;
4992 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4993 ;; #(
4994 *)
4995 # `set' quotes correctly as required by POSIX, so do not add quotes.
4996 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4997 ;;
4998 esac |
4999 sort
5000 ) |
5001 sed '
5002 /^ac_cv_env_/b end
5003 t clear
5004 :clear
5005 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
5006 t end
5007 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
5008 :end' >>confcache
5009 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
5010 if test -w "$cache_file"; then
5011 test "x$cache_file" != "x/dev/null" &&
5012 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
5013 echo "$as_me: updating cache $cache_file" >&6;}
5014 cat confcache >$cache_file
5015 else
5016 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
5017 echo "$as_me: not updating unwritable cache $cache_file" >&6;}
5018 fi
5019 fi
5020 rm -f confcache
5021
5022 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5023 # Let make expand exec_prefix.
5024 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5025
5026 DEFS=-DHAVE_CONFIG_H
5027
5028 ac_libobjs=
5029 ac_ltlibobjs=
5030 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
5031 # 1. Remove the extension, and $U if already installed.
5032 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
5033 ac_i=`echo "$ac_i" | sed "$ac_script"`
5034 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
5035 # will be set to the directory where LIBOBJS objects are built.
5036 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
5037 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
5038 done
5039 LIBOBJS=$ac_libobjs
5040
5041 LTLIBOBJS=$ac_ltlibobjs
5042
5043
5044 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
5045 { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
5046 Usually this means the macro was only invoked conditionally." >&5
5047 echo "$as_me: error: conditional \"AMDEP\" was never defined.
5048 Usually this means the macro was only invoked conditionally." >&2;}
5049 { (exit 1); exit 1; }; }
5050 fi
5051 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
5052 { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
5053 Usually this means the macro was only invoked conditionally." >&5
5054 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
5055 Usually this means the macro was only invoked conditionally." >&2;}
5056 { (exit 1); exit 1; }; }
5057 fi
5058
5059 : ${CONFIG_STATUS=./config.status}
5060 ac_clean_files_save=$ac_clean_files
5061 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
5062 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
5063 echo "$as_me: creating $CONFIG_STATUS" >&6;}
5064 cat >$CONFIG_STATUS <<_ACEOF
5065 #! $SHELL
5066 # Generated by $as_me.
5067 # Run this file to recreate the current configuration.
5068 # Compiler output produced by configure, useful for debugging
5069 # configure, is in config.log if it exists.
5070
5071 debug=false
5072 ac_cs_recheck=false
5073 ac_cs_silent=false
5074 SHELL=\${CONFIG_SHELL-$SHELL}
5075 _ACEOF
5076
5077 cat >>$CONFIG_STATUS <<\_ACEOF
5078 ## --------------------- ##
5079 ## M4sh Initialization. ##
5080 ## --------------------- ##
5081
5082 # Be more Bourne compatible
5083 DUALCASE=1; export DUALCASE # for MKS sh
5084 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
5085 emulate sh
5086 NULLCMD=:
5087 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
5088 # is contrary to our usage. Disable this feature.
5089 alias -g '${1+"$@"}'='"$@"'
5090 setopt NO_GLOB_SUBST
5091 else
5092 case `(set -o) 2>/dev/null` in
5093 *posix*) set -o posix ;;
5094 esac
5095
5096 fi
5097
5098
5099
5100
5101 # PATH needs CR
5102 # Avoid depending upon Character Ranges.
5103 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5104 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5105 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5106 as_cr_digits='0123456789'
5107 as_cr_alnum=$as_cr_Letters$as_cr_digits
5108
5109 # The user is always right.
5110 if test "${PATH_SEPARATOR+set}" != set; then
5111 echo "#! /bin/sh" >conf$$.sh
5112 echo "exit 0" >>conf$$.sh
5113 chmod +x conf$$.sh
5114 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
5115 PATH_SEPARATOR=';'
5116 else
5117 PATH_SEPARATOR=:
5118 fi
5119 rm -f conf$$.sh
5120 fi
5121
5122 # Support unset when possible.
5123 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
5124 as_unset=unset
5125 else
5126 as_unset=false
5127 fi
5128
5129
5130 # IFS
5131 # We need space, tab and new line, in precisely that order. Quoting is
5132 # there to prevent editors from complaining about space-tab.
5133 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
5134 # splitting by setting IFS to empty value.)
5135 as_nl='
5136 '
5137 IFS=" "" $as_nl"
5138
5139 # Find who we are. Look in the path if we contain no directory separator.
5140 case $0 in
5141 *[\\/]* ) as_myself=$0 ;;
5142 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5143 for as_dir in $PATH
5144 do
5145 IFS=$as_save_IFS
5146 test -z "$as_dir" && as_dir=.
5147 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5148 done
5149 IFS=$as_save_IFS
5150
5151 ;;
5152 esac
5153 # We did not find ourselves, most probably we were run as `sh COMMAND'
5154 # in which case we are not to be found in the path.
5155 if test "x$as_myself" = x; then
5156 as_myself=$0
5157 fi
5158 if test ! -f "$as_myself"; then
5159 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
5160 { (exit 1); exit 1; }
5161 fi
5162
5163 # Work around bugs in pre-3.0 UWIN ksh.
5164 for as_var in ENV MAIL MAILPATH
5165 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
5166 done
5167 PS1='$ '
5168 PS2='> '
5169 PS4='+ '
5170
5171 # NLS nuisances.
5172 for as_var in \
5173 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
5174 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
5175 LC_TELEPHONE LC_TIME
5176 do
5177 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
5178 eval $as_var=C; export $as_var
5179 else
5180 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
5181 fi
5182 done
5183
5184 # Required to use basename.
5185 if expr a : '\(a\)' >/dev/null 2>&1 &&
5186 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5187 as_expr=expr
5188 else
5189 as_expr=false
5190 fi
5191
5192 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5193 as_basename=basename
5194 else
5195 as_basename=false
5196 fi
5197
5198
5199 # Name of the executable.
5200 as_me=`$as_basename -- "$0" ||
5201 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5202 X"$0" : 'X\(//\)$' \| \
5203 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
5204 echo X/"$0" |
5205 sed '/^.*\/\([^/][^/]*\)\/*$/{
5206 s//\1/
5207 q
5208 }
5209 /^X\/\(\/\/\)$/{
5210 s//\1/
5211 q
5212 }
5213 /^X\/\(\/\).*/{
5214 s//\1/
5215 q
5216 }
5217 s/.*/./; q'`
5218
5219 # CDPATH.
5220 $as_unset CDPATH
5221
5222
5223
5224 as_lineno_1=$LINENO
5225 as_lineno_2=$LINENO
5226 test "x$as_lineno_1" != "x$as_lineno_2" &&
5227 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
5228
5229 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
5230 # uniformly replaced by the line number. The first 'sed' inserts a
5231 # line-number line after each line using $LINENO; the second 'sed'
5232 # does the real work. The second script uses 'N' to pair each
5233 # line-number line with the line containing $LINENO, and appends
5234 # trailing '-' during substitution so that $LINENO is not a special
5235 # case at line end.
5236 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
5237 # scripts with optimization help from Paolo Bonzini. Blame Lee
5238 # E. McMahon (1931-1989) for sed's syntax. :-)
5239 sed -n '
5240 p
5241 /[$]LINENO/=
5242 ' <$as_myself |
5243 sed '
5244 s/[$]LINENO.*/&-/
5245 t lineno
5246 b
5247 :lineno
5248 N
5249 :loop
5250 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
5251 t loop
5252 s/-\n.*//
5253 ' >$as_me.lineno &&
5254 chmod +x "$as_me.lineno" ||
5255 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
5256 { (exit 1); exit 1; }; }
5257
5258 # Don't try to exec as it changes $[0], causing all sort of problems
5259 # (the dirname of $[0] is not the place where we might find the
5260 # original and so on. Autoconf is especially sensitive to this).
5261 . "./$as_me.lineno"
5262 # Exit status is that of the last command.
5263 exit
5264 }
5265
5266
5267 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
5268 as_dirname=dirname
5269 else
5270 as_dirname=false
5271 fi
5272
5273 ECHO_C= ECHO_N= ECHO_T=
5274 case `echo -n x` in
5275 -n*)
5276 case `echo 'x\c'` in
5277 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
5278 *) ECHO_C='\c';;
5279 esac;;
5280 *)
5281 ECHO_N='-n';;
5282 esac
5283
5284 if expr a : '\(a\)' >/dev/null 2>&1 &&
5285 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5286 as_expr=expr
5287 else
5288 as_expr=false
5289 fi
5290
5291 rm -f conf$$ conf$$.exe conf$$.file
5292 if test -d conf$$.dir; then
5293 rm -f conf$$.dir/conf$$.file
5294 else
5295 rm -f conf$$.dir
5296 mkdir conf$$.dir
5297 fi
5298 echo >conf$$.file
5299 if ln -s conf$$.file conf$$ 2>/dev/null; then
5300 as_ln_s='ln -s'
5301 # ... but there are two gotchas:
5302 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
5303 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
5304 # In both cases, we have to default to `cp -p'.
5305 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
5306 as_ln_s='cp -p'
5307 elif ln conf$$.file conf$$ 2>/dev/null; then
5308 as_ln_s=ln
5309 else
5310 as_ln_s='cp -p'
5311 fi
5312 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
5313 rmdir conf$$.dir 2>/dev/null
5314
5315 if mkdir -p . 2>/dev/null; then
5316 as_mkdir_p=:
5317 else
5318 test -d ./-p && rmdir ./-p
5319 as_mkdir_p=false
5320 fi
5321
5322 if test -x / >/dev/null 2>&1; then
5323 as_test_x='test -x'
5324 else
5325 if ls -dL / >/dev/null 2>&1; then
5326 as_ls_L_option=L
5327 else
5328 as_ls_L_option=
5329 fi
5330 as_test_x='
5331 eval sh -c '\''
5332 if test -d "$1"; then
5333 test -d "$1/.";
5334 else
5335 case $1 in
5336 -*)set "./$1";;
5337 esac;
5338 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
5339 ???[sx]*):;;*)false;;esac;fi
5340 '\'' sh
5341 '
5342 fi
5343 as_executable_p=$as_test_x
5344
5345 # Sed expression to map a string onto a valid CPP name.
5346 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
5347
5348 # Sed expression to map a string onto a valid variable name.
5349 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
5350
5351
5352 exec 6>&1
5353
5354 # Save the log message, to keep $[0] and so on meaningful, and to
5355 # report actual input values of CONFIG_FILES etc. instead of their
5356 # values after options handling.
5357 ac_log="
5358 This file was extended by battery-stats $as_me 0.3.4, which was
5359 generated by GNU Autoconf 2.61. Invocation command line was
5360
5361 CONFIG_FILES = $CONFIG_FILES
5362 CONFIG_HEADERS = $CONFIG_HEADERS
5363 CONFIG_LINKS = $CONFIG_LINKS
5364 CONFIG_COMMANDS = $CONFIG_COMMANDS
5365 $ $0 $@
5366
5367 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5368 "
5369
5370 _ACEOF
5371
5372 cat >>$CONFIG_STATUS <<_ACEOF
5373 # Files that config.status was made for.
5374 config_files="$ac_config_files"
5375 config_headers="$ac_config_headers"
5376 config_commands="$ac_config_commands"
5377
5378 _ACEOF
5379
5380 cat >>$CONFIG_STATUS <<\_ACEOF
5381 ac_cs_usage="\
5382 \`$as_me' instantiates files from templates according to the
5383 current configuration.
5384
5385 Usage: $0 [OPTIONS] [FILE]...
5386
5387 -h, --help print this help, then exit
5388 -V, --version print version number and configuration settings, then exit
5389 -q, --quiet do not print progress messages
5390 -d, --debug don't remove temporary files
5391 --recheck update $as_me by reconfiguring in the same conditions
5392 --file=FILE[:TEMPLATE]
5393 instantiate the configuration file FILE
5394 --header=FILE[:TEMPLATE]
5395 instantiate the configuration header FILE
5396
5397 Configuration files:
5398 $config_files
5399
5400 Configuration headers:
5401 $config_headers
5402
5403 Configuration commands:
5404 $config_commands
5405
5406 Report bugs to <bug-autoconf@gnu.org>."
5407
5408 _ACEOF
5409 cat >>$CONFIG_STATUS <<_ACEOF
5410 ac_cs_version="\\
5411 battery-stats config.status 0.3.4
5412 configured by $0, generated by GNU Autoconf 2.61,
5413 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
5414
5415 Copyright (C) 2006 Free Software Foundation, Inc.
5416 This config.status script is free software; the Free Software Foundation
5417 gives unlimited permission to copy, distribute and modify it."
5418
5419 ac_pwd='$ac_pwd'
5420 srcdir='$srcdir'
5421 INSTALL='$INSTALL'
5422 MKDIR_P='$MKDIR_P'
5423 _ACEOF
5424
5425 cat >>$CONFIG_STATUS <<\_ACEOF
5426 # If no file are specified by the user, then we need to provide default
5427 # value. By we need to know if files were specified by the user.
5428 ac_need_defaults=:
5429 while test $# != 0
5430 do
5431 case $1 in
5432 --*=*)
5433 ac_option=`expr "X$1" : 'X\([^=]*\)='`
5434 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
5435 ac_shift=:
5436 ;;
5437 *)
5438 ac_option=$1
5439 ac_optarg=$2
5440 ac_shift=shift
5441 ;;
5442 esac
5443
5444 case $ac_option in
5445 # Handling of the options.
5446 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5447 ac_cs_recheck=: ;;
5448 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
5449 echo "$ac_cs_version"; exit ;;
5450 --debug | --debu | --deb | --de | --d | -d )
5451 debug=: ;;
5452 --file | --fil | --fi | --f )
5453 $ac_shift
5454 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
5455 ac_need_defaults=false;;
5456 --header | --heade | --head | --hea )
5457 $ac_shift
5458 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
5459 ac_need_defaults=false;;
5460 --he | --h)
5461 # Conflict between --help and --header
5462 { echo "$as_me: error: ambiguous option: $1
5463 Try \`$0 --help' for more information." >&2
5464 { (exit 1); exit 1; }; };;
5465 --help | --hel | -h )
5466 echo "$ac_cs_usage"; exit ;;
5467 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5468 | -silent | --silent | --silen | --sile | --sil | --si | --s)
5469 ac_cs_silent=: ;;
5470
5471 # This is an error.
5472 -*) { echo "$as_me: error: unrecognized option: $1
5473 Try \`$0 --help' for more information." >&2
5474 { (exit 1); exit 1; }; } ;;
5475
5476 *) ac_config_targets="$ac_config_targets $1"
5477 ac_need_defaults=false ;;
5478
5479 esac
5480 shift
5481 done
5482
5483 ac_configure_extra_args=
5484
5485 if $ac_cs_silent; then
5486 exec 6>/dev/null
5487 ac_configure_extra_args="$ac_configure_extra_args --silent"
5488 fi
5489
5490 _ACEOF
5491 cat >>$CONFIG_STATUS <<_ACEOF
5492 if \$ac_cs_recheck; then
5493 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
5494 CONFIG_SHELL=$SHELL
5495 export CONFIG_SHELL
5496 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5497 fi
5498
5499 _ACEOF
5500 cat >>$CONFIG_STATUS <<\_ACEOF
5501 exec 5>>config.log
5502 {
5503 echo
5504 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
5505 ## Running $as_me. ##
5506 _ASBOX
5507 echo "$ac_log"
5508 } >&5
5509
5510 _ACEOF
5511 cat >>$CONFIG_STATUS <<_ACEOF
5512 #
5513 # INIT-COMMANDS
5514 #
5515 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
5516
5517 _ACEOF
5518
5519 cat >>$CONFIG_STATUS <<\_ACEOF
5520
5521 # Handling of arguments.
5522 for ac_config_target in $ac_config_targets
5523 do
5524 case $ac_config_target in
5525 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
5526 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
5527 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
5528 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
5529 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
5530 "src/battery-graph") CONFIG_FILES="$CONFIG_FILES src/battery-graph" ;;
5531 "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;;
5532
5533 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
5534 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
5535 { (exit 1); exit 1; }; };;
5536 esac
5537 done
5538
5539
5540 # If the user did not use the arguments to specify the items to instantiate,
5541 # then the envvar interface is used. Set only those that are not.
5542 # We use the long form for the default assignment because of an extremely
5543 # bizarre bug on SunOS 4.1.3.
5544 if $ac_need_defaults; then
5545 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5546 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5547 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
5548 fi
5549
5550 # Have a temporary directory for convenience. Make it in the build tree
5551 # simply because there is no reason against having it here, and in addition,
5552 # creating and moving files from /tmp can sometimes cause problems.
5553 # Hook for its removal unless debugging.
5554 # Note that there is a small window in which the directory will not be cleaned:
5555 # after its creation but before its name has been assigned to `$tmp'.
5556 $debug ||
5557 {
5558 tmp=
5559 trap 'exit_status=$?
5560 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
5561 ' 0
5562 trap '{ (exit 1); exit 1; }' 1 2 13 15
5563 }
5564 # Create a (secure) tmp directory for tmp files.
5565
5566 {
5567 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
5568 test -n "$tmp" && test -d "$tmp"
5569 } ||
5570 {
5571 tmp=./conf$$-$RANDOM
5572 (umask 077 && mkdir "$tmp")
5573 } ||
5574 {
5575 echo "$me: cannot create a temporary directory in ." >&2
5576 { (exit 1); exit 1; }
5577 }
5578
5579 #
5580 # Set up the sed scripts for CONFIG_FILES section.
5581 #
5582
5583 # No need to generate the scripts if there are no CONFIG_FILES.
5584 # This happens for instance when ./config.status config.h
5585 if test -n "$CONFIG_FILES"; then
5586
5587 _ACEOF
5588
5589
5590
5591 ac_delim='%!_!# '
5592 for ac_last_try in false false false false false :; do
5593 cat >conf$$subs.sed <<_ACEOF
5594 SHELL!$SHELL$ac_delim
5595 PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
5596 PACKAGE_NAME!$PACKAGE_NAME$ac_delim
5597 PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
5598 PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
5599 PACKAGE_STRING!$PACKAGE_STRING$ac_delim
5600 PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
5601 exec_prefix!$exec_prefix$ac_delim
5602 prefix!$prefix$ac_delim
5603 program_transform_name!$program_transform_name$ac_delim
5604 bindir!$bindir$ac_delim
5605 sbindir!$sbindir$ac_delim
5606 libexecdir!$libexecdir$ac_delim
5607 datarootdir!$datarootdir$ac_delim
5608 datadir!$datadir$ac_delim
5609 sysconfdir!$sysconfdir$ac_delim
5610 sharedstatedir!$sharedstatedir$ac_delim
5611 localstatedir!$localstatedir$ac_delim
5612 includedir!$includedir$ac_delim
5613 oldincludedir!$oldincludedir$ac_delim
5614 docdir!$docdir$ac_delim
5615 infodir!$infodir$ac_delim
5616 htmldir!$htmldir$ac_delim
5617 dvidir!$dvidir$ac_delim
5618 pdfdir!$pdfdir$ac_delim
5619 psdir!$psdir$ac_delim
5620 libdir!$libdir$ac_delim
5621 localedir!$localedir$ac_delim
5622 mandir!$mandir$ac_delim
5623 DEFS!$DEFS$ac_delim
5624 ECHO_C!$ECHO_C$ac_delim
5625 ECHO_N!$ECHO_N$ac_delim
5626 ECHO_T!$ECHO_T$ac_delim
5627 LIBS!$LIBS$ac_delim
5628 build_alias!$build_alias$ac_delim
5629 host_alias!$host_alias$ac_delim
5630 target_alias!$target_alias$ac_delim
5631 INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
5632 INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
5633 INSTALL_DATA!$INSTALL_DATA$ac_delim
5634 am__isrc!$am__isrc$ac_delim
5635 CYGPATH_W!$CYGPATH_W$ac_delim
5636 PACKAGE!$PACKAGE$ac_delim
5637 VERSION!$VERSION$ac_delim
5638 ACLOCAL!$ACLOCAL$ac_delim
5639 AUTOCONF!$AUTOCONF$ac_delim
5640 AUTOMAKE!$AUTOMAKE$ac_delim
5641 AUTOHEADER!$AUTOHEADER$ac_delim
5642 MAKEINFO!$MAKEINFO$ac_delim
5643 install_sh!$install_sh$ac_delim
5644 STRIP!$STRIP$ac_delim
5645 INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim
5646 mkdir_p!$mkdir_p$ac_delim
5647 AWK!$AWK$ac_delim
5648 SET_MAKE!$SET_MAKE$ac_delim
5649 am__leading_dot!$am__leading_dot$ac_delim
5650 AMTAR!$AMTAR$ac_delim
5651 am__tar!$am__tar$ac_delim
5652 am__untar!$am__untar$ac_delim
5653 CC!$CC$ac_delim
5654 CFLAGS!$CFLAGS$ac_delim
5655 LDFLAGS!$LDFLAGS$ac_delim
5656 CPPFLAGS!$CPPFLAGS$ac_delim
5657 ac_ct_CC!$ac_ct_CC$ac_delim
5658 EXEEXT!$EXEEXT$ac_delim
5659 OBJEXT!$OBJEXT$ac_delim
5660 DEPDIR!$DEPDIR$ac_delim
5661 am__include!$am__include$ac_delim
5662 am__quote!$am__quote$ac_delim
5663 AMDEP_TRUE!$AMDEP_TRUE$ac_delim
5664 AMDEP_FALSE!$AMDEP_FALSE$ac_delim
5665 AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim
5666 CCDEPMODE!$CCDEPMODE$ac_delim
5667 am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim
5668 am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim
5669 GNUPLOT!$GNUPLOT$ac_delim
5670 APMLIB!$APMLIB$ac_delim
5671 ACPILIB!$ACPILIB$ac_delim
5672 CPP!$CPP$ac_delim
5673 GREP!$GREP$ac_delim
5674 EGREP!$EGREP$ac_delim
5675 LIBOBJS!$LIBOBJS$ac_delim
5676 LTLIBOBJS!$LTLIBOBJS$ac_delim
5677 _ACEOF
5678
5679 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 83; then
5680 break
5681 elif $ac_last_try; then
5682 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
5683 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
5684 { (exit 1); exit 1; }; }
5685 else
5686 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5687 fi
5688 done
5689
5690 ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
5691 if test -n "$ac_eof"; then
5692 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
5693 ac_eof=`expr $ac_eof + 1`
5694 fi
5695
5696 cat >>$CONFIG_STATUS <<_ACEOF
5697 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
5698 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
5699 _ACEOF
5700 sed '
5701 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
5702 s/^/s,@/; s/!/@,|#_!!_#|/
5703 :n
5704 t n
5705 s/'"$ac_delim"'$/,g/; t
5706 s/$/\\/; p
5707 N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
5708 ' >>$CONFIG_STATUS <conf$$subs.sed
5709 rm -f conf$$subs.sed
5710 cat >>$CONFIG_STATUS <<_ACEOF
5711 :end
5712 s/|#_!!_#|//g
5713 CEOF$ac_eof
5714 _ACEOF
5715
5716
5717 # VPATH may cause trouble with some makes, so we remove $(srcdir),
5718 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
5719 # trailing colons and then remove the whole line if VPATH becomes empty
5720 # (actually we leave an empty line to preserve line numbers).
5721 if test "x$srcdir" = x.; then
5722 ac_vpsub='/^[ ]*VPATH[ ]*=/{
5723 s/:*\$(srcdir):*/:/
5724 s/:*\${srcdir}:*/:/
5725 s/:*@srcdir@:*/:/
5726 s/^\([^=]*=[ ]*\):*/\1/
5727 s/:*$//
5728 s/^[^=]*=[ ]*$//
5729 }'
5730 fi
5731
5732 cat >>$CONFIG_STATUS <<\_ACEOF
5733 fi # test -n "$CONFIG_FILES"
5734
5735
5736 for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS
5737 do
5738 case $ac_tag in
5739 :[FHLC]) ac_mode=$ac_tag; continue;;
5740 esac
5741 case $ac_mode$ac_tag in
5742 :[FHL]*:*);;
5743 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
5744 echo "$as_me: error: Invalid tag $ac_tag." >&2;}
5745 { (exit 1); exit 1; }; };;
5746 :[FH]-) ac_tag=-:-;;
5747 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
5748 esac
5749 ac_save_IFS=$IFS
5750 IFS=:
5751 set x $ac_tag
5752 IFS=$ac_save_IFS
5753 shift
5754 ac_file=$1
5755 shift
5756
5757 case $ac_mode in
5758 :L) ac_source=$1;;
5759 :[FH])
5760 ac_file_inputs=
5761 for ac_f
5762 do
5763 case $ac_f in
5764 -) ac_f="$tmp/stdin";;
5765 *) # Look for the file first in the build tree, then in the source tree
5766 # (if the path is not absolute). The absolute path cannot be DOS-style,
5767 # because $ac_f cannot contain `:'.
5768 test -f "$ac_f" ||
5769 case $ac_f in
5770 [\\/$]*) false;;
5771 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
5772 esac ||
5773 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
5774 echo "$as_me: error: cannot find input file: $ac_f" >&2;}
5775 { (exit 1); exit 1; }; };;
5776 esac
5777 ac_file_inputs="$ac_file_inputs $ac_f"
5778 done
5779
5780 # Let's still pretend it is `configure' which instantiates (i.e., don't
5781 # use $as_me), people would be surprised to read:
5782 # /* config.h. Generated by config.status. */
5783 configure_input="Generated from "`IFS=:
5784 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
5785 if test x"$ac_file" != x-; then
5786 configure_input="$ac_file. $configure_input"
5787 { echo "$as_me:$LINENO: creating $ac_file" >&5
5788 echo "$as_me: creating $ac_file" >&6;}
5789 fi
5790
5791 case $ac_tag in
5792 *:-:* | *:-) cat >"$tmp/stdin";;
5793 esac
5794 ;;
5795 esac
5796
5797 ac_dir=`$as_dirname -- "$ac_file" ||
5798 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5799 X"$ac_file" : 'X\(//\)[^/]' \| \
5800 X"$ac_file" : 'X\(//\)$' \| \
5801 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
5802 echo X"$ac_file" |
5803 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5804 s//\1/
5805 q
5806 }
5807 /^X\(\/\/\)[^/].*/{
5808 s//\1/
5809 q
5810 }
5811 /^X\(\/\/\)$/{
5812 s//\1/
5813 q
5814 }
5815 /^X\(\/\).*/{
5816 s//\1/
5817 q
5818 }
5819 s/.*/./; q'`
5820 { as_dir="$ac_dir"
5821 case $as_dir in #(
5822 -*) as_dir=./$as_dir;;
5823 esac
5824 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
5825 as_dirs=
5826 while :; do
5827 case $as_dir in #(
5828 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
5829 *) as_qdir=$as_dir;;
5830 esac
5831 as_dirs="'$as_qdir' $as_dirs"
5832 as_dir=`$as_dirname -- "$as_dir" ||
5833 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5834 X"$as_dir" : 'X\(//\)[^/]' \| \
5835 X"$as_dir" : 'X\(//\)$' \| \
5836 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
5837 echo X"$as_dir" |
5838 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5839 s//\1/
5840 q
5841 }
5842 /^X\(\/\/\)[^/].*/{
5843 s//\1/
5844 q
5845 }
5846 /^X\(\/\/\)$/{
5847 s//\1/
5848 q
5849 }
5850 /^X\(\/\).*/{
5851 s//\1/
5852 q
5853 }
5854 s/.*/./; q'`
5855 test -d "$as_dir" && break
5856 done
5857 test -z "$as_dirs" || eval "mkdir $as_dirs"
5858 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
5859 echo "$as_me: error: cannot create directory $as_dir" >&2;}
5860 { (exit 1); exit 1; }; }; }
5861 ac_builddir=.
5862
5863 case "$ac_dir" in
5864 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
5865 *)
5866 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
5867 # A ".." for each directory in $ac_dir_suffix.
5868 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
5869 case $ac_top_builddir_sub in
5870 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
5871 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
5872 esac ;;
5873 esac
5874 ac_abs_top_builddir=$ac_pwd
5875 ac_abs_builddir=$ac_pwd$ac_dir_suffix
5876 # for backward compatibility:
5877 ac_top_builddir=$ac_top_build_prefix
5878
5879 case $srcdir in
5880 .) # We are building in place.
5881 ac_srcdir=.
5882 ac_top_srcdir=$ac_top_builddir_sub
5883 ac_abs_top_srcdir=$ac_pwd ;;
5884 [\\/]* | ?:[\\/]* ) # Absolute name.
5885 ac_srcdir=$srcdir$ac_dir_suffix;
5886 ac_top_srcdir=$srcdir
5887 ac_abs_top_srcdir=$srcdir ;;
5888 *) # Relative name.
5889 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
5890 ac_top_srcdir=$ac_top_build_prefix$srcdir
5891 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
5892 esac
5893 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
5894
5895
5896 case $ac_mode in
5897 :F)
5898 #
5899 # CONFIG_FILE
5900 #
5901
5902 case $INSTALL in
5903 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
5904 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
5905 esac
5906 ac_MKDIR_P=$MKDIR_P
5907 case $MKDIR_P in
5908 [\\/$]* | ?:[\\/]* ) ;;
5909 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
5910 esac
5911 _ACEOF
5912
5913 cat >>$CONFIG_STATUS <<\_ACEOF
5914 # If the template does not know about datarootdir, expand it.
5915 # FIXME: This hack should be removed a few years after 2.60.
5916 ac_datarootdir_hack=; ac_datarootdir_seen=
5917
5918 case `sed -n '/datarootdir/ {
5919 p
5920 q
5921 }
5922 /@datadir@/p
5923 /@docdir@/p
5924 /@infodir@/p
5925 /@localedir@/p
5926 /@mandir@/p
5927 ' $ac_file_inputs` in
5928 *datarootdir*) ac_datarootdir_seen=yes;;
5929 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
5930 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
5931 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
5932 _ACEOF
5933 cat >>$CONFIG_STATUS <<_ACEOF
5934 ac_datarootdir_hack='
5935 s&@datadir@&$datadir&g
5936 s&@docdir@&$docdir&g
5937 s&@infodir@&$infodir&g
5938 s&@localedir@&$localedir&g
5939 s&@mandir@&$mandir&g
5940 s&\\\${datarootdir}&$datarootdir&g' ;;
5941 esac
5942 _ACEOF
5943
5944 # Neutralize VPATH when `$srcdir' = `.'.
5945 # Shell code in configure.ac might set extrasub.
5946 # FIXME: do we really want to maintain this feature?
5947 cat >>$CONFIG_STATUS <<_ACEOF
5948 sed "$ac_vpsub
5949 $extrasub
5950 _ACEOF
5951 cat >>$CONFIG_STATUS <<\_ACEOF
5952 :t
5953 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5954 s&@configure_input@&$configure_input&;t t
5955 s&@top_builddir@&$ac_top_builddir_sub&;t t
5956 s&@srcdir@&$ac_srcdir&;t t
5957 s&@abs_srcdir@&$ac_abs_srcdir&;t t
5958 s&@top_srcdir@&$ac_top_srcdir&;t t
5959 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
5960 s&@builddir@&$ac_builddir&;t t
5961 s&@abs_builddir@&$ac_abs_builddir&;t t
5962 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
5963 s&@INSTALL@&$ac_INSTALL&;t t
5964 s&@MKDIR_P@&$ac_MKDIR_P&;t t
5965 $ac_datarootdir_hack
5966 " $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
5967
5968 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
5969 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
5970 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
5971 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5972 which seems to be undefined. Please make sure it is defined." >&5
5973 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5974 which seems to be undefined. Please make sure it is defined." >&2;}
5975
5976 rm -f "$tmp/stdin"
5977 case $ac_file in
5978 -) cat "$tmp/out"; rm -f "$tmp/out";;
5979 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
5980 esac
5981 ;;
5982 :H)
5983 #
5984 # CONFIG_HEADER
5985 #
5986 _ACEOF
5987
5988 # Transform confdefs.h into a sed script `conftest.defines', that
5989 # substitutes the proper values into config.h.in to produce config.h.
5990 rm -f conftest.defines conftest.tail
5991 # First, append a space to every undef/define line, to ease matching.
5992 echo 's/$/ /' >conftest.defines
5993 # Then, protect against being on the right side of a sed subst, or in
5994 # an unquoted here document, in config.status. If some macros were
5995 # called several times there might be several #defines for the same
5996 # symbol, which is useless. But do not sort them, since the last
5997 # AC_DEFINE must be honored.
5998 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
5999 # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
6000 # NAME is the cpp macro being defined, VALUE is the value it is being given.
6001 # PARAMS is the parameter list in the macro definition--in most cases, it's
6002 # just an empty string.
6003 ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
6004 ac_dB='\\)[ (].*,\\1define\\2'
6005 ac_dC=' '
6006 ac_dD=' ,'
6007
6008 uniq confdefs.h |
6009 sed -n '
6010 t rset
6011 :rset
6012 s/^[ ]*#[ ]*define[ ][ ]*//
6013 t ok
6014 d
6015 :ok
6016 s/[\\&,]/\\&/g
6017 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
6018 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
6019 ' >>conftest.defines
6020
6021 # Remove the space that was appended to ease matching.
6022 # Then replace #undef with comments. This is necessary, for
6023 # example, in the case of _POSIX_SOURCE, which is predefined and required
6024 # on some systems where configure will not decide to define it.
6025 # (The regexp can be short, since the line contains either #define or #undef.)
6026 echo 's/ $//
6027 s,^[ #]*u.*,/* & */,' >>conftest.defines
6028
6029 # Break up conftest.defines:
6030 ac_max_sed_lines=50
6031
6032 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
6033 # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
6034 # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
6035 # et cetera.
6036 ac_in='$ac_file_inputs'
6037 ac_out='"$tmp/out1"'
6038 ac_nxt='"$tmp/out2"'
6039
6040 while :
6041 do
6042 # Write a here document:
6043 cat >>$CONFIG_STATUS <<_ACEOF
6044 # First, check the format of the line:
6045 cat >"\$tmp/defines.sed" <<\\CEOF
6046 /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
6047 /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
6048 b
6049 :def
6050 _ACEOF
6051 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
6052 echo 'CEOF
6053 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
6054 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
6055 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
6056 grep . conftest.tail >/dev/null || break
6057 rm -f conftest.defines
6058 mv conftest.tail conftest.defines
6059 done
6060 rm -f conftest.defines conftest.tail
6061
6062 echo "ac_result=$ac_in" >>$CONFIG_STATUS
6063 cat >>$CONFIG_STATUS <<\_ACEOF
6064 if test x"$ac_file" != x-; then
6065 echo "/* $configure_input */" >"$tmp/config.h"
6066 cat "$ac_result" >>"$tmp/config.h"
6067 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
6068 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
6069 echo "$as_me: $ac_file is unchanged" >&6;}
6070 else
6071 rm -f $ac_file
6072 mv "$tmp/config.h" $ac_file
6073 fi
6074 else
6075 echo "/* $configure_input */"
6076 cat "$ac_result"
6077 fi
6078 rm -f "$tmp/out12"
6079 # Compute $ac_file's index in $config_headers.
6080 _am_arg=$ac_file
6081 _am_stamp_count=1
6082 for _am_header in $config_headers :; do
6083 case $_am_header in
6084 $_am_arg | $_am_arg:* )
6085 break ;;
6086 * )
6087 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6088 esac
6089 done
6090 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
6091 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6092 X"$_am_arg" : 'X\(//\)[^/]' \| \
6093 X"$_am_arg" : 'X\(//\)$' \| \
6094 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
6095 echo X"$_am_arg" |
6096 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6097 s//\1/
6098 q
6099 }
6100 /^X\(\/\/\)[^/].*/{
6101 s//\1/
6102 q
6103 }
6104 /^X\(\/\/\)$/{
6105 s//\1/
6106 q
6107 }
6108 /^X\(\/\).*/{
6109 s//\1/
6110 q
6111 }
6112 s/.*/./; q'`/stamp-h$_am_stamp_count
6113 ;;
6114
6115 :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5
6116 echo "$as_me: executing $ac_file commands" >&6;}
6117 ;;
6118 esac
6119
6120
6121 case $ac_file$ac_mode in
6122 "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
6123 # Strip MF so we end up with the name of the file.
6124 mf=`echo "$mf" | sed -e 's/:.*$//'`
6125 # Check whether this is an Automake generated Makefile or not.
6126 # We used to match only the files named `Makefile.in', but
6127 # some people rename them; so instead we look at the file content.
6128 # Grep'ing the first line is not enough: some people post-process
6129 # each Makefile.in and add a new line on top of each file to say so.
6130 # Grep'ing the whole file is not good either: AIX grep has a line
6131 # limit of 2048, but all sed's we know have understand at least 4000.
6132 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
6133 dirpart=`$as_dirname -- "$mf" ||
6134 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6135 X"$mf" : 'X\(//\)[^/]' \| \
6136 X"$mf" : 'X\(//\)$' \| \
6137 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
6138 echo X"$mf" |
6139 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6140 s//\1/
6141 q
6142 }
6143 /^X\(\/\/\)[^/].*/{
6144 s//\1/
6145 q
6146 }
6147 /^X\(\/\/\)$/{
6148 s//\1/
6149 q
6150 }
6151 /^X\(\/\).*/{
6152 s//\1/
6153 q
6154 }
6155 s/.*/./; q'`
6156 else
6157 continue
6158 fi
6159 # Extract the definition of DEPDIR, am__include, and am__quote
6160 # from the Makefile without running `make'.
6161 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6162 test -z "$DEPDIR" && continue
6163 am__include=`sed -n 's/^am__include = //p' < "$mf"`
6164 test -z "am__include" && continue
6165 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6166 # When using ansi2knr, U may be empty or an underscore; expand it
6167 U=`sed -n 's/^U = //p' < "$mf"`
6168 # Find all dependency output files, they are included files with
6169 # $(DEPDIR) in their names. We invoke sed twice because it is the
6170 # simplest approach to changing $(DEPDIR) to its actual value in the
6171 # expansion.
6172 for file in `sed -n "
6173 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6174 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6175 # Make sure the directory exists.
6176 test -f "$dirpart/$file" && continue
6177 fdir=`$as_dirname -- "$file" ||
6178 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6179 X"$file" : 'X\(//\)[^/]' \| \
6180 X"$file" : 'X\(//\)$' \| \
6181 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
6182 echo X"$file" |
6183 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6184 s//\1/
6185 q
6186 }
6187 /^X\(\/\/\)[^/].*/{
6188 s//\1/
6189 q
6190 }
6191 /^X\(\/\/\)$/{
6192 s//\1/
6193 q
6194 }
6195 /^X\(\/\).*/{
6196 s//\1/
6197 q
6198 }
6199 s/.*/./; q'`
6200 { as_dir=$dirpart/$fdir
6201 case $as_dir in #(
6202 -*) as_dir=./$as_dir;;
6203 esac
6204 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
6205 as_dirs=
6206 while :; do
6207 case $as_dir in #(
6208 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
6209 *) as_qdir=$as_dir;;
6210 esac
6211 as_dirs="'$as_qdir' $as_dirs"
6212 as_dir=`$as_dirname -- "$as_dir" ||
6213 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
6214 X"$as_dir" : 'X\(//\)[^/]' \| \
6215 X"$as_dir" : 'X\(//\)$' \| \
6216 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
6217 echo X"$as_dir" |
6218 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
6219 s//\1/
6220 q
6221 }
6222 /^X\(\/\/\)[^/].*/{
6223 s//\1/
6224 q
6225 }
6226 /^X\(\/\/\)$/{
6227 s//\1/
6228 q
6229 }
6230 /^X\(\/\).*/{
6231 s//\1/
6232 q
6233 }
6234 s/.*/./; q'`
6235 test -d "$as_dir" && break
6236 done
6237 test -z "$as_dirs" || eval "mkdir $as_dirs"
6238 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
6239 echo "$as_me: error: cannot create directory $as_dir" >&2;}
6240 { (exit 1); exit 1; }; }; }
6241 # echo "creating $dirpart/$file"
6242 echo '# dummy' > "$dirpart/$file"
6243 done
6244 done
6245 ;;
6246
6247 esac
6248 done # for ac_tag
6249
6250
6251 { (exit 0); exit 0; }
6252 _ACEOF
6253 chmod +x $CONFIG_STATUS
6254 ac_clean_files=$ac_clean_files_save
6255
6256
6257 # configure is writing to config.log, and then calls config.status.
6258 # config.status does its own redirection, appending to config.log.
6259 # Unfortunately, on DOS this fails, as config.log is still kept open
6260 # by configure, so config.status won't be able to write to it; its
6261 # output is simply discarded. So we exec the FD to /dev/null,
6262 # effectively closing config.log, so it can be properly (re)opened and
6263 # appended to by config.status. When coming back to configure, we
6264 # need to make the FD available again.
6265 if test "$no_create" != yes; then
6266 ac_cs_success=:
6267 ac_config_status_args=
6268 test "$silent" = yes &&
6269 ac_config_status_args="$ac_config_status_args --quiet"
6270 exec 5>/dev/null
6271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6272 exec 5>>config.log
6273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6274 # would make configure fail if this is the last instruction.
6275 $ac_cs_success || { (exit 1); exit 1; }
6276 fi
6277
+0
-58
configure.ac less more
0 dnl Copyright (C) Antonio Radici <antonio@dyne.org>
1 dnl Simple autoconf template, released under the terms of GPLv2 as
2 dnl the rest of the original battery-stats program
3 dnl
4
5 # autoconf init
6 AC_INIT([battery-stats], [0.3.4], [battery-stats@dyne.org])
7
8 # automake init
9 AM_INIT_AUTOMAKE([-Wall foreign])
10
11 ###### Check for progarms
12
13 # compiler
14 AC_PROG_CC
15
16 # gnuplot
17 AC_CHECK_PROGS([GNUPLOT], [gnuplot], [:])
18 if test "$GNUPLOT" = :; then
19 AC_MSG_ERROR([This package needs gnuplot to operate properly])
20 fi
21
22
23 ###### Check for libraries
24
25 # libapm and apmread
26 AC_CHECK_LIB([apm], [apm_read], [APMLIB=-lapm])
27 if test "$APMLIB" = :; then
28 AC_MSG_ERROR([APM lib needs to be installed for this package to work properly])
29 fi
30 AC_SUBST([APMLIB])
31
32 # acpilib
33 AC_CHECK_LIB([acpi], [init_acpi_batt], [ACPILIB=-lacpi])
34 if test "$ACPILIB" = -lacpi; then
35 AC_DEFINE([WANT_ACPI], [1], [Enabling ACPI support])
36 fi
37 AC_SUBST([ACPILIB])
38
39
40 #### Checks for headers files
41 AC_HEADER_STDC
42 AC_CHECK_HEADERS([stdlib.h string.h syslog.h unistd.h])
43 AC_CHECK_HEADERS([libacpi.h])
44
45 #### Checks for typedefs, structures, and compiler characteristics.
46 AC_C_CONST
47 AC_STRUCT_TM
48
49 #### Checks for library functions.
50 AC_FUNC_MALLOC
51 AC_CHECK_FUNCS([strerror strtol])
52
53
54 #### Output
55 AC_CONFIG_HEADERS([config.h])
56 AC_CONFIG_FILES([Makefile src/Makefile man/Makefile src/battery-graph pixmaps/Makefile])
57 AC_OUTPUT
0 # conf
1 install(FILES
2 conf/battery-stats.conf
3 DESTINATION /etc
4 )
5
6 # man
7 if(UNIX)
8 FILE(GLOB MAN1_FILES "man/*.1")
9 FILE(GLOB MAN5_FILES "man/*.5")
10 FILE(GLOB MAN8_FILES "man/*.8")
11 install(FILES ${MAN1_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
12 install(FILES ${MAN5_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man5)
13 install(FILES ${MAN8_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man8)
14 endif()
15
16 # pixmaps
17 FILE(GLOB PIXMAP_FILES "pixmaps/*.png")
18 install(FILES ${PIXMAP_FILES} DESTINATION ${DATA_DIR}/pixmaps)
19
20 # Desktop file
21 install(
22 FILES battery-stats.desktop
23 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications
24 )
0 [Desktop Entry]
1 Name=Battery Charge Graph
2 Type=Application
3 Comment=Battery Charge Graph
4 Exec=/usr/bin/battery-graph
5 Icon=/usr/share/battery-stats/pixmaps/battery-stats.png
6 Terminal=false
7 Categories=Utility
0 # Default configuration for battery-stats-collector
1 #
2 # This file is sourced from /etc/init.d/battery-stats ; it should follow normal
3 # /bin/sh syntax.
4 #
5 # Use it to override the parameters to battery-stats-collector(8). If not overridden, the
6 # hard-wired defaults in /etc/init.d/battery-stats apply.
7 ARGS="--interval=60 --flush=10 --ignore-missing-battery"
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-GRAPH 1 "September 22, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20 .SH NAME
21 battery-graph \- Show a graph of the battery charge
22 .SH SYNOPSIS
23 .B battery-graph
24 .RI [ options ]
25 .RI [ files ... ]
26 .SH DESCRIPTION
27 Show a graph of the battery charge over time.
28 .PP
29 The files given are assumed to contain battery statistics in the
30 battery-stats(5) format. If no files are specified, the default log files
31 will be used.
32 .PP
33 The options can be used for displaying a different interval. An interval is defined in terms of a \fBfrom\fP timestamp, a \fBto\fP timestamp and a \fBduration\fP. By specifying any two, the third will be calculated automatically. A missing duration will be defaulted to 3 hours.
34 .SH OPTIONS
35 These programs follow the usual GNU command line syntax, with long
36 options starting with two dashes (`-').
37 .TP
38 .B \-g \fRgeometry\fB, \-\-geometry \fRgeometry
39 Sets the X Windows geometry of the graph. This disables text mode. See X(7)
40 for how to specify the geometry.
41 .TP
42 .B \-D \fRdisplay\fB, \-\-display \fRdisplay
43 Shows the graph on the given display. The same effect can be achived by setting
44 the DISPLAY environment variable. This disables text mode. See X(7) for valid values.
45 .TP
46 .B \-\-title \fbstring
47 Sets the title of the graph window. By default this will be "Battery
48 Graph". If this is set to the empty string, gnuplot(1) will be allowed set
49 the window title - this can be useful if you want your ~/.Xdefaults to take
50 effect for this.
51 .TP
52 .B \-f \fRdate\fB, \-\-from \fRdate
53 Specifies the start date/time for the graph. This accepts exactly the same date/time specifications as the
54 .B date
55 (1) command - see examples below or the Texinfo manual for date for details.
56 .TP
57 .B \-t \fRdate\fB, \-\-to \fRdate
58 Specifies the ending date/time for the graph. This accepts exactly the same date/time specifications as the
59 .B date
60 (1) command - see examples below or the Texinfo manual for date for details.
61 .TP
62 .B \-s \fRdate\fB, \-\-since \fRdate
63 Shorthand for \-\-from \fIdate\fR \-\-to now
64 .TP
65 .B \-d \fRduration\fB, \-\-duration \fRduration
66 Specifies the duration for the graph. This can be given in units of seconds,
67 hours, days or weeks by suffixing the number with 's' (seconds), 'm' (minutes),
68 \&'h' (hours), 'd' (days) or 'w' (weeks).
69 .br
70 .br
71 Units cannot be combined - e.g. '1d6h' will not be valid, whereas '30h' is
72 OK. If no unit is specified, minutes will be assumed.
73 .TP
74 .B \-\-text
75 Shows the graph in text mode on stdout. The resulting size of the graph is determined by the values of the environment variables.
76 .B LINES
77 and
78 .B COLUMNS
79 (failing that, the output from
80 .B tput
81 will be used). This is the default when the environment variable DISPLAY is not set.
82 .SH EXAMPLES
83 .TP
84 .B Show the last 2 hours:
85 $ battery-graph \-\-duration 2h
86 .TP
87 .B Show the time since mid day:
88 $ battery-graph \-\-from 12:00 \-\-to now
89 .br
90 or
91 .br
92 $ battery-graph \-\-since 12:00
93 .TP
94 .B Show the hour before last:
95 $ battery-graph \-\-from '2 hours ago' \-\-duration 1h
96 .TP
97 .B Show the 6 hours after noon:
98 $ battery-graph \-\-from 12:00 \-\-duration 6h
99 .br
100 or
101 .br
102 $ battery-graph \-\-from 12:00 \-\-to 18:00
103 .TP
104 .B Show the last 6 hours
105 $ battery-graph \-\-from '6 hours ago'
106 .br
107 or
108 .br
109 $ battery-graph \-\-since '6 hours ago'
110 .TP
111 .B Show the last 30 minutes in text mode:
112 $ battery-graph \-\-duration 30 \-\-text
113 .TP
114 .B Show statistics for Tuesday last week
115 $ battery-graph \-\-duration 24h \-\-from 'tuesday last week'
116 .br
117 or
118 .br
119 $ battery-graph \-\-duration 1d \-\-from 'tuesday last week'
120 .TP
121 .B Prove that the future hasn't happened yet:
122 $ battery-graph \-\-from yesterday \-\-to tomorrow
123 .TP
124 .B Another way of wasting CPU cycles:
125 $ battery-graph /dev/null
126 .SH EXIT STATUS
127 battery-graph depends on
128 .B gnuplot
129 (1) to give the correct exit status.
130 .SH FILES
131 If no files are given on the command line, batter-graph reads from
132 .I /var/log/battery-stats
133 .SH ENVIRONMENT
134 .TP
135 .B DISPLAY
136 If this variable is not set, \-\-text will be defaulted.
137 .TP
138 .B LINES / COLUMNS
139 Determines the size of the graph in text mode.
140 .SH DIAGNOSTICS
141 If there are no statistics available for the period chosen, an empty graph will result.
142 .SH NOTES
143 There is no requirement for the
144 .I from
145 time to be earlier than the
146 .I to
147 time - if so, the X axis will be reversed. Similar results can be achieved using a negative duration.
148 .PP
149 Also: battery-stat is quite happy to list statistics in the future; stupid, but
150 obedient.
151 .SH AUTHOR
152 This manual page was written by Karl E. Jorgensen <karl@jorgensen.com>, for the
153 Debian GNU/Linux system (but may be used by others).
154 .SH SEE ALSO
155 battery-stats (5),
156 .br
157 date (1),
158 .br
159 battery-stats-collector (8)
160 .br
161 Newer versions of this program may (or may not) be available at
162 .IR http://karl.jorgensen.com/battery-stats
163 .\" vim:set textwidth=75:
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-LOG 1 "November 10, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20 .SH NAME
21 battery-log \- Extract battery statistics
22 .SH SYNOPSIS
23 .B battery-log \fIfiles\fR ...
24 .SH DESCRIPTION
25 Extract battery statistics from the given files to stdout.
26 .PP
27 Files with an extension of .gz will uncompressed automatically.
28 .PP
29 If no files are specified, data will be extracted from
30 .B /var/log/battery-stats*
31 .SH OPTIONS
32 There are no options.
33 .SH EXIT STATUS
34 If any of the files cannot be opened, a non-zero exit code will result.
35 .SH AUTHOR
36 This manual page was written by Karl E. Jorgensen <karl@jorgensen.com>, for the
37 Debian GNU/Linux system (but may be used by others).
38 .SH SEE ALSO
39 battery-stats (5),
40 .br
41 battery-stats-collector (8)
42 .br
43 Newer versions of this program may (or may not) be available at
44 .IR http://karl.jorgensen.com/battery-stats
45 .\" vim:set textwidth=75:
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-STATS-COLLECTOR 8 "October 30, 2012"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20
21 .SH NAME
22 battery-stats-collector \- Collect statistics about battery charge
23
24 .SH SYNOPSIS
25 .B battery-stats-collector
26 .RI [ option ] " " ...
27
28 .SH DESCRIPTION
29 Does exactly as it says on the tin - it will collect information from the APM subsystem and write it to a log file.
30 .PP
31 Normally battery-stats-collector will be invoked by the system startup scripts.
32
33 .SH OPTIONS
34 battery-stats follow the usual GNU command line syntax, with long options
35 starting with two dashes (`-').
36 .TP
37 .B \-o \fPFILE\fB, \-\-output \fPFILE
38 Append statistics to the given file. The default filename is
39 .B /var/log/battery-stats
40 .TP
41 .B \-i \fPSECS\fB, \-\-interval=\fPSECS
42 Sampling intervals in seconds. If not specified, stats will be collected every 30 seconds.
43 .TP
44 .B \-F \fPCOUNT\fB, \-\-flush=\fPCOUNT
45 Flushes data to the log file every COUNT samples. A value of zero turns
46 off flushing altogether. If left unspecified, battery-stats-collector will
47 assume a value of 1, i.e. flush at every write. Setting the value too low will
48 tend to keep the disk spinning (and use battery needlessly). Setting the value
49 too high will loose statistics in case of an improper shutdown.
50 .br
51 Note that since battery-stats-collector uses the standard Ansi C library, data
52 will still be flushed periodically (regardless of this setting) once the buffer
53 fills up. The size of the buffer is platform dependent, but 4Kb and 8Kb seem
54 pretty normal.
55 .TP
56 .B \-b \fPNUM\fB, \-\-battery\-num=\fPNUM
57 Read information about battery number NUM. (In case you have multiple batteries installed).
58 .TP
59 .B \-1, \-\-once
60 Only collect a single sample and exit. The default is to loop continiously.
61 .TP
62 .B \-I, \-\-ignore\-missing\-battery
63 Keeps quiet about missing batteries. This stops the warnings on stderr/syslog that would otherwise occur when the battery is missing.
64 .TP
65 .B \-s, \-\-syslog
66 Log error messages to syslog, rather than stderr. Note that messages regarding invalid command line parameters will still go to stderr.
67 .TP
68 .B \-V, \-\-version
69 Show version of battery-stats-collector and exit.
70 .TP
71 .B \-h, \-\-help
72 Show summary of options and exit.
73
74 .SH FILES
75 .TP
76 .B /var/log/battery-stats
77 Default file for writing battery charge samples to.
78
79 .SH SEE ALSO
80 .BR battery-graph (1)
81 .br
82 Newer versions of this program may (or may not) be available at
83 .IR http://karl.jorgensen.com/battery-stats
84
85 .SH AUTHOR
86 This manual page was written initially written by Karl E. Jorgensen <karl@jorgensen.com>,
87 for the Debian GNU/Linux system (but may be used by others).
88 .br
89 Adapted by Antonio Radici <antonio@dyne.org> to include
90 libacpi and autotools support, see History for details.
91 .br
92 Kevin Funk <kevin@kfunk.org> took over maintainership in 2012.
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-STATS 5 "September 23, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .SH NAME
18 battery-stats \- collected battery statistics
19 .SH DESCRIPTION
20 The battery-stats contains statistics about battery charge over time, as
21 collected by the
22 .B battery-stats-collector
23 (8) daemon.
24 .SH FORMAT
25 Each line in the file represents one sample and is of the form:
26 .ce
27 <seconds> <charge%> <powermode> <UTC-date> <UTC-time>
28 separated by spaces and terminated by a newline.
29 .PP
30 Where:
31 .TP
32 .B seconds
33 is the number of seconds since 1st Jan 1970 00:00:00 UTC
34 .TP
35 .B charge%
36 is the battery charge a number between 0 and 100
37 .TP
38 .B powermode
39 indicates the power mode:
40 .RS 16
41 .B 0
42 A/C off
43 .br
44 .B 1
45 On battery
46 .br
47 .B 2
48 On backup power
49 .RE
50 .TP
51 .B UTC-date
52 a human-readable date in the format YYYY/MM/DD. Note that this is in UTC,
53 not the local or system timezone.
54 .TP
55 .B UTC-time
56 a human-readable time in the format HH:MM:SS (using a 24-hour clock). Note
57 that this is in UTC, not the local or system timezone.
58 .TP
59 .B minutes-left
60 is the BIOS estimate of how many minutes of running time the battery would
61 provide. This may be unreliable, depending on the BIOS through which it
62 was collected.
63 .SH EXAMPLE
64 A battery under charge might result in the following samples:
65 .RS
66 1032651245 27 1 2002/09/21 23:34:05 94
67 .br
68 1032651275 28 1 2002/09/21 23:34:35 97
69 .br
70 1032651305 29 1 2002/09/21 23:35:05 100
71 .br
72 1032651335 30 1 2002/09/21 23:35:35 103
73 .br
74 1032651365 30 1 2002/09/21 23:36:05 106
75 .RE
76 .SH FILES
77 The default set-up is to save battery statistics in /var/log and rotate the
78 logs weekly, which results in this set of files:
79 .br
80 .I /var/log/battery-stats
81 - current (most recent) statistics
82 .br
83 .I /var/log/battery-stats.[0-9]+
84 - less recent statistics
85 .br
86 .I /var/log/battery-stats.[0-9]+.gz
87 - ancient statistics
88 .SH SEE ALSO
89 .BR battery-graph (1),
90 .BR battery-stats-collector (8).
91 .SH AUTHOR
92 Karl E. Jorgensen <karl@jorgensen.com>
+0
-589
depcomp less more
0 #! /bin/sh
1 # depcomp - compile a program generating dependencies as side-effects
2
3 scriptversion=2007-03-29.01
4
5 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
6 # Foundation, Inc.
7
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
12
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 # 02110-1301, USA.
22
23 # As a special exception to the GNU General Public License, if you
24 # distribute this file as part of a program that contains a
25 # configuration script generated by Autoconf, you may include it under
26 # the same distribution terms that you use for the rest of that program.
27
28 # Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
29
30 case $1 in
31 '')
32 echo "$0: No command. Try \`$0 --help' for more information." 1>&2
33 exit 1;
34 ;;
35 -h | --h*)
36 cat <<\EOF
37 Usage: depcomp [--help] [--version] PROGRAM [ARGS]
38
39 Run PROGRAMS ARGS to compile a file, generating dependencies
40 as side-effects.
41
42 Environment variables:
43 depmode Dependency tracking mode.
44 source Source file read by `PROGRAMS ARGS'.
45 object Object file output by `PROGRAMS ARGS'.
46 DEPDIR directory where to store dependencies.
47 depfile Dependency file to output.
48 tmpdepfile Temporary file to use when outputing dependencies.
49 libtool Whether libtool is used (yes/no).
50
51 Report bugs to <bug-automake@gnu.org>.
52 EOF
53 exit $?
54 ;;
55 -v | --v*)
56 echo "depcomp $scriptversion"
57 exit $?
58 ;;
59 esac
60
61 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
62 echo "depcomp: Variables source, object and depmode must be set" 1>&2
63 exit 1
64 fi
65
66 # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
67 depfile=${depfile-`echo "$object" |
68 sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
69 tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
70
71 rm -f "$tmpdepfile"
72
73 # Some modes work just like other modes, but use different flags. We
74 # parameterize here, but still list the modes in the big case below,
75 # to make depend.m4 easier to write. Note that we *cannot* use a case
76 # here, because this file can only contain one case statement.
77 if test "$depmode" = hp; then
78 # HP compiler uses -M and no extra arg.
79 gccflag=-M
80 depmode=gcc
81 fi
82
83 if test "$depmode" = dashXmstdout; then
84 # This is just like dashmstdout with a different argument.
85 dashmflag=-xM
86 depmode=dashmstdout
87 fi
88
89 case "$depmode" in
90 gcc3)
91 ## gcc 3 implements dependency tracking that does exactly what
92 ## we want. Yay! Note: for some reason libtool 1.4 doesn't like
93 ## it if -MD -MP comes after the -MF stuff. Hmm.
94 ## Unfortunately, FreeBSD c89 acceptance of flags depends upon
95 ## the command line argument order; so add the flags where they
96 ## appear in depend2.am. Note that the slowdown incurred here
97 ## affects only configure: in makefiles, %FASTDEP% shortcuts this.
98 for arg
99 do
100 case $arg in
101 -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
102 *) set fnord "$@" "$arg" ;;
103 esac
104 shift # fnord
105 shift # $arg
106 done
107 "$@"
108 stat=$?
109 if test $stat -eq 0; then :
110 else
111 rm -f "$tmpdepfile"
112 exit $stat
113 fi
114 mv "$tmpdepfile" "$depfile"
115 ;;
116
117 gcc)
118 ## There are various ways to get dependency output from gcc. Here's
119 ## why we pick this rather obscure method:
120 ## - Don't want to use -MD because we'd like the dependencies to end
121 ## up in a subdir. Having to rename by hand is ugly.
122 ## (We might end up doing this anyway to support other compilers.)
123 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
124 ## -MM, not -M (despite what the docs say).
125 ## - Using -M directly means running the compiler twice (even worse
126 ## than renaming).
127 if test -z "$gccflag"; then
128 gccflag=-MD,
129 fi
130 "$@" -Wp,"$gccflag$tmpdepfile"
131 stat=$?
132 if test $stat -eq 0; then :
133 else
134 rm -f "$tmpdepfile"
135 exit $stat
136 fi
137 rm -f "$depfile"
138 echo "$object : \\" > "$depfile"
139 alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
140 ## The second -e expression handles DOS-style file names with drive letters.
141 sed -e 's/^[^:]*: / /' \
142 -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
143 ## This next piece of magic avoids the `deleted header file' problem.
144 ## The problem is that when a header file which appears in a .P file
145 ## is deleted, the dependency causes make to die (because there is
146 ## typically no way to rebuild the header). We avoid this by adding
147 ## dummy dependencies for each header file. Too bad gcc doesn't do
148 ## this for us directly.
149 tr ' ' '
150 ' < "$tmpdepfile" |
151 ## Some versions of gcc put a space before the `:'. On the theory
152 ## that the space means something, we add a space to the output as
153 ## well.
154 ## Some versions of the HPUX 10.20 sed can't process this invocation
155 ## correctly. Breaking it into two sed invocations is a workaround.
156 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
157 rm -f "$tmpdepfile"
158 ;;
159
160 hp)
161 # This case exists only to let depend.m4 do its work. It works by
162 # looking at the text of this script. This case will never be run,
163 # since it is checked for above.
164 exit 1
165 ;;
166
167 sgi)
168 if test "$libtool" = yes; then
169 "$@" "-Wp,-MDupdate,$tmpdepfile"
170 else
171 "$@" -MDupdate "$tmpdepfile"
172 fi
173 stat=$?
174 if test $stat -eq 0; then :
175 else
176 rm -f "$tmpdepfile"
177 exit $stat
178 fi
179 rm -f "$depfile"
180
181 if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
182 echo "$object : \\" > "$depfile"
183
184 # Clip off the initial element (the dependent). Don't try to be
185 # clever and replace this with sed code, as IRIX sed won't handle
186 # lines with more than a fixed number of characters (4096 in
187 # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
188 # the IRIX cc adds comments like `#:fec' to the end of the
189 # dependency line.
190 tr ' ' '
191 ' < "$tmpdepfile" \
192 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
193 tr '
194 ' ' ' >> $depfile
195 echo >> $depfile
196
197 # The second pass generates a dummy entry for each header file.
198 tr ' ' '
199 ' < "$tmpdepfile" \
200 | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
201 >> $depfile
202 else
203 # The sourcefile does not contain any dependencies, so just
204 # store a dummy comment line, to avoid errors with the Makefile
205 # "include basename.Plo" scheme.
206 echo "#dummy" > "$depfile"
207 fi
208 rm -f "$tmpdepfile"
209 ;;
210
211 aix)
212 # The C for AIX Compiler uses -M and outputs the dependencies
213 # in a .u file. In older versions, this file always lives in the
214 # current directory. Also, the AIX compiler puts `$object:' at the
215 # start of each line; $object doesn't have directory information.
216 # Version 6 uses the directory in both cases.
217 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
218 test "x$dir" = "x$object" && dir=
219 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
220 if test "$libtool" = yes; then
221 tmpdepfile1=$dir$base.u
222 tmpdepfile2=$base.u
223 tmpdepfile3=$dir.libs/$base.u
224 "$@" -Wc,-M
225 else
226 tmpdepfile1=$dir$base.u
227 tmpdepfile2=$dir$base.u
228 tmpdepfile3=$dir$base.u
229 "$@" -M
230 fi
231 stat=$?
232
233 if test $stat -eq 0; then :
234 else
235 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
236 exit $stat
237 fi
238
239 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
240 do
241 test -f "$tmpdepfile" && break
242 done
243 if test -f "$tmpdepfile"; then
244 # Each line is of the form `foo.o: dependent.h'.
245 # Do two passes, one to just change these to
246 # `$object: dependent.h' and one to simply `dependent.h:'.
247 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
248 # That's a tab and a space in the [].
249 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
250 else
251 # The sourcefile does not contain any dependencies, so just
252 # store a dummy comment line, to avoid errors with the Makefile
253 # "include basename.Plo" scheme.
254 echo "#dummy" > "$depfile"
255 fi
256 rm -f "$tmpdepfile"
257 ;;
258
259 icc)
260 # Intel's C compiler understands `-MD -MF file'. However on
261 # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
262 # ICC 7.0 will fill foo.d with something like
263 # foo.o: sub/foo.c
264 # foo.o: sub/foo.h
265 # which is wrong. We want:
266 # sub/foo.o: sub/foo.c
267 # sub/foo.o: sub/foo.h
268 # sub/foo.c:
269 # sub/foo.h:
270 # ICC 7.1 will output
271 # foo.o: sub/foo.c sub/foo.h
272 # and will wrap long lines using \ :
273 # foo.o: sub/foo.c ... \
274 # sub/foo.h ... \
275 # ...
276
277 "$@" -MD -MF "$tmpdepfile"
278 stat=$?
279 if test $stat -eq 0; then :
280 else
281 rm -f "$tmpdepfile"
282 exit $stat
283 fi
284 rm -f "$depfile"
285 # Each line is of the form `foo.o: dependent.h',
286 # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
287 # Do two passes, one to just change these to
288 # `$object: dependent.h' and one to simply `dependent.h:'.
289 sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
290 # Some versions of the HPUX 10.20 sed can't process this invocation
291 # correctly. Breaking it into two sed invocations is a workaround.
292 sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
293 sed -e 's/$/ :/' >> "$depfile"
294 rm -f "$tmpdepfile"
295 ;;
296
297 hp2)
298 # The "hp" stanza above does not work with aCC (C++) and HP's ia64
299 # compilers, which have integrated preprocessors. The correct option
300 # to use with these is +Maked; it writes dependencies to a file named
301 # 'foo.d', which lands next to the object file, wherever that
302 # happens to be.
303 # Much of this is similar to the tru64 case; see comments there.
304 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
305 test "x$dir" = "x$object" && dir=
306 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
307 if test "$libtool" = yes; then
308 tmpdepfile1=$dir$base.d
309 tmpdepfile2=$dir.libs/$base.d
310 "$@" -Wc,+Maked
311 else
312 tmpdepfile1=$dir$base.d
313 tmpdepfile2=$dir$base.d
314 "$@" +Maked
315 fi
316 stat=$?
317 if test $stat -eq 0; then :
318 else
319 rm -f "$tmpdepfile1" "$tmpdepfile2"
320 exit $stat
321 fi
322
323 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
324 do
325 test -f "$tmpdepfile" && break
326 done
327 if test -f "$tmpdepfile"; then
328 sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
329 # Add `dependent.h:' lines.
330 sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
331 else
332 echo "#dummy" > "$depfile"
333 fi
334 rm -f "$tmpdepfile" "$tmpdepfile2"
335 ;;
336
337 tru64)
338 # The Tru64 compiler uses -MD to generate dependencies as a side
339 # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
340 # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
341 # dependencies in `foo.d' instead, so we check for that too.
342 # Subdirectories are respected.
343 dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
344 test "x$dir" = "x$object" && dir=
345 base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
346
347 if test "$libtool" = yes; then
348 # With Tru64 cc, shared objects can also be used to make a
349 # static library. This mechanism is used in libtool 1.4 series to
350 # handle both shared and static libraries in a single compilation.
351 # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
352 #
353 # With libtool 1.5 this exception was removed, and libtool now
354 # generates 2 separate objects for the 2 libraries. These two
355 # compilations output dependencies in $dir.libs/$base.o.d and
356 # in $dir$base.o.d. We have to check for both files, because
357 # one of the two compilations can be disabled. We should prefer
358 # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
359 # automatically cleaned when .libs/ is deleted, while ignoring
360 # the former would cause a distcleancheck panic.
361 tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
362 tmpdepfile2=$dir$base.o.d # libtool 1.5
363 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
364 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
365 "$@" -Wc,-MD
366 else
367 tmpdepfile1=$dir$base.o.d
368 tmpdepfile2=$dir$base.d
369 tmpdepfile3=$dir$base.d
370 tmpdepfile4=$dir$base.d
371 "$@" -MD
372 fi
373
374 stat=$?
375 if test $stat -eq 0; then :
376 else
377 rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
378 exit $stat
379 fi
380
381 for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
382 do
383 test -f "$tmpdepfile" && break
384 done
385 if test -f "$tmpdepfile"; then
386 sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
387 # That's a tab and a space in the [].
388 sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
389 else
390 echo "#dummy" > "$depfile"
391 fi
392 rm -f "$tmpdepfile"
393 ;;
394
395 #nosideeffect)
396 # This comment above is used by automake to tell side-effect
397 # dependency tracking mechanisms from slower ones.
398
399 dashmstdout)
400 # Important note: in order to support this mode, a compiler *must*
401 # always write the preprocessed file to stdout, regardless of -o.
402 "$@" || exit $?
403
404 # Remove the call to Libtool.
405 if test "$libtool" = yes; then
406 while test $1 != '--mode=compile'; do
407 shift
408 done
409 shift
410 fi
411
412 # Remove `-o $object'.
413 IFS=" "
414 for arg
415 do
416 case $arg in
417 -o)
418 shift
419 ;;
420 $object)
421 shift
422 ;;
423 *)
424 set fnord "$@" "$arg"
425 shift # fnord
426 shift # $arg
427 ;;
428 esac
429 done
430
431 test -z "$dashmflag" && dashmflag=-M
432 # Require at least two characters before searching for `:'
433 # in the target name. This is to cope with DOS-style filenames:
434 # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
435 "$@" $dashmflag |
436 sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
437 rm -f "$depfile"
438 cat < "$tmpdepfile" > "$depfile"
439 tr ' ' '
440 ' < "$tmpdepfile" | \
441 ## Some versions of the HPUX 10.20 sed can't process this invocation
442 ## correctly. Breaking it into two sed invocations is a workaround.
443 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
444 rm -f "$tmpdepfile"
445 ;;
446
447 dashXmstdout)
448 # This case only exists to satisfy depend.m4. It is never actually
449 # run, as this mode is specially recognized in the preamble.
450 exit 1
451 ;;
452
453 makedepend)
454 "$@" || exit $?
455 # Remove any Libtool call
456 if test "$libtool" = yes; then
457 while test $1 != '--mode=compile'; do
458 shift
459 done
460 shift
461 fi
462 # X makedepend
463 shift
464 cleared=no
465 for arg in "$@"; do
466 case $cleared in
467 no)
468 set ""; shift
469 cleared=yes ;;
470 esac
471 case "$arg" in
472 -D*|-I*)
473 set fnord "$@" "$arg"; shift ;;
474 # Strip any option that makedepend may not understand. Remove
475 # the object too, otherwise makedepend will parse it as a source file.
476 -*|$object)
477 ;;
478 *)
479 set fnord "$@" "$arg"; shift ;;
480 esac
481 done
482 obj_suffix="`echo $object | sed 's/^.*\././'`"
483 touch "$tmpdepfile"
484 ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
485 rm -f "$depfile"
486 cat < "$tmpdepfile" > "$depfile"
487 sed '1,2d' "$tmpdepfile" | tr ' ' '
488 ' | \
489 ## Some versions of the HPUX 10.20 sed can't process this invocation
490 ## correctly. Breaking it into two sed invocations is a workaround.
491 sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
492 rm -f "$tmpdepfile" "$tmpdepfile".bak
493 ;;
494
495 cpp)
496 # Important note: in order to support this mode, a compiler *must*
497 # always write the preprocessed file to stdout.
498 "$@" || exit $?
499
500 # Remove the call to Libtool.
501 if test "$libtool" = yes; then
502 while test $1 != '--mode=compile'; do
503 shift
504 done
505 shift
506 fi
507
508 # Remove `-o $object'.
509 IFS=" "
510 for arg
511 do
512 case $arg in
513 -o)
514 shift
515 ;;
516 $object)
517 shift
518 ;;
519 *)
520 set fnord "$@" "$arg"
521 shift # fnord
522 shift # $arg
523 ;;
524 esac
525 done
526
527 "$@" -E |
528 sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
529 -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
530 sed '$ s: \\$::' > "$tmpdepfile"
531 rm -f "$depfile"
532 echo "$object : \\" > "$depfile"
533 cat < "$tmpdepfile" >> "$depfile"
534 sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
535 rm -f "$tmpdepfile"
536 ;;
537
538 msvisualcpp)
539 # Important note: in order to support this mode, a compiler *must*
540 # always write the preprocessed file to stdout, regardless of -o,
541 # because we must use -o when running libtool.
542 "$@" || exit $?
543 IFS=" "
544 for arg
545 do
546 case "$arg" in
547 "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
548 set fnord "$@"
549 shift
550 shift
551 ;;
552 *)
553 set fnord "$@" "$arg"
554 shift
555 shift
556 ;;
557 esac
558 done
559 "$@" -E |
560 sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
561 rm -f "$depfile"
562 echo "$object : \\" > "$depfile"
563 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
564 echo " " >> "$depfile"
565 . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
566 rm -f "$tmpdepfile"
567 ;;
568
569 none)
570 exec "$@"
571 ;;
572
573 *)
574 echo "Unknown depmode $depmode" 1>&2
575 exit 1
576 ;;
577 esac
578
579 exit 0
580
581 # Local Variables:
582 # mode: shell-script
583 # sh-indentation: 2
584 # eval: (add-hook 'write-file-hooks 'time-stamp)
585 # time-stamp-start: "scriptversion="
586 # time-stamp-format: "%:y-%02m-%02d.%02H"
587 # time-stamp-end: "$"
588 # End:
+0
-519
install-sh less more
0 #!/bin/sh
1 # install - install a program, script, or datafile
2
3 scriptversion=2006-12-25.00
4
5 # This originates from X11R5 (mit/util/scripts/install.sh), which was
6 # later released in X11R6 (xc/config/util/install.sh) with the
7 # following copyright and license.
8 #
9 # Copyright (C) 1994 X Consortium
10 #
11 # Permission is hereby granted, free of charge, to any person obtaining a copy
12 # of this software and associated documentation files (the "Software"), to
13 # deal in the Software without restriction, including without limitation the
14 # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
15 # sell copies of the Software, and to permit persons to whom the Software is
16 # furnished to do so, subject to the following conditions:
17 #
18 # The above copyright notice and this permission notice shall be included in
19 # all copies or substantial portions of the Software.
20 #
21 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
25 # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
26 # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 #
28 # Except as contained in this notice, the name of the X Consortium shall not
29 # be used in advertising or otherwise to promote the sale, use or other deal-
30 # ings in this Software without prior written authorization from the X Consor-
31 # tium.
32 #
33 #
34 # FSF changes to this file are in the public domain.
35 #
36 # Calling this script install-sh is preferred over install.sh, to prevent
37 # `make' implicit rules from creating a file called install from it
38 # when there is no Makefile.
39 #
40 # This script is compatible with the BSD install script, but was written
41 # from scratch.
42
43 nl='
44 '
45 IFS=" "" $nl"
46
47 # set DOITPROG to echo to test this script
48
49 # Don't use :- since 4.3BSD and earlier shells don't like it.
50 doit=${DOITPROG-}
51 if test -z "$doit"; then
52 doit_exec=exec
53 else
54 doit_exec=$doit
55 fi
56
57 # Put in absolute file names if you don't have them in your path;
58 # or use environment vars.
59
60 chgrpprog=${CHGRPPROG-chgrp}
61 chmodprog=${CHMODPROG-chmod}
62 chownprog=${CHOWNPROG-chown}
63 cmpprog=${CMPPROG-cmp}
64 cpprog=${CPPROG-cp}
65 mkdirprog=${MKDIRPROG-mkdir}
66 mvprog=${MVPROG-mv}
67 rmprog=${RMPROG-rm}
68 stripprog=${STRIPPROG-strip}
69
70 posix_glob='?'
71 initialize_posix_glob='
72 test "$posix_glob" != "?" || {
73 if (set -f) 2>/dev/null; then
74 posix_glob=
75 else
76 posix_glob=:
77 fi
78 }
79 '
80
81 posix_mkdir=
82
83 # Desired mode of installed file.
84 mode=0755
85
86 chgrpcmd=
87 chmodcmd=$chmodprog
88 chowncmd=
89 mvcmd=$mvprog
90 rmcmd="$rmprog -f"
91 stripcmd=
92
93 src=
94 dst=
95 dir_arg=
96 dst_arg=
97
98 copy_on_change=false
99 no_target_directory=
100
101 usage="\
102 Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
103 or: $0 [OPTION]... SRCFILES... DIRECTORY
104 or: $0 [OPTION]... -t DIRECTORY SRCFILES...
105 or: $0 [OPTION]... -d DIRECTORIES...
106
107 In the 1st form, copy SRCFILE to DSTFILE.
108 In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
109 In the 4th, create DIRECTORIES.
110
111 Options:
112 --help display this help and exit.
113 --version display version info and exit.
114
115 -c (ignored)
116 -C install only if different (preserve the last data modification time)
117 -d create directories instead of installing files.
118 -g GROUP $chgrpprog installed files to GROUP.
119 -m MODE $chmodprog installed files to MODE.
120 -o USER $chownprog installed files to USER.
121 -s $stripprog installed files.
122 -t DIRECTORY install into DIRECTORY.
123 -T report an error if DSTFILE is a directory.
124
125 Environment variables override the default commands:
126 CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
127 RMPROG STRIPPROG
128 "
129
130 while test $# -ne 0; do
131 case $1 in
132 -c) ;;
133
134 -C) copy_on_change=true;;
135
136 -d) dir_arg=true;;
137
138 -g) chgrpcmd="$chgrpprog $2"
139 shift;;
140
141 --help) echo "$usage"; exit $?;;
142
143 -m) mode=$2
144 case $mode in
145 *' '* | *' '* | *'
146 '* | *'*'* | *'?'* | *'['*)
147 echo "$0: invalid mode: $mode" >&2
148 exit 1;;
149 esac
150 shift;;
151
152 -o) chowncmd="$chownprog $2"
153 shift;;
154
155 -s) stripcmd=$stripprog;;
156
157 -t) dst_arg=$2
158 shift;;
159
160 -T) no_target_directory=true;;
161
162 --version) echo "$0 $scriptversion"; exit $?;;
163
164 --) shift
165 break;;
166
167 -*) echo "$0: invalid option: $1" >&2
168 exit 1;;
169
170 *) break;;
171 esac
172 shift
173 done
174
175 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
176 # When -d is used, all remaining arguments are directories to create.
177 # When -t is used, the destination is already specified.
178 # Otherwise, the last argument is the destination. Remove it from $@.
179 for arg
180 do
181 if test -n "$dst_arg"; then
182 # $@ is not empty: it contains at least $arg.
183 set fnord "$@" "$dst_arg"
184 shift # fnord
185 fi
186 shift # arg
187 dst_arg=$arg
188 done
189 fi
190
191 if test $# -eq 0; then
192 if test -z "$dir_arg"; then
193 echo "$0: no input file specified." >&2
194 exit 1
195 fi
196 # It's OK to call `install-sh -d' without argument.
197 # This can happen when creating conditional directories.
198 exit 0
199 fi
200
201 if test -z "$dir_arg"; then
202 trap '(exit $?); exit' 1 2 13 15
203
204 # Set umask so as not to create temps with too-generous modes.
205 # However, 'strip' requires both read and write access to temps.
206 case $mode in
207 # Optimize common cases.
208 *644) cp_umask=133;;
209 *755) cp_umask=22;;
210
211 *[0-7])
212 if test -z "$stripcmd"; then
213 u_plus_rw=
214 else
215 u_plus_rw='% 200'
216 fi
217 cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
218 *)
219 if test -z "$stripcmd"; then
220 u_plus_rw=
221 else
222 u_plus_rw=,u+rw
223 fi
224 cp_umask=$mode$u_plus_rw;;
225 esac
226 fi
227
228 for src
229 do
230 # Protect names starting with `-'.
231 case $src in
232 -*) src=./$src;;
233 esac
234
235 if test -n "$dir_arg"; then
236 dst=$src
237 dstdir=$dst
238 test -d "$dstdir"
239 dstdir_status=$?
240 else
241
242 # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
243 # might cause directories to be created, which would be especially bad
244 # if $src (and thus $dsttmp) contains '*'.
245 if test ! -f "$src" && test ! -d "$src"; then
246 echo "$0: $src does not exist." >&2
247 exit 1
248 fi
249
250 if test -z "$dst_arg"; then
251 echo "$0: no destination specified." >&2
252 exit 1
253 fi
254
255 dst=$dst_arg
256 # Protect names starting with `-'.
257 case $dst in
258 -*) dst=./$dst;;
259 esac
260
261 # If destination is a directory, append the input filename; won't work
262 # if double slashes aren't ignored.
263 if test -d "$dst"; then
264 if test -n "$no_target_directory"; then
265 echo "$0: $dst_arg: Is a directory" >&2
266 exit 1
267 fi
268 dstdir=$dst
269 dst=$dstdir/`basename "$src"`
270 dstdir_status=0
271 else
272 # Prefer dirname, but fall back on a substitute if dirname fails.
273 dstdir=`
274 (dirname "$dst") 2>/dev/null ||
275 expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
276 X"$dst" : 'X\(//\)[^/]' \| \
277 X"$dst" : 'X\(//\)$' \| \
278 X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
279 echo X"$dst" |
280 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
281 s//\1/
282 q
283 }
284 /^X\(\/\/\)[^/].*/{
285 s//\1/
286 q
287 }
288 /^X\(\/\/\)$/{
289 s//\1/
290 q
291 }
292 /^X\(\/\).*/{
293 s//\1/
294 q
295 }
296 s/.*/./; q'
297 `
298
299 test -d "$dstdir"
300 dstdir_status=$?
301 fi
302 fi
303
304 obsolete_mkdir_used=false
305
306 if test $dstdir_status != 0; then
307 case $posix_mkdir in
308 '')
309 # Create intermediate dirs using mode 755 as modified by the umask.
310 # This is like FreeBSD 'install' as of 1997-10-28.
311 umask=`umask`
312 case $stripcmd.$umask in
313 # Optimize common cases.
314 *[2367][2367]) mkdir_umask=$umask;;
315 .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
316
317 *[0-7])
318 mkdir_umask=`expr $umask + 22 \
319 - $umask % 100 % 40 + $umask % 20 \
320 - $umask % 10 % 4 + $umask % 2
321 `;;
322 *) mkdir_umask=$umask,go-w;;
323 esac
324
325 # With -d, create the new directory with the user-specified mode.
326 # Otherwise, rely on $mkdir_umask.
327 if test -n "$dir_arg"; then
328 mkdir_mode=-m$mode
329 else
330 mkdir_mode=
331 fi
332
333 posix_mkdir=false
334 case $umask in
335 *[123567][0-7][0-7])
336 # POSIX mkdir -p sets u+wx bits regardless of umask, which
337 # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
338 ;;
339 *)
340 tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
341 trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
342
343 if (umask $mkdir_umask &&
344 exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
345 then
346 if test -z "$dir_arg" || {
347 # Check for POSIX incompatibilities with -m.
348 # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
349 # other-writeable bit of parent directory when it shouldn't.
350 # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
351 ls_ld_tmpdir=`ls -ld "$tmpdir"`
352 case $ls_ld_tmpdir in
353 d????-?r-*) different_mode=700;;
354 d????-?--*) different_mode=755;;
355 *) false;;
356 esac &&
357 $mkdirprog -m$different_mode -p -- "$tmpdir" && {
358 ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
359 test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
360 }
361 }
362 then posix_mkdir=:
363 fi
364 rmdir "$tmpdir/d" "$tmpdir"
365 else
366 # Remove any dirs left behind by ancient mkdir implementations.
367 rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
368 fi
369 trap '' 0;;
370 esac;;
371 esac
372
373 if
374 $posix_mkdir && (
375 umask $mkdir_umask &&
376 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
377 )
378 then :
379 else
380
381 # The umask is ridiculous, or mkdir does not conform to POSIX,
382 # or it failed possibly due to a race condition. Create the
383 # directory the slow way, step by step, checking for races as we go.
384
385 case $dstdir in
386 /*) prefix='/';;
387 -*) prefix='./';;
388 *) prefix='';;
389 esac
390
391 eval "$initialize_posix_glob"
392
393 oIFS=$IFS
394 IFS=/
395 $posix_glob set -f
396 set fnord $dstdir
397 shift
398 $posix_glob set +f
399 IFS=$oIFS
400
401 prefixes=
402
403 for d
404 do
405 test -z "$d" && continue
406
407 prefix=$prefix$d
408 if test -d "$prefix"; then
409 prefixes=
410 else
411 if $posix_mkdir; then
412 (umask=$mkdir_umask &&
413 $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
414 # Don't fail if two instances are running concurrently.
415 test -d "$prefix" || exit 1
416 else
417 case $prefix in
418 *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
419 *) qprefix=$prefix;;
420 esac
421 prefixes="$prefixes '$qprefix'"
422 fi
423 fi
424 prefix=$prefix/
425 done
426
427 if test -n "$prefixes"; then
428 # Don't fail if two instances are running concurrently.
429 (umask $mkdir_umask &&
430 eval "\$doit_exec \$mkdirprog $prefixes") ||
431 test -d "$dstdir" || exit 1
432 obsolete_mkdir_used=true
433 fi
434 fi
435 fi
436
437 if test -n "$dir_arg"; then
438 { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
439 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
440 { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
441 test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
442 else
443
444 # Make a couple of temp file names in the proper directory.
445 dsttmp=$dstdir/_inst.$$_
446 rmtmp=$dstdir/_rm.$$_
447
448 # Trap to clean up those temp files at exit.
449 trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
450
451 # Copy the file name to the temp name.
452 (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
453
454 # and set any options; do chmod last to preserve setuid bits.
455 #
456 # If any of these fail, we abort the whole thing. If we want to
457 # ignore errors from any of these, just make sure not to ignore
458 # errors from the above "$doit $cpprog $src $dsttmp" command.
459 #
460 { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
461 { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
462 { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
463 { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
464
465 # If -C, don't bother to copy if it wouldn't change the file.
466 if $copy_on_change &&
467 old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
468 new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
469
470 eval "$initialize_posix_glob" &&
471 $posix_glob set -f &&
472 set X $old && old=:$2:$4:$5:$6 &&
473 set X $new && new=:$2:$4:$5:$6 &&
474 $posix_glob set +f &&
475
476 test "$old" = "$new" &&
477 $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
478 then
479 rm -f "$dsttmp"
480 else
481 # Rename the file to the real destination.
482 $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
483
484 # The rename failed, perhaps because mv can't rename something else
485 # to itself, or perhaps because mv is so ancient that it does not
486 # support -f.
487 {
488 # Now remove or move aside any old file at destination location.
489 # We try this two ways since rm can't unlink itself on some
490 # systems and the destination file might be busy for other
491 # reasons. In this case, the final cleanup might fail but the new
492 # file should still install successfully.
493 {
494 test ! -f "$dst" ||
495 $doit $rmcmd -f "$dst" 2>/dev/null ||
496 { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
497 { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
498 } ||
499 { echo "$0: cannot unlink or rename $dst" >&2
500 (exit 1); exit 1
501 }
502 } &&
503
504 # Now rename the file to the real destination.
505 $doit $mvcmd "$dsttmp" "$dst"
506 }
507 fi || exit 1
508
509 trap '' 0
510 fi
511 done
512
513 # Local variables:
514 # eval: (add-hook 'write-file-hooks 'time-stamp)
515 # time-stamp-start: "scriptversion="
516 # time-stamp-format: "%:y-%02m-%02d.%02H"
517 # time-stamp-end: "$"
518 # End:
+0
-3
man/ChangeLog less more
0 2009-01-25 Antonio Radici <antonio@dyne.org>
1
2 * First import from the original battery-stats 0.3.3 source code
+0
-21
man/Makefile.am less more
0 # This file is part of the battery-stats package.
1 # Copyright (C) 2009 Antonio Radici <antonio@dyne.org>
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17 man1_MANS = battery-log.1 battery-graph.1
18 man5_MANS = battery-stats.5
19 man8_MANS = battery-stats-collector.8
20 EXTRA_DIST = $(man1_MANS) $(man5_MANS) $(man8_MANS)
+0
-462
man/Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # This file is part of the battery-stats package.
17 # Copyright (C) 2009 Antonio Radici <antonio@dyne.org>
18 #
19 # This program is free software; you can redistribute it and/or modify
20 # it under the terms of the GNU General Public License as published by
21 # the Free Software Foundation; either version 2 of the License, or
22 # (at your option) any later version.
23 #
24 # This program is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program; if not, write to the Free Software
31 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32 VPATH = @srcdir@
33 pkgdatadir = $(datadir)/@PACKAGE@
34 pkglibdir = $(libdir)/@PACKAGE@
35 pkgincludedir = $(includedir)/@PACKAGE@
36 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
37 install_sh_DATA = $(install_sh) -c -m 644
38 install_sh_PROGRAM = $(install_sh) -c
39 install_sh_SCRIPT = $(install_sh) -c
40 INSTALL_HEADER = $(INSTALL_DATA)
41 transform = $(program_transform_name)
42 NORMAL_INSTALL = :
43 PRE_INSTALL = :
44 POST_INSTALL = :
45 NORMAL_UNINSTALL = :
46 PRE_UNINSTALL = :
47 POST_UNINSTALL = :
48 subdir = man
49 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
50 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
51 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
52 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
53 $(ACLOCAL_M4)
54 mkinstalldirs = $(install_sh) -d
55 CONFIG_HEADER = $(top_builddir)/config.h
56 CONFIG_CLEAN_FILES =
57 SOURCES =
58 DIST_SOURCES =
59 man1dir = $(mandir)/man1
60 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" \
61 "$(DESTDIR)$(man8dir)"
62 man5dir = $(mandir)/man5
63 man8dir = $(mandir)/man8
64 NROFF = nroff
65 MANS = $(man1_MANS) $(man5_MANS) $(man8_MANS)
66 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
67 ACLOCAL = @ACLOCAL@
68 ACPILIB = @ACPILIB@
69 AMTAR = @AMTAR@
70 APMLIB = @APMLIB@
71 AUTOCONF = @AUTOCONF@
72 AUTOHEADER = @AUTOHEADER@
73 AUTOMAKE = @AUTOMAKE@
74 AWK = @AWK@
75 CC = @CC@
76 CCDEPMODE = @CCDEPMODE@
77 CFLAGS = @CFLAGS@
78 CPP = @CPP@
79 CPPFLAGS = @CPPFLAGS@
80 CYGPATH_W = @CYGPATH_W@
81 DEFS = @DEFS@
82 DEPDIR = @DEPDIR@
83 ECHO_C = @ECHO_C@
84 ECHO_N = @ECHO_N@
85 ECHO_T = @ECHO_T@
86 EGREP = @EGREP@
87 EXEEXT = @EXEEXT@
88 GNUPLOT = @GNUPLOT@
89 GREP = @GREP@
90 INSTALL = @INSTALL@
91 INSTALL_DATA = @INSTALL_DATA@
92 INSTALL_PROGRAM = @INSTALL_PROGRAM@
93 INSTALL_SCRIPT = @INSTALL_SCRIPT@
94 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
95 LDFLAGS = @LDFLAGS@
96 LIBOBJS = @LIBOBJS@
97 LIBS = @LIBS@
98 LTLIBOBJS = @LTLIBOBJS@
99 MAKEINFO = @MAKEINFO@
100 MKDIR_P = @MKDIR_P@
101 OBJEXT = @OBJEXT@
102 PACKAGE = @PACKAGE@
103 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
104 PACKAGE_NAME = @PACKAGE_NAME@
105 PACKAGE_STRING = @PACKAGE_STRING@
106 PACKAGE_TARNAME = @PACKAGE_TARNAME@
107 PACKAGE_VERSION = @PACKAGE_VERSION@
108 PATH_SEPARATOR = @PATH_SEPARATOR@
109 SET_MAKE = @SET_MAKE@
110 SHELL = @SHELL@
111 STRIP = @STRIP@
112 VERSION = @VERSION@
113 abs_builddir = @abs_builddir@
114 abs_srcdir = @abs_srcdir@
115 abs_top_builddir = @abs_top_builddir@
116 abs_top_srcdir = @abs_top_srcdir@
117 ac_ct_CC = @ac_ct_CC@
118 am__include = @am__include@
119 am__leading_dot = @am__leading_dot@
120 am__quote = @am__quote@
121 am__tar = @am__tar@
122 am__untar = @am__untar@
123 bindir = @bindir@
124 build_alias = @build_alias@
125 builddir = @builddir@
126 datadir = @datadir@
127 datarootdir = @datarootdir@
128 docdir = @docdir@
129 dvidir = @dvidir@
130 exec_prefix = @exec_prefix@
131 host_alias = @host_alias@
132 htmldir = @htmldir@
133 includedir = @includedir@
134 infodir = @infodir@
135 install_sh = @install_sh@
136 libdir = @libdir@
137 libexecdir = @libexecdir@
138 localedir = @localedir@
139 localstatedir = @localstatedir@
140 mandir = @mandir@
141 mkdir_p = @mkdir_p@
142 oldincludedir = @oldincludedir@
143 pdfdir = @pdfdir@
144 prefix = @prefix@
145 program_transform_name = @program_transform_name@
146 psdir = @psdir@
147 sbindir = @sbindir@
148 sharedstatedir = @sharedstatedir@
149 srcdir = @srcdir@
150 sysconfdir = @sysconfdir@
151 target_alias = @target_alias@
152 top_builddir = @top_builddir@
153 top_srcdir = @top_srcdir@
154 man1_MANS = battery-log.1 battery-graph.1
155 man5_MANS = battery-stats.5
156 man8_MANS = battery-stats-collector.8
157 EXTRA_DIST = $(man1_MANS) $(man5_MANS) $(man8_MANS)
158 all: all-am
159
160 .SUFFIXES:
161 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
162 @for dep in $?; do \
163 case '$(am__configure_deps)' in \
164 *$$dep*) \
165 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
166 && exit 0; \
167 exit 1;; \
168 esac; \
169 done; \
170 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
171 cd $(top_srcdir) && \
172 $(AUTOMAKE) --foreign man/Makefile
173 .PRECIOUS: Makefile
174 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
175 @case '$?' in \
176 *config.status*) \
177 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
178 *) \
179 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
180 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
181 esac;
182
183 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
184 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
185
186 $(top_srcdir)/configure: $(am__configure_deps)
187 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
188 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
189 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
190 install-man1: $(man1_MANS) $(man_MANS)
191 @$(NORMAL_INSTALL)
192 test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
193 @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
194 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
195 for i in $$l2; do \
196 case "$$i" in \
197 *.1*) list="$$list $$i" ;; \
198 esac; \
199 done; \
200 for i in $$list; do \
201 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
202 else file=$$i; fi; \
203 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
204 case "$$ext" in \
205 1*) ;; \
206 *) ext='1' ;; \
207 esac; \
208 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
209 inst=`echo $$inst | sed -e 's/^.*\///'`; \
210 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
211 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
212 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \
213 done
214 uninstall-man1:
215 @$(NORMAL_UNINSTALL)
216 @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
217 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
218 for i in $$l2; do \
219 case "$$i" in \
220 *.1*) list="$$list $$i" ;; \
221 esac; \
222 done; \
223 for i in $$list; do \
224 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
225 case "$$ext" in \
226 1*) ;; \
227 *) ext='1' ;; \
228 esac; \
229 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
230 inst=`echo $$inst | sed -e 's/^.*\///'`; \
231 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
232 echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \
233 rm -f "$(DESTDIR)$(man1dir)/$$inst"; \
234 done
235 install-man5: $(man5_MANS) $(man_MANS)
236 @$(NORMAL_INSTALL)
237 test -z "$(man5dir)" || $(MKDIR_P) "$(DESTDIR)$(man5dir)"
238 @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
239 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
240 for i in $$l2; do \
241 case "$$i" in \
242 *.5*) list="$$list $$i" ;; \
243 esac; \
244 done; \
245 for i in $$list; do \
246 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
247 else file=$$i; fi; \
248 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
249 case "$$ext" in \
250 5*) ;; \
251 *) ext='5' ;; \
252 esac; \
253 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
254 inst=`echo $$inst | sed -e 's/^.*\///'`; \
255 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
256 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
257 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \
258 done
259 uninstall-man5:
260 @$(NORMAL_UNINSTALL)
261 @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \
262 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
263 for i in $$l2; do \
264 case "$$i" in \
265 *.5*) list="$$list $$i" ;; \
266 esac; \
267 done; \
268 for i in $$list; do \
269 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
270 case "$$ext" in \
271 5*) ;; \
272 *) ext='5' ;; \
273 esac; \
274 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
275 inst=`echo $$inst | sed -e 's/^.*\///'`; \
276 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
277 echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \
278 rm -f "$(DESTDIR)$(man5dir)/$$inst"; \
279 done
280 install-man8: $(man8_MANS) $(man_MANS)
281 @$(NORMAL_INSTALL)
282 test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
283 @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
284 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
285 for i in $$l2; do \
286 case "$$i" in \
287 *.8*) list="$$list $$i" ;; \
288 esac; \
289 done; \
290 for i in $$list; do \
291 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
292 else file=$$i; fi; \
293 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
294 case "$$ext" in \
295 8*) ;; \
296 *) ext='8' ;; \
297 esac; \
298 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
299 inst=`echo $$inst | sed -e 's/^.*\///'`; \
300 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
301 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
302 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \
303 done
304 uninstall-man8:
305 @$(NORMAL_UNINSTALL)
306 @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
307 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
308 for i in $$l2; do \
309 case "$$i" in \
310 *.8*) list="$$list $$i" ;; \
311 esac; \
312 done; \
313 for i in $$list; do \
314 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
315 case "$$ext" in \
316 8*) ;; \
317 *) ext='8' ;; \
318 esac; \
319 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
320 inst=`echo $$inst | sed -e 's/^.*\///'`; \
321 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
322 echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \
323 rm -f "$(DESTDIR)$(man8dir)/$$inst"; \
324 done
325 tags: TAGS
326 TAGS:
327
328 ctags: CTAGS
329 CTAGS:
330
331
332 distdir: $(DISTFILES)
333 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
334 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
335 list='$(DISTFILES)'; \
336 dist_files=`for file in $$list; do echo $$file; done | \
337 sed -e "s|^$$srcdirstrip/||;t" \
338 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
339 case $$dist_files in \
340 */*) $(MKDIR_P) `echo "$$dist_files" | \
341 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
342 sort -u` ;; \
343 esac; \
344 for file in $$dist_files; do \
345 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
346 if test -d $$d/$$file; then \
347 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
348 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
349 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
350 fi; \
351 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
352 else \
353 test -f $(distdir)/$$file \
354 || cp -p $$d/$$file $(distdir)/$$file \
355 || exit 1; \
356 fi; \
357 done
358 check-am: all-am
359 check: check-am
360 all-am: Makefile $(MANS)
361 installdirs:
362 for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
363 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
364 done
365 install: install-am
366 install-exec: install-exec-am
367 install-data: install-data-am
368 uninstall: uninstall-am
369
370 install-am: all-am
371 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
372
373 installcheck: installcheck-am
374 install-strip:
375 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
376 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
377 `test -z '$(STRIP)' || \
378 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
379 mostlyclean-generic:
380
381 clean-generic:
382
383 distclean-generic:
384 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
385
386 maintainer-clean-generic:
387 @echo "This command is intended for maintainers to use"
388 @echo "it deletes files that may require special tools to rebuild."
389 clean: clean-am
390
391 clean-am: clean-generic mostlyclean-am
392
393 distclean: distclean-am
394 -rm -f Makefile
395 distclean-am: clean-am distclean-generic
396
397 dvi: dvi-am
398
399 dvi-am:
400
401 html: html-am
402
403 info: info-am
404
405 info-am:
406
407 install-data-am: install-man
408
409 install-dvi: install-dvi-am
410
411 install-exec-am:
412
413 install-html: install-html-am
414
415 install-info: install-info-am
416
417 install-man: install-man1 install-man5 install-man8
418
419 install-pdf: install-pdf-am
420
421 install-ps: install-ps-am
422
423 installcheck-am:
424
425 maintainer-clean: maintainer-clean-am
426 -rm -f Makefile
427 maintainer-clean-am: distclean-am maintainer-clean-generic
428
429 mostlyclean: mostlyclean-am
430
431 mostlyclean-am: mostlyclean-generic
432
433 pdf: pdf-am
434
435 pdf-am:
436
437 ps: ps-am
438
439 ps-am:
440
441 uninstall-am: uninstall-man
442
443 uninstall-man: uninstall-man1 uninstall-man5 uninstall-man8
444
445 .MAKE: install-am install-strip
446
447 .PHONY: all all-am check check-am clean clean-generic distclean \
448 distclean-generic distdir dvi dvi-am html html-am info info-am \
449 install install-am install-data install-data-am install-dvi \
450 install-dvi-am install-exec install-exec-am install-html \
451 install-html-am install-info install-info-am install-man \
452 install-man1 install-man5 install-man8 install-pdf \
453 install-pdf-am install-ps install-ps-am install-strip \
454 installcheck installcheck-am installdirs maintainer-clean \
455 maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
456 pdf-am ps ps-am uninstall uninstall-am uninstall-man \
457 uninstall-man1 uninstall-man5 uninstall-man8
458
459 # Tell versions [3.59,3.63) of GNU make to not export all variables.
460 # Otherwise a system limit (for SysV at least) may be exceeded.
461 .NOEXPORT:
+0
-164
man/battery-graph.1 less more
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-GRAPH 1 "September 22, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20 .SH NAME
21 battery-graph \- Show a graph of the battery charge
22 .SH SYNOPSIS
23 .B battery-graph
24 .RI [ options ]
25 .RI [ files ... ]
26 .SH DESCRIPTION
27 Show a graph of the battery charge over time.
28 .PP
29 The files given are assumed to contain battery statistics in the
30 battery-stats(5) format. If no files are specified, the default log files
31 will be used.
32 .PP
33 The options can be used for displaying a different interval. An interval is defined in terms of a \fBfrom\fP timestamp, a \fBto\fP timestamp and a \fBduration\fP. By specifying any two, the third will be calculated automatically. A missing duration will be defaulted to 3 hours.
34 .SH OPTIONS
35 These programs follow the usual GNU command line syntax, with long
36 options starting with two dashes (`-').
37 .TP
38 .B \-g \fRgeometry\fB, \-\-geometry \fRgeometry
39 Sets the X Windows geometry of the graph. This disables text mode. See X(7)
40 for how to specify the geometry.
41 .TP
42 .B \-D \fRdisplay\fB, \-\-display \fRdisplay
43 Shows the graph on the given display. The same effect can be achived by setting
44 the DISPLAY environment variable. This disables text mode. See X(7) for valid values.
45 .TP
46 .B \-\-title \fbstring
47 Sets the title of the graph window. By default this will be "Battery
48 Graph". If this is set to the empty string, gnuplot(1) will be allowed set
49 the window title - this can be useful if you want your ~/.Xdefaults to take
50 effect for this.
51 .TP
52 .B \-f \fRdate\fB, \-\-from \fRdate
53 Specifies the start date/time for the graph. This accepts exactly the same date/time specifications as the
54 .B date
55 (1) command - see examples below or the Texinfo manual for date for details.
56 .TP
57 .B \-t \fRdate\fB, \-\-to \fRdate
58 Specifies the ending date/time for the graph. This accepts exactly the same date/time specifications as the
59 .B date
60 (1) command - see examples below or the Texinfo manual for date for details.
61 .TP
62 .B \-s \fRdate\fB, \-\-since \fRdate
63 Shorthand for \-\-from \fIdate\fR \-\-to now
64 .TP
65 .B \-d \fRduration\fB, \-\-duration \fRduration
66 Specifies the duration for the graph. This can be given in units of seconds,
67 hours, days or weeks by suffixing the number with 's' (seconds), 'm' (minutes),
68 \&'h' (hours), 'd' (days) or 'w' (weeks).
69 .br
70 .br
71 Units cannot be combined - e.g. '1d6h' will not be valid, whereas '30h' is
72 OK. If no unit is specified, minutes will be assumed.
73 .TP
74 .B \-\-text
75 Shows the graph in text mode on stdout. The resulting size of the graph is determined by the values of the environment variables.
76 .B LINES
77 and
78 .B COLUMNS
79 (failing that, the output from
80 .B tput
81 will be used). This is the default when the environment variable DISPLAY is not set.
82 .SH EXAMPLES
83 .TP
84 .B Show the last 2 hours:
85 $ battery-graph \-\-duration 2h
86 .TP
87 .B Show the time since mid day:
88 $ battery-graph \-\-from 12:00 \-\-to now
89 .br
90 or
91 .br
92 $ battery-graph \-\-since 12:00
93 .TP
94 .B Show the hour before last:
95 $ battery-graph \-\-from '2 hours ago' \-\-duration 1h
96 .TP
97 .B Show the 6 hours after noon:
98 $ battery-graph \-\-from 12:00 \-\-duration 6h
99 .br
100 or
101 .br
102 $ battery-graph \-\-from 12:00 \-\-to 18:00
103 .TP
104 .B Show the last 6 hours
105 $ battery-graph \-\-from '6 hours ago'
106 .br
107 or
108 .br
109 $ battery-graph \-\-since '6 hours ago'
110 .TP
111 .B Show the last 30 minutes in text mode:
112 $ battery-graph \-\-duration 30 \-\-text
113 .TP
114 .B Show statistics for Tuesday last week
115 $ battery-graph \-\-duration 24h \-\-from 'tuesday last week'
116 .br
117 or
118 .br
119 $ battery-graph \-\-duration 1d \-\-from 'tuesday last week'
120 .TP
121 .B Prove that the future hasn't happened yet:
122 $ battery-graph \-\-from yesterday \-\-to tomorrow
123 .TP
124 .B Another way of wasting CPU cycles:
125 $ battery-graph /dev/null
126 .SH EXIT STATUS
127 battery-graph depends on
128 .B gnuplot
129 (1) to give the correct exit status.
130 .SH FILES
131 If no files are given on the command line, batter-graph reads from
132 .I /var/log/battery-stats
133 .SH ENVIRONMENT
134 .TP
135 .B DISPLAY
136 If this variable is not set, \-\-text will be defaulted.
137 .TP
138 .B LINES / COLUMNS
139 Determines the size of the graph in text mode.
140 .SH DIAGNOSTICS
141 If there are no statistics available for the period chosen, an empty graph will result.
142 .SH NOTES
143 There is no requirement for the
144 .I from
145 time to be earlier than the
146 .I to
147 time - if so, the X axis will be reversed. Similar results can be achieved using a negative duration.
148 .PP
149 Also: battery-stat is quite happy to list statistics in the future; stupid, but
150 obedient.
151 .SH AUTHOR
152 This manual page was written by Karl E. Jørgensen <karl@jorgensen.com>, for the
153 Debian GNU/Linux system (but may be used by others).
154 .SH SEE ALSO
155 battery-stats (5),
156 .br
157 date (1),
158 .br
159 battery-stats-collector (8)
160 .br
161 Newer versions of this program may (or may not) be available at
162 .IR http://karl.jorgensen.com/battery-stats
163 .\" vim:set textwidth=75:
+0
-46
man/battery-log.1 less more
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-LOG 1 "November 10, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20 .SH NAME
21 battery-log \- Extract battery statistics
22 .SH SYNOPSIS
23 .B battery-log \fIfiles\fR ...
24 .SH DESCRIPTION
25 Extract battery statistics from the given files to stdout.
26 .PP
27 Files with an extension of .gz will uncompressed automatically.
28 .PP
29 If no files are specified, data will be extracted from
30 .B /var/log/battery-stats*
31 .SH OPTIONS
32 There are no options.
33 .SH EXIT STATUS
34 If any of the files cannot be opened, a non-zero exit code will result.
35 .SH AUTHOR
36 This manual page was written by Karl E. Jørgensen <karl@jorgensen.com>, for the
37 Debian GNU/Linux system (but may be used by others).
38 .SH SEE ALSO
39 battery-stats (5),
40 .br
41 battery-stats-collector (8)
42 .br
43 Newer versions of this program may (or may not) be available at
44 .IR http://karl.jorgensen.com/battery-stats
45 .\" vim:set textwidth=75:
+0
-78
man/battery-stats-collector.8 less more
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-STATS-COLLECTOR 8 "September 18, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .\" TeX users may be more comfortable with the \fB<whatever>\fP and
18 .\" \fI<whatever>\fP escape sequences to invode bold face and italics,
19 .\" respectively.
20 .SH NAME
21 battery-stats-collector \- Collect statistics about battery charge
22 .SH SYNOPSIS
23 .B battery-stats-collector
24 .RI [ option ] " " ...
25 .SH DESCRIPTION
26 Does exactly as it says on the tin - it will collect information from the APM subsystem and write it to a log file.
27 .PP
28 Normally battery-stats-collector will be invoked by the system startup scripts.
29 .SH OPTIONS
30 battery-stats follow the usual GNU command line syntax, with long options
31 starting with two dashes (`-').
32 .TP
33 .B \-V, \-\-version
34 Show version of battery-stats-collector and exit.
35 .TP
36 .B \-h, \-\-help
37 Show summary of options and exit.
38 .TP
39 .B \-s, \-\-syslog
40 Log error messages to syslog, rather than stderr. Note that messages regarding invalid command line parameters will still go to stderr.
41 .TP
42 .B \-o \fPfilename\fB, \-\-output \fPfilename
43 Append statistics to the given file. The default filename is
44 .B /var/log/battery-stats
45 .TP
46 .B \-1, \-\-once
47 Only collect a single sample and exit. The default is to loop continiously.
48 .TP
49 .B \-i \fPseconds\fB, \-\-interval=\fPseconds
50 Sampling intervals in seconds. If not specified, stats will be collected every 30 seconds.
51 .TP
52 .B \-I, \-\-ignore\-missing\-battery
53 Keeps quiet about missing batteries. This stops the warnings on stderr/syslog that would otherwise occur when the battery is missing.
54 .TP
55 .B \-F \fPsamplecount\fB, \-\-flush=\fPsamplecount
56 Flushes data to the logfile every <samplecount> samples. A value of zero turns
57 off flushing altogether. If left unspecified, battery-stats-collector will
58 assume a value of 1, i.e. flush at every write. Setting the value too low will
59 tend to keep the disk spinning (and use battery needlessly). Setting the value
60 too high will loose statistics in case of an improper shutdown.
61 .br
62 Note that since battery-stats-collector uses the standard Ansi C library, data
63 will still be flushed periodically (regardless of this setting) once the buffer
64 fills up. The size of the buffer is platform dependent, but 4Kb and 8Kb seem
65 pretty normal.
66 .SH FILES
67 .TP
68 .B /var/log/battery-stats
69 Default file for writing battery charge samples to.
70 .SH SEE ALSO
71 .BR battery-graph (1)
72 .br
73 Newer versions of this program may (or may not) be available at
74 .IR http://karl.jorgensen.com/battery-stats
75 .SH AUTHOR
76 This manual page was written by Karl E. Jørgensen <karl@jorgensen.com>,
77 for the Debian GNU/Linux system (but may be used by others).
+0
-93
man/battery-stats.5 less more
0 .\" Hey, EMACS: -*- nroff -*-
1 .\" First parameter, NAME, should be all caps
2 .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
3 .\" other parameters are allowed: see man(7), man(1)
4 .TH BATTERY-STATS 5 "September 23, 2002"
5 .\" Please adjust this date whenever revising the manpage.
6 .\"
7 .\" Some roff macros, for reference:
8 .\" .nh disable hyphenation
9 .\" .hy enable hyphenation
10 .\" .ad l left justify
11 .\" .ad b justify to both left and right margins
12 .\" .nf disable filling
13 .\" .fi enable filling
14 .\" .br insert line break
15 .\" .sp <n> insert n+1 empty lines
16 .\" for manpage-specific macros, see man(7)
17 .SH NAME
18 battery-stats \- collected battery statistics
19 .SH DESCRIPTION
20 The battery-stats contains statistics about battery charge over time, as
21 collected by the
22 .B battery-stats-collector
23 (8) daemon.
24 .SH FORMAT
25 Each line in the file represents one sample and is of the form:
26 .ce
27 <seconds> <charge%> <powermode> <UTC-date> <UTC-time>
28 separated by spaces and terminated by a newline.
29 .PP
30 Where:
31 .TP
32 .B seconds
33 is the number of seconds since 1st Jan 1970 00:00:00 UTC
34 .TP
35 .B charge%
36 is the battery charge a number between 0 and 100
37 .TP
38 .B powermode
39 indicates the power mode:
40 .RS 16
41 .B 0
42 A/C off
43 .br
44 .B 1
45 On battery
46 .br
47 .B 2
48 On backup power
49 .RE
50 .TP
51 .B UTC-date
52 a human-readable date in the format YYYY/MM/DD. Note that this is in UTC,
53 not the local or system timezone.
54 .TP
55 .B UTC-time
56 a human-readable time in the format HH:MM:SS (using a 24-hour clock). Note
57 that this is in UTC, not the local or system timezone.
58 .TP
59 .B minutes-left
60 is the BIOS estimate of how many minutes of running time the battery would
61 provide. This may be unreliable, depending on the BIOS through which it
62 was collected.
63 .SH EXAMPLE
64 A battery under charge might result in the following samples:
65 .RS
66 1032651245 27 1 2002/09/21 23:34:05 94
67 .br
68 1032651275 28 1 2002/09/21 23:34:35 97
69 .br
70 1032651305 29 1 2002/09/21 23:35:05 100
71 .br
72 1032651335 30 1 2002/09/21 23:35:35 103
73 .br
74 1032651365 30 1 2002/09/21 23:36:05 106
75 .RE
76 .SH FILES
77 The default set-up is to save battery statistics in /var/log and rotate the
78 logs weekly, which results in this set of files:
79 .br
80 .I /var/log/battery-stats
81 - current (most recent) statistics
82 .br
83 .I /var/log/battery-stats.[0-9]+
84 - less recent statistics
85 .br
86 .I /var/log/battery-stats.[0-9]+.gz
87 - ancient statistics
88 .SH SEE ALSO
89 .BR battery-graph (1),
90 .BR battery-stats-collector (8).
91 .SH AUTHOR
92 Karl E. Jørgensen <karl@jorgensen.com>
+0
-367
missing less more
0 #! /bin/sh
1 # Common stub for a few missing GNU programs while installing.
2
3 scriptversion=2006-05-10.23
4
5 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
6 # Free Software Foundation, Inc.
7 # Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
8
9 # This program is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 2, or (at your option)
12 # any later version.
13
14 # This program is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with this program; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22 # 02110-1301, USA.
23
24 # As a special exception to the GNU General Public License, if you
25 # distribute this file as part of a program that contains a
26 # configuration script generated by Autoconf, you may include it under
27 # the same distribution terms that you use for the rest of that program.
28
29 if test $# -eq 0; then
30 echo 1>&2 "Try \`$0 --help' for more information"
31 exit 1
32 fi
33
34 run=:
35 sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
36 sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
37
38 # In the cases where this matters, `missing' is being run in the
39 # srcdir already.
40 if test -f configure.ac; then
41 configure_ac=configure.ac
42 else
43 configure_ac=configure.in
44 fi
45
46 msg="missing on your system"
47
48 case $1 in
49 --run)
50 # Try to run requested program, and just exit if it succeeds.
51 run=
52 shift
53 "$@" && exit 0
54 # Exit code 63 means version mismatch. This often happens
55 # when the user try to use an ancient version of a tool on
56 # a file that requires a minimum version. In this case we
57 # we should proceed has if the program had been absent, or
58 # if --run hadn't been passed.
59 if test $? = 63; then
60 run=:
61 msg="probably too old"
62 fi
63 ;;
64
65 -h|--h|--he|--hel|--help)
66 echo "\
67 $0 [OPTION]... PROGRAM [ARGUMENT]...
68
69 Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
70 error status if there is no known handling for PROGRAM.
71
72 Options:
73 -h, --help display this help and exit
74 -v, --version output version information and exit
75 --run try to run the given command, and emulate it if it fails
76
77 Supported PROGRAM values:
78 aclocal touch file \`aclocal.m4'
79 autoconf touch file \`configure'
80 autoheader touch file \`config.h.in'
81 autom4te touch the output file, or create a stub one
82 automake touch all \`Makefile.in' files
83 bison create \`y.tab.[ch]', if possible, from existing .[ch]
84 flex create \`lex.yy.c', if possible, from existing .c
85 help2man touch the output file
86 lex create \`lex.yy.c', if possible, from existing .c
87 makeinfo touch the output file
88 tar try tar, gnutar, gtar, then tar without non-portable flags
89 yacc create \`y.tab.[ch]', if possible, from existing .[ch]
90
91 Send bug reports to <bug-automake@gnu.org>."
92 exit $?
93 ;;
94
95 -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
96 echo "missing $scriptversion (GNU Automake)"
97 exit $?
98 ;;
99
100 -*)
101 echo 1>&2 "$0: Unknown \`$1' option"
102 echo 1>&2 "Try \`$0 --help' for more information"
103 exit 1
104 ;;
105
106 esac
107
108 # Now exit if we have it, but it failed. Also exit now if we
109 # don't have it and --version was passed (most likely to detect
110 # the program).
111 case $1 in
112 lex|yacc)
113 # Not GNU programs, they don't have --version.
114 ;;
115
116 tar)
117 if test -n "$run"; then
118 echo 1>&2 "ERROR: \`tar' requires --run"
119 exit 1
120 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
121 exit 1
122 fi
123 ;;
124
125 *)
126 if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
127 # We have it, but it failed.
128 exit 1
129 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
130 # Could not run --version or --help. This is probably someone
131 # running `$TOOL --version' or `$TOOL --help' to check whether
132 # $TOOL exists and not knowing $TOOL uses missing.
133 exit 1
134 fi
135 ;;
136 esac
137
138 # If it does not exist, or fails to run (possibly an outdated version),
139 # try to emulate it.
140 case $1 in
141 aclocal*)
142 echo 1>&2 "\
143 WARNING: \`$1' is $msg. You should only need it if
144 you modified \`acinclude.m4' or \`${configure_ac}'. You might want
145 to install the \`Automake' and \`Perl' packages. Grab them from
146 any GNU archive site."
147 touch aclocal.m4
148 ;;
149
150 autoconf)
151 echo 1>&2 "\
152 WARNING: \`$1' is $msg. You should only need it if
153 you modified \`${configure_ac}'. You might want to install the
154 \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
155 archive site."
156 touch configure
157 ;;
158
159 autoheader)
160 echo 1>&2 "\
161 WARNING: \`$1' is $msg. You should only need it if
162 you modified \`acconfig.h' or \`${configure_ac}'. You might want
163 to install the \`Autoconf' and \`GNU m4' packages. Grab them
164 from any GNU archive site."
165 files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
166 test -z "$files" && files="config.h"
167 touch_files=
168 for f in $files; do
169 case $f in
170 *:*) touch_files="$touch_files "`echo "$f" |
171 sed -e 's/^[^:]*://' -e 's/:.*//'`;;
172 *) touch_files="$touch_files $f.in";;
173 esac
174 done
175 touch $touch_files
176 ;;
177
178 automake*)
179 echo 1>&2 "\
180 WARNING: \`$1' is $msg. You should only need it if
181 you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
182 You might want to install the \`Automake' and \`Perl' packages.
183 Grab them from any GNU archive site."
184 find . -type f -name Makefile.am -print |
185 sed 's/\.am$/.in/' |
186 while read f; do touch "$f"; done
187 ;;
188
189 autom4te)
190 echo 1>&2 "\
191 WARNING: \`$1' is needed, but is $msg.
192 You might have modified some files without having the
193 proper tools for further handling them.
194 You can get \`$1' as part of \`Autoconf' from any GNU
195 archive site."
196
197 file=`echo "$*" | sed -n "$sed_output"`
198 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
199 if test -f "$file"; then
200 touch $file
201 else
202 test -z "$file" || exec >$file
203 echo "#! /bin/sh"
204 echo "# Created by GNU Automake missing as a replacement of"
205 echo "# $ $@"
206 echo "exit 0"
207 chmod +x $file
208 exit 1
209 fi
210 ;;
211
212 bison|yacc)
213 echo 1>&2 "\
214 WARNING: \`$1' $msg. You should only need it if
215 you modified a \`.y' file. You may need the \`Bison' package
216 in order for those modifications to take effect. You can get
217 \`Bison' from any GNU archive site."
218 rm -f y.tab.c y.tab.h
219 if test $# -ne 1; then
220 eval LASTARG="\${$#}"
221 case $LASTARG in
222 *.y)
223 SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
224 if test -f "$SRCFILE"; then
225 cp "$SRCFILE" y.tab.c
226 fi
227 SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
228 if test -f "$SRCFILE"; then
229 cp "$SRCFILE" y.tab.h
230 fi
231 ;;
232 esac
233 fi
234 if test ! -f y.tab.h; then
235 echo >y.tab.h
236 fi
237 if test ! -f y.tab.c; then
238 echo 'main() { return 0; }' >y.tab.c
239 fi
240 ;;
241
242 lex|flex)
243 echo 1>&2 "\
244 WARNING: \`$1' is $msg. You should only need it if
245 you modified a \`.l' file. You may need the \`Flex' package
246 in order for those modifications to take effect. You can get
247 \`Flex' from any GNU archive site."
248 rm -f lex.yy.c
249 if test $# -ne 1; then
250 eval LASTARG="\${$#}"
251 case $LASTARG in
252 *.l)
253 SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
254 if test -f "$SRCFILE"; then
255 cp "$SRCFILE" lex.yy.c
256 fi
257 ;;
258 esac
259 fi
260 if test ! -f lex.yy.c; then
261 echo 'main() { return 0; }' >lex.yy.c
262 fi
263 ;;
264
265 help2man)
266 echo 1>&2 "\
267 WARNING: \`$1' is $msg. You should only need it if
268 you modified a dependency of a manual page. You may need the
269 \`Help2man' package in order for those modifications to take
270 effect. You can get \`Help2man' from any GNU archive site."
271
272 file=`echo "$*" | sed -n "$sed_output"`
273 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
274 if test -f "$file"; then
275 touch $file
276 else
277 test -z "$file" || exec >$file
278 echo ".ab help2man is required to generate this page"
279 exit 1
280 fi
281 ;;
282
283 makeinfo)
284 echo 1>&2 "\
285 WARNING: \`$1' is $msg. You should only need it if
286 you modified a \`.texi' or \`.texinfo' file, or any other file
287 indirectly affecting the aspect of the manual. The spurious
288 call might also be the consequence of using a buggy \`make' (AIX,
289 DU, IRIX). You might want to install the \`Texinfo' package or
290 the \`GNU make' package. Grab either from any GNU archive site."
291 # The file to touch is that specified with -o ...
292 file=`echo "$*" | sed -n "$sed_output"`
293 test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
294 if test -z "$file"; then
295 # ... or it is the one specified with @setfilename ...
296 infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
297 file=`sed -n '
298 /^@setfilename/{
299 s/.* \([^ ]*\) *$/\1/
300 p
301 q
302 }' $infile`
303 # ... or it is derived from the source name (dir/f.texi becomes f.info)
304 test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
305 fi
306 # If the file does not exist, the user really needs makeinfo;
307 # let's fail without touching anything.
308 test -f $file || exit 1
309 touch $file
310 ;;
311
312 tar)
313 shift
314
315 # We have already tried tar in the generic part.
316 # Look for gnutar/gtar before invocation to avoid ugly error
317 # messages.
318 if (gnutar --version > /dev/null 2>&1); then
319 gnutar "$@" && exit 0
320 fi
321 if (gtar --version > /dev/null 2>&1); then
322 gtar "$@" && exit 0
323 fi
324 firstarg="$1"
325 if shift; then
326 case $firstarg in
327 *o*)
328 firstarg=`echo "$firstarg" | sed s/o//`
329 tar "$firstarg" "$@" && exit 0
330 ;;
331 esac
332 case $firstarg in
333 *h*)
334 firstarg=`echo "$firstarg" | sed s/h//`
335 tar "$firstarg" "$@" && exit 0
336 ;;
337 esac
338 fi
339
340 echo 1>&2 "\
341 WARNING: I can't seem to be able to run \`tar' with the given arguments.
342 You may want to install GNU tar or Free paxutils, or check the
343 command line arguments."
344 exit 1
345 ;;
346
347 *)
348 echo 1>&2 "\
349 WARNING: \`$1' is needed, and is $msg.
350 You might have modified some files without having the
351 proper tools for further handling them. Check the \`README' file,
352 it often tells you about the needed prerequisites for installing
353 this package. You may also peek at any GNU archive site, in case
354 some other package would contain this missing \`$1' program."
355 exit 1
356 ;;
357 esac
358
359 exit 0
360
361 # Local variables:
362 # eval: (add-hook 'write-file-hooks 'time-stamp)
363 # time-stamp-start: "scriptversion="
364 # time-stamp-format: "%:y-%02m-%02d.%02H"
365 # time-stamp-end: "$"
366 # End:
+0
-3
pixmaps/Makefile.am less more
0 pixmapsdir = $(datarootdir)/@PACKAGE_NAME@/pixmaps
1 pixmaps_DATA = battery-stats.png
2 EXTRA_DIST = $(pixmaps_DATA)
+0
-326
pixmaps/Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 VPATH = @srcdir@
17 pkgdatadir = $(datadir)/@PACKAGE@
18 pkglibdir = $(libdir)/@PACKAGE@
19 pkgincludedir = $(includedir)/@PACKAGE@
20 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
21 install_sh_DATA = $(install_sh) -c -m 644
22 install_sh_PROGRAM = $(install_sh) -c
23 install_sh_SCRIPT = $(install_sh) -c
24 INSTALL_HEADER = $(INSTALL_DATA)
25 transform = $(program_transform_name)
26 NORMAL_INSTALL = :
27 PRE_INSTALL = :
28 POST_INSTALL = :
29 NORMAL_UNINSTALL = :
30 PRE_UNINSTALL = :
31 POST_UNINSTALL = :
32 subdir = pixmaps
33 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
34 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
35 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
36 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
37 $(ACLOCAL_M4)
38 mkinstalldirs = $(install_sh) -d
39 CONFIG_HEADER = $(top_builddir)/config.h
40 CONFIG_CLEAN_FILES =
41 SOURCES =
42 DIST_SOURCES =
43 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
44 am__vpath_adj = case $$p in \
45 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
46 *) f=$$p;; \
47 esac;
48 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
49 am__installdirs = "$(DESTDIR)$(pixmapsdir)"
50 pixmapsDATA_INSTALL = $(INSTALL_DATA)
51 DATA = $(pixmaps_DATA)
52 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
53 ACLOCAL = @ACLOCAL@
54 ACPILIB = @ACPILIB@
55 AMTAR = @AMTAR@
56 APMLIB = @APMLIB@
57 AUTOCONF = @AUTOCONF@
58 AUTOHEADER = @AUTOHEADER@
59 AUTOMAKE = @AUTOMAKE@
60 AWK = @AWK@
61 CC = @CC@
62 CCDEPMODE = @CCDEPMODE@
63 CFLAGS = @CFLAGS@
64 CPP = @CPP@
65 CPPFLAGS = @CPPFLAGS@
66 CYGPATH_W = @CYGPATH_W@
67 DEFS = @DEFS@
68 DEPDIR = @DEPDIR@
69 ECHO_C = @ECHO_C@
70 ECHO_N = @ECHO_N@
71 ECHO_T = @ECHO_T@
72 EGREP = @EGREP@
73 EXEEXT = @EXEEXT@
74 GNUPLOT = @GNUPLOT@
75 GREP = @GREP@
76 INSTALL = @INSTALL@
77 INSTALL_DATA = @INSTALL_DATA@
78 INSTALL_PROGRAM = @INSTALL_PROGRAM@
79 INSTALL_SCRIPT = @INSTALL_SCRIPT@
80 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
81 LDFLAGS = @LDFLAGS@
82 LIBOBJS = @LIBOBJS@
83 LIBS = @LIBS@
84 LTLIBOBJS = @LTLIBOBJS@
85 MAKEINFO = @MAKEINFO@
86 MKDIR_P = @MKDIR_P@
87 OBJEXT = @OBJEXT@
88 PACKAGE = @PACKAGE@
89 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
90 PACKAGE_NAME = @PACKAGE_NAME@
91 PACKAGE_STRING = @PACKAGE_STRING@
92 PACKAGE_TARNAME = @PACKAGE_TARNAME@
93 PACKAGE_VERSION = @PACKAGE_VERSION@
94 PATH_SEPARATOR = @PATH_SEPARATOR@
95 SET_MAKE = @SET_MAKE@
96 SHELL = @SHELL@
97 STRIP = @STRIP@
98 VERSION = @VERSION@
99 abs_builddir = @abs_builddir@
100 abs_srcdir = @abs_srcdir@
101 abs_top_builddir = @abs_top_builddir@
102 abs_top_srcdir = @abs_top_srcdir@
103 ac_ct_CC = @ac_ct_CC@
104 am__include = @am__include@
105 am__leading_dot = @am__leading_dot@
106 am__quote = @am__quote@
107 am__tar = @am__tar@
108 am__untar = @am__untar@
109 bindir = @bindir@
110 build_alias = @build_alias@
111 builddir = @builddir@
112 datadir = @datadir@
113 datarootdir = @datarootdir@
114 docdir = @docdir@
115 dvidir = @dvidir@
116 exec_prefix = @exec_prefix@
117 host_alias = @host_alias@
118 htmldir = @htmldir@
119 includedir = @includedir@
120 infodir = @infodir@
121 install_sh = @install_sh@
122 libdir = @libdir@
123 libexecdir = @libexecdir@
124 localedir = @localedir@
125 localstatedir = @localstatedir@
126 mandir = @mandir@
127 mkdir_p = @mkdir_p@
128 oldincludedir = @oldincludedir@
129 pdfdir = @pdfdir@
130 prefix = @prefix@
131 program_transform_name = @program_transform_name@
132 psdir = @psdir@
133 sbindir = @sbindir@
134 sharedstatedir = @sharedstatedir@
135 srcdir = @srcdir@
136 sysconfdir = @sysconfdir@
137 target_alias = @target_alias@
138 top_builddir = @top_builddir@
139 top_srcdir = @top_srcdir@
140 pixmapsdir = $(datarootdir)/@PACKAGE_NAME@/pixmaps
141 pixmaps_DATA = battery-stats.png
142 EXTRA_DIST = $(pixmaps_DATA)
143 all: all-am
144
145 .SUFFIXES:
146 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
147 @for dep in $?; do \
148 case '$(am__configure_deps)' in \
149 *$$dep*) \
150 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
151 && exit 0; \
152 exit 1;; \
153 esac; \
154 done; \
155 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign pixmaps/Makefile'; \
156 cd $(top_srcdir) && \
157 $(AUTOMAKE) --foreign pixmaps/Makefile
158 .PRECIOUS: Makefile
159 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
160 @case '$?' in \
161 *config.status*) \
162 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
163 *) \
164 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
165 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
166 esac;
167
168 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
169 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
170
171 $(top_srcdir)/configure: $(am__configure_deps)
172 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
173 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
174 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
175 install-pixmapsDATA: $(pixmaps_DATA)
176 @$(NORMAL_INSTALL)
177 test -z "$(pixmapsdir)" || $(MKDIR_P) "$(DESTDIR)$(pixmapsdir)"
178 @list='$(pixmaps_DATA)'; for p in $$list; do \
179 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
180 f=$(am__strip_dir) \
181 echo " $(pixmapsDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pixmapsdir)/$$f'"; \
182 $(pixmapsDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pixmapsdir)/$$f"; \
183 done
184
185 uninstall-pixmapsDATA:
186 @$(NORMAL_UNINSTALL)
187 @list='$(pixmaps_DATA)'; for p in $$list; do \
188 f=$(am__strip_dir) \
189 echo " rm -f '$(DESTDIR)$(pixmapsdir)/$$f'"; \
190 rm -f "$(DESTDIR)$(pixmapsdir)/$$f"; \
191 done
192 tags: TAGS
193 TAGS:
194
195 ctags: CTAGS
196 CTAGS:
197
198
199 distdir: $(DISTFILES)
200 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
201 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
202 list='$(DISTFILES)'; \
203 dist_files=`for file in $$list; do echo $$file; done | \
204 sed -e "s|^$$srcdirstrip/||;t" \
205 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
206 case $$dist_files in \
207 */*) $(MKDIR_P) `echo "$$dist_files" | \
208 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
209 sort -u` ;; \
210 esac; \
211 for file in $$dist_files; do \
212 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
213 if test -d $$d/$$file; then \
214 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
215 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
216 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
217 fi; \
218 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
219 else \
220 test -f $(distdir)/$$file \
221 || cp -p $$d/$$file $(distdir)/$$file \
222 || exit 1; \
223 fi; \
224 done
225 check-am: all-am
226 check: check-am
227 all-am: Makefile $(DATA)
228 installdirs:
229 for dir in "$(DESTDIR)$(pixmapsdir)"; do \
230 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
231 done
232 install: install-am
233 install-exec: install-exec-am
234 install-data: install-data-am
235 uninstall: uninstall-am
236
237 install-am: all-am
238 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
239
240 installcheck: installcheck-am
241 install-strip:
242 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
243 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
244 `test -z '$(STRIP)' || \
245 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
246 mostlyclean-generic:
247
248 clean-generic:
249
250 distclean-generic:
251 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
252
253 maintainer-clean-generic:
254 @echo "This command is intended for maintainers to use"
255 @echo "it deletes files that may require special tools to rebuild."
256 clean: clean-am
257
258 clean-am: clean-generic mostlyclean-am
259
260 distclean: distclean-am
261 -rm -f Makefile
262 distclean-am: clean-am distclean-generic
263
264 dvi: dvi-am
265
266 dvi-am:
267
268 html: html-am
269
270 info: info-am
271
272 info-am:
273
274 install-data-am: install-pixmapsDATA
275
276 install-dvi: install-dvi-am
277
278 install-exec-am:
279
280 install-html: install-html-am
281
282 install-info: install-info-am
283
284 install-man:
285
286 install-pdf: install-pdf-am
287
288 install-ps: install-ps-am
289
290 installcheck-am:
291
292 maintainer-clean: maintainer-clean-am
293 -rm -f Makefile
294 maintainer-clean-am: distclean-am maintainer-clean-generic
295
296 mostlyclean: mostlyclean-am
297
298 mostlyclean-am: mostlyclean-generic
299
300 pdf: pdf-am
301
302 pdf-am:
303
304 ps: ps-am
305
306 ps-am:
307
308 uninstall-am: uninstall-pixmapsDATA
309
310 .MAKE: install-am install-strip
311
312 .PHONY: all all-am check check-am clean clean-generic distclean \
313 distclean-generic distdir dvi dvi-am html html-am info info-am \
314 install install-am install-data install-data-am install-dvi \
315 install-dvi-am install-exec install-exec-am install-html \
316 install-html-am install-info install-info-am install-man \
317 install-pdf install-pdf-am install-pixmapsDATA install-ps \
318 install-ps-am install-strip installcheck installcheck-am \
319 installdirs maintainer-clean maintainer-clean-generic \
320 mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
321 uninstall-am uninstall-pixmapsDATA
322
323 # Tell versions [3.59,3.63) of GNU make to not export all variables.
324 # Otherwise a system limit (for SysV at least) may be exceeded.
325 .NOEXPORT:
pixmaps/battery-stats.png less more
Binary diff not shown
0 include_directories(
1 ${CMAKE_BINARY_DIR}
2 )
3
4 configure_file(
5 ${CMAKE_CURRENT_SOURCE_DIR}/battery-graph.in
6 ${CMAKE_CURRENT_BINARY_DIR}/battery-graph @ONLY
7 )
8
9 install(PROGRAMS
10 ${CMAKE_CURRENT_BINARY_DIR}/battery-graph battery-log
11 DESTINATION bin
12 )
13 install(PROGRAMS
14 battery-stats-collector
15 DESTINATION sbin
16 )
17 install(FILES
18 graph-setup
19 DESTINATION ${DATA_DIR}
20 )
+0
-28
src/Makefile.am less more
0 # this file is part of the battery-stats package.
1 # Copyright (C) 2009 Antonio Radici <antonio@dyne.org>
2 #
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17 # the content of this makefile is derived from the old Makefile of
18 # battery-stats 0.3.3 written by Karl E. Jørgensen
19
20 sbin_PROGRAMS = battery-stats-collector
21 battery_stats_collector_SOURCES = battery-stats-collector.c
22 battery_stats_collector_LDADD = $(APMLIB) $(ACPILIB)
23
24 dist_bin_SCRIPTS = battery-graph battery-log
25 dist_pkgdata_DATA = graph-setup
26
27 dist_sysconf_DATA = battery-stats.conf
+0
-514
src/Makefile.in less more
0 # Makefile.in generated by automake 1.10.1 from Makefile.am.
1 # @configure_input@
2
3 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5 # This Makefile.in is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 @SET_MAKE@
15
16 # this file is part of the battery-stats package.
17 # Copyright (C) 2009 Antonio Radici <antonio@dyne.org>
18 #
19 # This program is free software; you can redistribute it and/or modify
20 # it under the terms of the GNU General Public License as published by
21 # the Free Software Foundation; either version 2 of the License, or
22 # (at your option) any later version.
23 #
24 # This program is distributed in the hope that it will be useful,
25 # but WITHOUT ANY WARRANTY; without even the implied warranty of
26 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 # GNU General Public License for more details.
28 #
29 # You should have received a copy of the GNU General Public License
30 # along with this program; if not, write to the Free Software
31 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32
33 # the content of this makefile is derived from the old Makefile of
34 # battery-stats 0.3.3 written by Karl E. Jørgensen
35
36
37
38 VPATH = @srcdir@
39 pkgdatadir = $(datadir)/@PACKAGE@
40 pkglibdir = $(libdir)/@PACKAGE@
41 pkgincludedir = $(includedir)/@PACKAGE@
42 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
43 install_sh_DATA = $(install_sh) -c -m 644
44 install_sh_PROGRAM = $(install_sh) -c
45 install_sh_SCRIPT = $(install_sh) -c
46 INSTALL_HEADER = $(INSTALL_DATA)
47 transform = $(program_transform_name)
48 NORMAL_INSTALL = :
49 PRE_INSTALL = :
50 POST_INSTALL = :
51 NORMAL_UNINSTALL = :
52 PRE_UNINSTALL = :
53 POST_UNINSTALL = :
54 sbin_PROGRAMS = battery-stats-collector$(EXEEXT)
55 subdir = src
56 DIST_COMMON = $(dist_bin_SCRIPTS) $(dist_pkgdata_DATA) \
57 $(dist_sysconf_DATA) $(srcdir)/Makefile.am \
58 $(srcdir)/Makefile.in $(srcdir)/battery-graph.in
59 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
60 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
61 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
62 $(ACLOCAL_M4)
63 mkinstalldirs = $(install_sh) -d
64 CONFIG_HEADER = $(top_builddir)/config.h
65 CONFIG_CLEAN_FILES = battery-graph
66 am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" \
67 "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"
68 sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
69 PROGRAMS = $(sbin_PROGRAMS)
70 am_battery_stats_collector_OBJECTS = \
71 battery-stats-collector.$(OBJEXT)
72 battery_stats_collector_OBJECTS = \
73 $(am_battery_stats_collector_OBJECTS)
74 am__DEPENDENCIES_1 =
75 battery_stats_collector_DEPENDENCIES = $(am__DEPENDENCIES_1) \
76 $(am__DEPENDENCIES_1)
77 dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
78 SCRIPTS = $(dist_bin_SCRIPTS)
79 DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
80 depcomp = $(SHELL) $(top_srcdir)/depcomp
81 am__depfiles_maybe = depfiles
82 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
83 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
84 CCLD = $(CC)
85 LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
86 SOURCES = $(battery_stats_collector_SOURCES)
87 DIST_SOURCES = $(battery_stats_collector_SOURCES)
88 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
89 am__vpath_adj = case $$p in \
90 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
91 *) f=$$p;; \
92 esac;
93 am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
94 dist_pkgdataDATA_INSTALL = $(INSTALL_DATA)
95 dist_sysconfDATA_INSTALL = $(INSTALL_DATA)
96 DATA = $(dist_pkgdata_DATA) $(dist_sysconf_DATA)
97 ETAGS = etags
98 CTAGS = ctags
99 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
100 ACLOCAL = @ACLOCAL@
101 ACPILIB = @ACPILIB@
102 AMTAR = @AMTAR@
103 APMLIB = @APMLIB@
104 AUTOCONF = @AUTOCONF@
105 AUTOHEADER = @AUTOHEADER@
106 AUTOMAKE = @AUTOMAKE@
107 AWK = @AWK@
108 CC = @CC@
109 CCDEPMODE = @CCDEPMODE@
110 CFLAGS = @CFLAGS@
111 CPP = @CPP@
112 CPPFLAGS = @CPPFLAGS@
113 CYGPATH_W = @CYGPATH_W@
114 DEFS = @DEFS@
115 DEPDIR = @DEPDIR@
116 ECHO_C = @ECHO_C@
117 ECHO_N = @ECHO_N@
118 ECHO_T = @ECHO_T@
119 EGREP = @EGREP@
120 EXEEXT = @EXEEXT@
121 GNUPLOT = @GNUPLOT@
122 GREP = @GREP@
123 INSTALL = @INSTALL@
124 INSTALL_DATA = @INSTALL_DATA@
125 INSTALL_PROGRAM = @INSTALL_PROGRAM@
126 INSTALL_SCRIPT = @INSTALL_SCRIPT@
127 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
128 LDFLAGS = @LDFLAGS@
129 LIBOBJS = @LIBOBJS@
130 LIBS = @LIBS@
131 LTLIBOBJS = @LTLIBOBJS@
132 MAKEINFO = @MAKEINFO@
133 MKDIR_P = @MKDIR_P@
134 OBJEXT = @OBJEXT@
135 PACKAGE = @PACKAGE@
136 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
137 PACKAGE_NAME = @PACKAGE_NAME@
138 PACKAGE_STRING = @PACKAGE_STRING@
139 PACKAGE_TARNAME = @PACKAGE_TARNAME@
140 PACKAGE_VERSION = @PACKAGE_VERSION@
141 PATH_SEPARATOR = @PATH_SEPARATOR@
142 SET_MAKE = @SET_MAKE@
143 SHELL = @SHELL@
144 STRIP = @STRIP@
145 VERSION = @VERSION@
146 abs_builddir = @abs_builddir@
147 abs_srcdir = @abs_srcdir@
148 abs_top_builddir = @abs_top_builddir@
149 abs_top_srcdir = @abs_top_srcdir@
150 ac_ct_CC = @ac_ct_CC@
151 am__include = @am__include@
152 am__leading_dot = @am__leading_dot@
153 am__quote = @am__quote@
154 am__tar = @am__tar@
155 am__untar = @am__untar@
156 bindir = @bindir@
157 build_alias = @build_alias@
158 builddir = @builddir@
159 datadir = @datadir@
160 datarootdir = @datarootdir@
161 docdir = @docdir@
162 dvidir = @dvidir@
163 exec_prefix = @exec_prefix@
164 host_alias = @host_alias@
165 htmldir = @htmldir@
166 includedir = @includedir@
167 infodir = @infodir@
168 install_sh = @install_sh@
169 libdir = @libdir@
170 libexecdir = @libexecdir@
171 localedir = @localedir@
172 localstatedir = @localstatedir@
173 mandir = @mandir@
174 mkdir_p = @mkdir_p@
175 oldincludedir = @oldincludedir@
176 pdfdir = @pdfdir@
177 prefix = @prefix@
178 program_transform_name = @program_transform_name@
179 psdir = @psdir@
180 sbindir = @sbindir@
181 sharedstatedir = @sharedstatedir@
182 srcdir = @srcdir@
183 sysconfdir = @sysconfdir@
184 target_alias = @target_alias@
185 top_builddir = @top_builddir@
186 top_srcdir = @top_srcdir@
187 battery_stats_collector_SOURCES = battery-stats-collector.c
188 battery_stats_collector_LDADD = $(APMLIB) $(ACPILIB)
189 dist_bin_SCRIPTS = battery-graph battery-log
190 dist_pkgdata_DATA = graph-setup
191 dist_sysconf_DATA = battery-stats.conf
192 all: all-am
193
194 .SUFFIXES:
195 .SUFFIXES: .c .o .obj
196 $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
197 @for dep in $?; do \
198 case '$(am__configure_deps)' in \
199 *$$dep*) \
200 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
201 && exit 0; \
202 exit 1;; \
203 esac; \
204 done; \
205 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
206 cd $(top_srcdir) && \
207 $(AUTOMAKE) --foreign src/Makefile
208 .PRECIOUS: Makefile
209 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
210 @case '$?' in \
211 *config.status*) \
212 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
213 *) \
214 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
215 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
216 esac;
217
218 $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
219 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
220
221 $(top_srcdir)/configure: $(am__configure_deps)
222 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
223 $(ACLOCAL_M4): $(am__aclocal_m4_deps)
224 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
225 battery-graph: $(top_builddir)/config.status $(srcdir)/battery-graph.in
226 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
227 install-sbinPROGRAMS: $(sbin_PROGRAMS)
228 @$(NORMAL_INSTALL)
229 test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
230 @list='$(sbin_PROGRAMS)'; for p in $$list; do \
231 p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
232 if test -f $$p \
233 ; then \
234 f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
235 echo " $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \
236 $(INSTALL_PROGRAM_ENV) $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \
237 else :; fi; \
238 done
239
240 uninstall-sbinPROGRAMS:
241 @$(NORMAL_UNINSTALL)
242 @list='$(sbin_PROGRAMS)'; for p in $$list; do \
243 f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
244 echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \
245 rm -f "$(DESTDIR)$(sbindir)/$$f"; \
246 done
247
248 clean-sbinPROGRAMS:
249 -test -z "$(sbin_PROGRAMS)" || rm -f $(sbin_PROGRAMS)
250 battery-stats-collector$(EXEEXT): $(battery_stats_collector_OBJECTS) $(battery_stats_collector_DEPENDENCIES)
251 @rm -f battery-stats-collector$(EXEEXT)
252 $(LINK) $(battery_stats_collector_OBJECTS) $(battery_stats_collector_LDADD) $(LIBS)
253 install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
254 @$(NORMAL_INSTALL)
255 test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
256 @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
257 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
258 if test -f $$d$$p; then \
259 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
260 echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
261 $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
262 else :; fi; \
263 done
264
265 uninstall-dist_binSCRIPTS:
266 @$(NORMAL_UNINSTALL)
267 @list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
268 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
269 echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
270 rm -f "$(DESTDIR)$(bindir)/$$f"; \
271 done
272
273 mostlyclean-compile:
274 -rm -f *.$(OBJEXT)
275
276 distclean-compile:
277 -rm -f *.tab.c
278
279 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/battery-stats-collector.Po@am__quote@
280
281 .c.o:
282 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
283 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
284 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
285 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
286 @am__fastdepCC_FALSE@ $(COMPILE) -c $<
287
288 .c.obj:
289 @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
290 @am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
291 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
292 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
293 @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
294 install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
295 @$(NORMAL_INSTALL)
296 test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
297 @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
298 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
299 f=$(am__strip_dir) \
300 echo " $(dist_pkgdataDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgdatadir)/$$f'"; \
301 $(dist_pkgdataDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgdatadir)/$$f"; \
302 done
303
304 uninstall-dist_pkgdataDATA:
305 @$(NORMAL_UNINSTALL)
306 @list='$(dist_pkgdata_DATA)'; for p in $$list; do \
307 f=$(am__strip_dir) \
308 echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
309 rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
310 done
311 install-dist_sysconfDATA: $(dist_sysconf_DATA)
312 @$(NORMAL_INSTALL)
313 test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
314 @list='$(dist_sysconf_DATA)'; for p in $$list; do \
315 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
316 f=$(am__strip_dir) \
317 echo " $(dist_sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \
318 $(dist_sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \
319 done
320
321 uninstall-dist_sysconfDATA:
322 @$(NORMAL_UNINSTALL)
323 @list='$(dist_sysconf_DATA)'; for p in $$list; do \
324 f=$(am__strip_dir) \
325 echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \
326 rm -f "$(DESTDIR)$(sysconfdir)/$$f"; \
327 done
328
329 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
330 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
331 unique=`for i in $$list; do \
332 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
333 done | \
334 $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
335 END { if (nonempty) { for (i in files) print i; }; }'`; \
336 mkid -fID $$unique
337 tags: TAGS
338
339 TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
340 $(TAGS_FILES) $(LISP)
341 tags=; \
342 here=`pwd`; \
343 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
344 unique=`for i in $$list; do \
345 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
346 done | \
347 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
348 END { if (nonempty) { for (i in files) print i; }; }'`; \
349 if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
350 test -n "$$unique" || unique=$$empty_fix; \
351 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
352 $$tags $$unique; \
353 fi
354 ctags: CTAGS
355 CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
356 $(TAGS_FILES) $(LISP)
357 tags=; \
358 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
359 unique=`for i in $$list; do \
360 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
361 done | \
362 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
363 END { if (nonempty) { for (i in files) print i; }; }'`; \
364 test -z "$(CTAGS_ARGS)$$tags$$unique" \
365 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
366 $$tags $$unique
367
368 GTAGS:
369 here=`$(am__cd) $(top_builddir) && pwd` \
370 && cd $(top_srcdir) \
371 && gtags -i $(GTAGS_ARGS) $$here
372
373 distclean-tags:
374 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
375
376 distdir: $(DISTFILES)
377 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
378 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
379 list='$(DISTFILES)'; \
380 dist_files=`for file in $$list; do echo $$file; done | \
381 sed -e "s|^$$srcdirstrip/||;t" \
382 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
383 case $$dist_files in \
384 */*) $(MKDIR_P) `echo "$$dist_files" | \
385 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
386 sort -u` ;; \
387 esac; \
388 for file in $$dist_files; do \
389 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
390 if test -d $$d/$$file; then \
391 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
392 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
393 cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
394 fi; \
395 cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
396 else \
397 test -f $(distdir)/$$file \
398 || cp -p $$d/$$file $(distdir)/$$file \
399 || exit 1; \
400 fi; \
401 done
402 check-am: all-am
403 check: check-am
404 all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA)
405 installdirs:
406 for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(sysconfdir)"; do \
407 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
408 done
409 install: install-am
410 install-exec: install-exec-am
411 install-data: install-data-am
412 uninstall: uninstall-am
413
414 install-am: all-am
415 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
416
417 installcheck: installcheck-am
418 install-strip:
419 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
420 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
421 `test -z '$(STRIP)' || \
422 echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
423 mostlyclean-generic:
424
425 clean-generic:
426
427 distclean-generic:
428 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
429
430 maintainer-clean-generic:
431 @echo "This command is intended for maintainers to use"
432 @echo "it deletes files that may require special tools to rebuild."
433 clean: clean-am
434
435 clean-am: clean-generic clean-sbinPROGRAMS mostlyclean-am
436
437 distclean: distclean-am
438 -rm -rf ./$(DEPDIR)
439 -rm -f Makefile
440 distclean-am: clean-am distclean-compile distclean-generic \
441 distclean-tags
442
443 dvi: dvi-am
444
445 dvi-am:
446
447 html: html-am
448
449 info: info-am
450
451 info-am:
452
453 install-data-am: install-dist_pkgdataDATA
454
455 install-dvi: install-dvi-am
456
457 install-exec-am: install-dist_binSCRIPTS install-dist_sysconfDATA \
458 install-sbinPROGRAMS
459
460 install-html: install-html-am
461
462 install-info: install-info-am
463
464 install-man:
465
466 install-pdf: install-pdf-am
467
468 install-ps: install-ps-am
469
470 installcheck-am:
471
472 maintainer-clean: maintainer-clean-am
473 -rm -rf ./$(DEPDIR)
474 -rm -f Makefile
475 maintainer-clean-am: distclean-am maintainer-clean-generic
476
477 mostlyclean: mostlyclean-am
478
479 mostlyclean-am: mostlyclean-compile mostlyclean-generic
480
481 pdf: pdf-am
482
483 pdf-am:
484
485 ps: ps-am
486
487 ps-am:
488
489 uninstall-am: uninstall-dist_binSCRIPTS uninstall-dist_pkgdataDATA \
490 uninstall-dist_sysconfDATA uninstall-sbinPROGRAMS
491
492 .MAKE: install-am install-strip
493
494 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
495 clean-sbinPROGRAMS ctags distclean distclean-compile \
496 distclean-generic distclean-tags distdir dvi dvi-am html \
497 html-am info info-am install install-am install-data \
498 install-data-am install-dist_binSCRIPTS \
499 install-dist_pkgdataDATA install-dist_sysconfDATA install-dvi \
500 install-dvi-am install-exec install-exec-am install-html \
501 install-html-am install-info install-info-am install-man \
502 install-pdf install-pdf-am install-ps install-ps-am \
503 install-sbinPROGRAMS install-strip installcheck \
504 installcheck-am installdirs maintainer-clean \
505 maintainer-clean-generic mostlyclean mostlyclean-compile \
506 mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
507 uninstall-am uninstall-dist_binSCRIPTS \
508 uninstall-dist_pkgdataDATA uninstall-dist_sysconfDATA \
509 uninstall-sbinPROGRAMS
510
511 # Tell versions [3.59,3.63) of GNU make to not export all variables.
512 # Otherwise a system limit (for SysV at least) may be exceeded.
513 .NOEXPORT:
00 #!/bin/bash
11 #
22 # This file is part of the battery-stats package.
3 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
3 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
44 #
55 # This program is free software; you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License as published by
1717
1818 set -e
1919
20 prefix=@prefix@
21 exec_prefix=@exec_prefix@
22 libdir=@datarootdir@/@PACKAGE_NAME@
20 prefix=@CMAKE_INSTALL_PREFIX@
21 libdir=${prefix}/@DATA_DIR@
2322
2423 TEMP=`getopt -o f:s:t:d:TAg:D --long from:,since:,to:,duration:,text,title:,geometry:,display:,libdir: -n battery-graph -- "$@"`
2524
00 #!/bin/sh
11 #
22 # This file is part of the battery-stats package.
3 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
3 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
44 #
55 # This program is free software; you can redistribute it and/or modify
66 # it under the terms of the GNU General Public License as published by
0 #!/bin/sh
1 #
2 # This file is part of the battery-stats package.
3 # Copyright (C) 2016 Petter Reinholdtsen <pere@hungry.com>
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17
18 set -e
19
20 get_logline() {
21 secstamp=$(date +%s)
22 stamp=$(date +"%Y/%m/%d %H:%M:%S")
23
24 aconline=$(cat /sys/class/power_supply/AC/online)
25 if [ 1 = "$aconline" ]; then
26 state=2
27 else
28 state=1
29 fi
30
31 for f in /sys/class/power_supply/BAT*; do
32 energy_now=$(cat $f/energy_now) # uWh
33 energy_full=$(cat $f/energy_full) # uWh
34 percent=$( (echo scale=2; echo "100 * $energy_now / $energy_full") | bc -l)
35
36 # FIXME figure out how to calculate minutes remining the same
37 # way libacpi calculate it.
38 # Ideas:
39 if false; then
40 power_now=$(cat $f/power_now) # uW
41 voltage_now=$(cat $f/voltage_now) # uV
42 rate=$(( 1000000 * $power_now / $voltage_now))
43 if [ 0 = $rate ] ; then
44 minremaining=0
45 else
46 minremaining=$(( 60 * $energy_now / $rate ))
47 fi
48
49 # 10^6 * uW / uV = uA
50 remaining_capasity=$((1000000 * $energy_now / $voltage_now ))
51 # 10^6 * uA / uW = 1 / mV
52 minremaining=$((1000000 * $remaining_capasity / $power_now))
53 fi
54 break
55 done
56
57 # Use '-' for minutes remaining, as this value isn't used by the
58 # graph drawing system.
59 echo $secstamp $percent $state $stamp -
60 }
61
62 usage() {
63 cat <<EOF
64 Usage: $0 [-o logfile]
65 EOF
66 }
67
68 PROGRAM_NAME=$(basename $0)
69 logfile="/var/log/battery-stats"
70 sample_interval_secs=30
71 syslog=false
72
73 TEMP=$(getopt -n $PROGRAM_NAME --options o:i:V1hsF:Ib: \
74 --longoptions output:,interval:,version,once,help,syslog,\
75 flush:,ignore-missing-battery,battery-num: \
76 -- "$@")
77 eval set -- "$TEMP"
78 while true; do
79 case "$1" in
80 -o|--output)
81 logfile="$2"; shift 2; continue
82 ;;
83 -i|--interval)
84 sample_interval_secs="$2"; shift 2; continue
85 ;;
86 -V|--version)
87 echo "Version: someversion"
88 exit 1
89 ;;
90 -1|--once)
91 sample_interval_secs=0; shift; continue ;;
92 -h|--help)
93 usage; shift; exit 0 ;;
94 -s|--syslog)
95 # FIXME Ignored
96 syslog=true; shift; continue ;;
97 -F|--flush)
98 # FIXME Ignored
99 shift 2; continue ;;
100 -I|--ignore-missing-battery)
101 # FIXME Ignored
102 shift ; continue ;;
103 -b|--battery-num)
104 # FIXME Ignored
105 shift 2; continue ;;
106 --) # no more arguments to parse
107 break
108 ;;
109 *)
110 printf "Unknown option %s\n" "$1"
111 exit 1
112 ;;
113 esac
114 done
115
116 while true; do
117 if [ "$logfile" ] ; then
118 get_logline >> $logfile
119 else
120 get_logline
121 fi
122 if [ 0 -lt $sample_interval_secs ] ; then
123 sleep $sample_interval_secs
124 else
125 break
126 fi
127 done
+0
-461
src/battery-stats-collector.c less more
0 /*
1 battery-stats-collector - collects statistics about battery performance
2 Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 #include <config.h>
20
21 #include <stdio.h>
22 #include <stdlib.h>
23 #include <string.h>
24 #include <unistd.h>
25 #include <getopt.h>
26 #include <errno.h>
27 #include <time.h>
28 #include <apm.h>
29 #include <syslog.h>
30
31 #ifdef HAVE_LIBACPI_H
32 #include <libacpi.h>
33 #endif
34
35 static struct option long_options[] = {
36 { "output", required_argument, NULL, 'o' },
37 { "interval", required_argument, NULL, 'i' },
38 { "version", no_argument, NULL, 'V' },
39 { "once", no_argument, NULL, '1' },
40 { "help", no_argument, NULL, 'h' },
41 { "syslog", no_argument, NULL, 's' },
42 { "flush", required_argument, NULL, 'F' },
43 { "ignore-missing-battery", no_argument, NULL, 'I' },
44 { "battery-num", required_argument, NULL, 'b' },
45 { NULL, 0, NULL, 0 }
46 };
47
48 static void apmdump(FILE *output, int ignore_missing_battery);
49 #ifdef WANT_ACPI
50 static void acpidump(FILE *output, const int ignore_missing_battery,
51 global_t *libacpi_global);
52 #endif
53 void check_and_write_log_line(FILE *output, const int percentage,
54 const int ac_state, const int remaining_time);
55 static void show_version(void);
56 static void show_usage(void);
57
58 static char *myname = "battery-stats-collector";
59 static char *myversion = "0.3.3";
60
61 static int battery_num = 0;
62
63 static int do_syslog = 0;
64 #define COMPLAIN(loglevel, args...) if (do_syslog) syslog(loglevel, ## args); \
65 else { fprintf(stderr,"%s: ", myname); fprintf(stderr, ##args); }
66
67 int main(int argc, char **argv)
68 {
69 int sample_interval_secs = 30;
70 char *stats_file_name = "/var/log/battery-stats";
71 FILE *stats_file;
72 int ignore_missing_battery = 0;
73 long flush_interval = 1;
74 long flush_count;
75
76 while (1)
77 {
78 int option_index;
79 int c;
80 char *end;
81
82 c = getopt_long(argc, argv, "o:i:Vh1sF:b:", long_options, &option_index);
83
84 if (c == -1)
85 break;
86
87 switch (c) {
88 case 'o':
89 stats_file_name = optarg;
90 break;
91 ;;
92
93 case '1':
94 sample_interval_secs = 0;
95 break;
96
97 case 'i':
98 sample_interval_secs = strtol(optarg, &end, 10);
99 if (*end != 0)
100 {
101 fprintf(stderr,"%s: Invalid number '%s'\n", myname, optarg);
102 exit(2);
103 }
104
105 if (sample_interval_secs < 0)
106 {
107 fprintf(stderr,"%s: invalid negative sampling interval: '%s'\n",
108 myname, optarg);
109 exit(2);
110 }
111
112 break;
113
114 case 'V':
115 show_version();
116 exit(0);
117 break;
118
119 case 'h':
120 show_version();
121 show_usage();
122 exit(0);
123 break;
124
125 case 's':
126 do_syslog = 1;
127 break;
128
129 case 'I':
130 ignore_missing_battery = 1;
131 break;
132
133 case 'F':
134 flush_interval = strtol(optarg, &end, 10);
135 if (*end != 0)
136 {
137 fprintf(stderr, "%s: Invalid flush interval '%s'\n", myname, optarg);
138 exit(2);
139 }
140
141 if (flush_interval < 0)
142 {
143 fprintf(stderr, "%s: Invalid negative flush interval '%s'\n", myname, optarg);
144 exit(2);
145 }
146 break;
147
148 case 'b':
149 battery_num = strtol(optarg, &end, 10);
150 if (*end != 0)
151 {
152 fprintf(stderr, "%s: Invalid battery number '%s'\n", myname, optarg);
153 exit(2);
154 }
155
156 if (battery_num < 0)
157 {
158 fprintf(stderr, "%s: Invalid negative battery number '%s'\n", myname, optarg);
159 exit(2);
160 }
161 break;
162
163 default:
164 /* getopt_long will already have complained on stderr ... */
165 fprintf(stderr,"%s: Try %s --help for options\n", myname, myname);
166 exit(2);
167 }
168 }
169
170 if (optind < argc)
171 {
172 fprintf(stderr, "%s: Too many parameters\n", myname);
173
174 exit(2);
175 }
176
177 if (do_syslog)
178 openlog(myname, LOG_PID, LOG_DAEMON);
179
180 stats_file = fopen(stats_file_name, "a");
181 if (stats_file == NULL)
182 {
183 COMPLAIN(LOG_ERR, "Cannot open output file '%s': %s\n",
184 stats_file_name, strerror(errno));
185
186 exit(2);
187 }
188
189 #ifdef WANT_ACPI
190 // initialize libacpi and determine ACPI support
191 global_t *libacpi_global = malloc (sizeof (global_t));
192 int acpi_supported = check_acpi_support() == SUCCESS;
193 COMPLAIN(LOG_INFO, "Using lib%s.\n", acpi_supported ? "acpi" : "apm");
194 if(acpi_supported)
195 {
196 int retval = init_acpi_batt(libacpi_global);
197 switch(retval)
198 {
199 case SUCCESS:
200 COMPLAIN(LOG_INFO, "Number of batteries: %i.\n",
201 libacpi_global->batt_count);
202 if (libacpi_global->batt_count > 1) {
203 COMPLAIN(LOG_INFO,
204 "Reading info from battery %d only.\n", battery_num);
205 }
206 break;
207 case NOT_SUPPORTED:
208 COMPLAIN(LOG_WARNING, "You have more than %i batteries. "
209 "Reading info from first battery only anyway.\n", MAX_ITEMS);
210 break;
211 case ALLOC_ERR:
212 COMPLAIN(LOG_ERR, "libacpi allocation error.\n");
213 exit(2);
214 case ITEM_EXCEED:
215 COMPLAIN(LOG_WARNING, "You have more than %i batteries. "
216 "Reading info from first battery only anyway.\n", MAX_ITEMS);
217 break;
218 default:
219 COMPLAIN(LOG_ERR, "init_acpi_batt() returned unknown value: %i\n",
220 retval);
221 exit(2);
222 }
223 retval = init_acpi_acadapt(libacpi_global);
224 switch(retval)
225 {
226 case SUCCESS:
227 break;
228 case NOT_SUPPORTED:
229 COMPLAIN(LOG_ERR, "init_acpi_acadapt() returned NOT_SUPPORTED.\n");
230 exit(2);
231 case ALLOC_ERR:
232 COMPLAIN(LOG_ERR, "libacpi allocation error.\n");
233 exit(2);
234 }
235 }
236 #endif
237 flush_count = 0;
238 while (1)
239 {
240 #ifdef WANT_ACPI
241 if(acpi_supported) {
242 acpidump(stats_file, ignore_missing_battery, libacpi_global);
243 } else {
244 apmdump(stats_file, ignore_missing_battery);
245 }
246 #endif
247
248 #ifndef WANT_ACPI
249 apmdump(stats_file, ignore_missing_battery);
250 #endif
251
252 flush_count++;
253 if (flush_count >= flush_interval)
254 {
255 fflush(stats_file);
256 flush_count = 0;
257 }
258 if (sample_interval_secs == 0)
259 break;
260
261 sleep(sample_interval_secs);
262 }
263
264 #ifdef WANT_ACPI
265 free(libacpi_global);
266 #endif
267 fclose(stats_file);
268 if (do_syslog)
269 closelog();
270
271 exit(0);
272 }
273
274 static void show_version(void)
275 {
276 printf("%s version %s, Copyright 2002 Karl E. Jørgensen\n", myname, myversion);
277 printf("%s comes with ABSOLUTELY NO WARRANTY.\n", myname);
278 puts("This is free software, and you are welcome to redistribute it under");
279 puts("conditions, read the license for details.");
280 }
281
282 static void show_usage(void)
283 {
284 struct option *o = long_options;
285
286 puts("Usage:");
287 printf("\t%s", myname);
288
289 for (o = long_options; o->name != NULL; o++)
290 printf(" [ --%s | -%c ]", o->name, o->val);
291
292 puts("");
293 }
294
295
296 #ifdef DEBUG
297 static void apm_fulldump(struct apm_info *ai);
298 #endif
299
300 static void apmdump(FILE *output, int ignore_missing_battery)
301 {
302 struct apm_info ai;
303 int rc;
304
305 rc = apm_read(&ai);
306
307 if (rc != 0)
308 {
309 COMPLAIN(LOG_ERR,"apm_read failed with error code %d\n", rc);
310 return;
311 }
312
313 #ifdef DEBUG
314 apm_fulldump(&ai);
315 #endif
316
317 if (ai.ac_line_status == AC_LINE_STATUS_UNKNOWN)
318 {
319 COMPLAIN(LOG_ERR, "AC Line status unknown\n");
320 return;
321 }
322
323 if (ai.battery_flags & BATTERY_FLAGS_ABSENT)
324 {
325 if (!ignore_missing_battery) {
326 COMPLAIN(LOG_WARNING, "Battery absent\n");
327 }
328 return;
329 }
330
331 if (ai.battery_percentage == BATTERY_PERCENTAGE_UNKNOWN)
332 {
333 COMPLAIN(LOG_ERR, "Battery present, but percentage unknown!?\n");
334 return;
335 }
336
337 check_and_write_log_line(output, ai.battery_percentage,
338 (ai.ac_line_status == AC_LINE_STATUS_OFF) ? 0
339 : ((ai.ac_line_status == AC_LINE_STATUS_ON) ? 1 : 2),
340 ai.battery_time);
341 }
342
343 #ifdef DEBUG
344 static void apm_fulldump(struct apm_info *ai)
345 {
346 printf("AC-Line-status:");
347 switch (ai->ac_line_status)
348 {
349 case AC_LINE_STATUS_OFF: printf(" off"); break;
350 case AC_LINE_STATUS_ON: printf(" on"); break;
351 case AC_LINE_STATUS_BACKUP: printf(" backup"); break;
352 default: printf(" unknown");
353 }
354
355 printf(" Battery-Status:");
356 switch (ai->battery_status)
357 {
358 case BATTERY_STATUS_HIGH: printf(" high"); break;
359 case BATTERY_STATUS_LOW: printf(" low"); break;
360 case BATTERY_STATUS_CRITICAL: printf(" critical"); break;
361 case BATTERY_STATUS_CHARGING: printf(" charging"); break;
362 case BATTERY_STATUS_ABSENT: printf(" absent"); break;
363 default: printf(" unknown"); break;
364 }
365
366 printf(" Battery-Flags: %02x=", ai->battery_flags);
367 if (ai->battery_flags & BATTERY_FLAGS_HIGH) printf("[HIGH]");
368 if (ai->battery_flags & BATTERY_FLAGS_LOW) printf("[LOW]");
369 if (ai->battery_flags & BATTERY_FLAGS_CRITICAL) printf("[CRITICAL]");
370 if (ai->battery_flags & BATTERY_FLAGS_CHARGING) printf("[CHARGING]");
371 if (ai->battery_flags & BATTERY_FLAGS_ABSENT) printf("[ABSENT]");
372
373 printf(" Percentage: ");
374 if (ai->battery_percentage == BATTERY_PERCENTAGE_UNKNOWN)
375 printf("unknown");
376 else
377 printf("%3d%%", ai->battery_percentage);
378
379 printf(" Minutes: ");
380 if (ai->battery_time == BATTERY_TIME_UNKNOWN)
381 printf("unknown");
382 else
383 printf("%d", ai->battery_time);
384
385 printf(" Using-Minutes: %02x\n", ai->using_minutes);
386 }
387 #endif
388
389 #ifdef WANT_ACPI
390 static void acpidump(FILE *output, const int ignore_missing_battery,
391 global_t *libacpi_global)
392 {
393 int rc;
394
395 if (battery_num >= libacpi_global->batt_count) {
396 COMPLAIN(LOG_ERR,"Battery %d doesn't exist. The number of batteries is: %d.\n", battery_num, libacpi_global->batt_count);
397 return;
398 }
399 rc = read_acpi_batt(battery_num);
400 if (rc != SUCCESS)
401 {
402 COMPLAIN(LOG_ERR,"read_acpi_batt(%d) failed with error code %d\n", battery_num, rc);
403 return;
404 }
405 if (!batteries[battery_num].present)
406 {
407 if (!ignore_missing_battery) {
408 COMPLAIN(LOG_WARNING, "Battery %d absent\n", battery_num);
409 }
410 return;
411 }
412
413 read_acpi_acstate(libacpi_global);
414 if (libacpi_global->adapt.ac_state == P_ERR)
415 {
416 COMPLAIN(LOG_ERR, "AC Line status unknown\n");
417 return;
418 }
419
420 check_and_write_log_line(output, batteries[battery_num].percentage,
421 (libacpi_global->adapt.ac_state == P_BATT) ? 2 :
422 ((libacpi_global->adapt.ac_state == P_AC) ? 1 : 0),
423 batteries[battery_num].remaining_time);
424 }
425 #endif
426
427 void check_and_write_log_line(FILE *output, const int percentage,
428 const int ac_state, const int remaining_time)
429 {
430 time_t theTime;
431 time(&theTime);
432 if (theTime == -1)
433 {
434 COMPLAIN(LOG_ERR, "Cannot get current time !?\n");
435 return;
436 }
437
438 struct tm *tm = gmtime(&theTime);
439
440 if (percentage > 100)
441 {
442 COMPLAIN(LOG_ERR, "Battery percentage > 100 (%d) !?\n",
443 percentage);
444 return;
445 }
446
447 if (percentage < 0)
448 {
449 COMPLAIN(LOG_ERR, "Negative battery percentage (%d) !?\n",
450 percentage);
451 return;
452 }
453
454 fprintf(output, "%ld %d %d %04d/%02d/%02d %02d:%02d:%02d %d\n",
455 theTime, percentage, ac_state,
456 tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
457 tm->tm_hour, tm->tm_min, tm->tm_sec,
458 remaining_time);
459 }
460
+0
-9
src/battery-stats.conf less more
0 # Default configuration for battery-stats-collector
1 #
2 # This file is sourced from /etc/init.d/battery-stats ; it should follow normal
3 # /bin/sh syntax.
4 #
5 # Use it to override the parameters to battery-stats-collector(8). If not overridden, the
6 # hard-wired defaults in /etc/init.d/battery-stats apply.
7 ARGS="--interval=60 --flush=10 --ignore-missing-battery"
8
00 # This file is part of the battery-stats package.
1 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
1 # Copyright (C) 2002 Karl E. Jørgensen <karl@jorgensen.com>
22 #
33 # This program is free software; you can redistribute it and/or modify
44 # it under the terms of the GNU General Public License as published by
3131
3232 set ydata
3333 set format y "% g"
34 set ylabel "%Full" 0.000000,0.000000
34 set ylabel "%Full"
35 set ylabel offset 0,0
3536 set yrange [ 0 : 100 ]
3637 set yzeroaxis lt -2 lw 1.000
3738 set ytics border mirror norotate autofreq # 0, 10
5758
5859 set nolabel
5960 set noarrow
60 set nolinestyle
6161 set nologscale
6262 set offsets 0, 0, 0, 0
6363 set pointsize 1
7878 set cntrparam points 5
7979 set size ratio 0 1,1
8080 set origin 0,0
81 set data style points
82 set function style lines
81 #set data style points
82 #set function style lines
8383 set tics in
8484 set ticslevel 0.5
8585 set tics scale 1