./wulfware-2.6.0/ 0000755 0002471 0002471 00000000000 10645251201 011614 5 ustar rgb rgb ./wulfware-2.6.0/ChangeLog 0000644 0002471 0002471 00000033433 10645251201 013374 0 ustar rgb rgb ------------------------------------------------------------------------
r54 | rgb | 2007-07-11 17:48:36 -0400 (Wed, 11 Jul 2007) | 2 lines
Sending it in to the other two svn repos.
------------------------------------------------------------------------
r53 | rgb | 2007-07-11 17:48:15 -0400 (Wed, 11 Jul 2007) | 15 lines
OK, all packages are now installed and working on:
i386
x86_64 single core
Intel dual core
with several examples of each. I do have an x86_64 dual core but I'm
pretty confident that this is a go. I therefore dub this:
Tag 2.6.0
and release it into the wild...
------------------------------------------------------------------------
r52 | rgb | 2007-07-11 17:09:11 -0400 (Wed, 11 Jul 2007) | 3 lines
THIS is a version worth of checkin, although we don't know for sure if
wulf2html is working or not yet.
------------------------------------------------------------------------
r51 | rgb | 2007-07-11 14:47:56 -0400 (Wed, 11 Jul 2007) | 12 lines
This is a working 2.6.0alpha. We've fixed (I think) the multicore
problem, pulling the number of cores from /proc/cpuinfo and turning them
into xml and parsing them at the receiving end. Because of the silly
format of /proc/cpuinfo, the parsing code is a bit ugly, but it is
servicable as long as they don't reorder the fields.
I have dual, dual core servers to try this on almost immediately, after
an rsync. I also need to think about adding the fields to wulf2html and
testing that before releasing 2.6.0. 2.6.0 will NOT be backwards
compatible on dual (or quad) core systems, but all that means is that an
upgrade to 2.6.x will be forced for dual core owners.
------------------------------------------------------------------------
r50 | rgb | 2007-07-11 10:06:35 -0400 (Wed, 11 Jul 2007) | 20 lines
This fixes a bug I discovered on my own. The newest multicore CPUs
added another line to /proc/cpuinfo:
cpu cores :2
I was parsing out cpu family, and all other cpu XXX were assumed to be
clock with XXX the speed. Wrongo, moose breath -- caused wulfstat to
complain about multiple cpu clock tags (as it should have).
The fix was easy enough -- to add another conditional in xmlsysd to
check for cores before parsing for the (remaining) clock. I could parse
for clock directly on MHz, but I'm fairly certain that any day now
they're going to change over to GHz units, as we're rapidly approaching
10,000+ MHz clocks. Truthfully I'm surprised they haven't already.
This still leaves me with the issue of how to display the number of
cores on the already jammed wulfstat line. Might have to snitch part of
the CPU name field.
------------------------------------------------------------------------
r49 | rgb | 2007-07-05 13:22:17 -0400 (Thu, 05 Jul 2007) | 2 lines
This fixes the bug, making this an official final 2.5.1 release.
------------------------------------------------------------------------
r48 | rgb | 2007-07-05 12:56:35 -0400 (Thu, 05 Jul 2007) | 4 lines
This is a small update on 2.5.1 -- basically I tested the build after
eliminating the automated ./configure from autogen.sh. Generally
speaking, though, it worked perfectly.
------------------------------------------------------------------------
r47 | rgb | 2007-07-05 11:23:23 -0400 (Thu, 05 Jul 2007) | 3 lines
This is STILL Tag 2.5.1, but I screwed up and did a checkin as root so
who knows what happened or will happen now.
------------------------------------------------------------------------
r46 | root | 2007-07-05 11:20:26 -0400 (Thu, 05 Jul 2007) | 10 lines
This is Tag: 2.5.1
It actually builds rpms and builds/installs from autoconf as a beginning.
In fact, it looks pretty cute. I DO need to work out a way of doing
development work, but I'm guessing that my set load library path script will
work for now.
------------------------------------------------------------------------
r45 | rgb | 2007-07-05 02:55:37 -0400 (Thu, 05 Jul 2007) | 4 lines
Well, we'll try one more time. NOW we've actually cleaned up some of
the Makefile cruft associated with the port, and I'm sort of remembering
how this thing goes.
------------------------------------------------------------------------
r43 | rgb | 2007-07-05 02:40:43 -0400 (Thu, 05 Jul 2007) | 2 lines
This is another way to sync it up at home.
------------------------------------------------------------------------
r42 | rgb | 2007-07-05 02:39:33 -0400 (Thu, 05 Jul 2007) | 3 lines
This is really really close -- it builds ok, and even builds most of the
way through an rpm. Probably two or three more hours of work...
------------------------------------------------------------------------
r41 | rgb | 2007-07-05 02:18:43 -0400 (Thu, 05 Jul 2007) | 4 lines
This is well on the way to having autoconf tools installed, perhaps more
parsimoniously than they are in dieharder, which is in need at this
point of a good decrufting.
------------------------------------------------------------------------
r40 | rgb | 2007-07-05 02:07:25 -0400 (Thu, 05 Jul 2007) | 2 lines
This is getting closer and closer to working through several levels...
------------------------------------------------------------------------
r38 | rgb | 2007-07-05 01:44:15 -0400 (Thu, 05 Jul 2007) | 3 lines
Well, we'll try one more time to get this right. Note that we shouldn't
be saving Makefile any more.
------------------------------------------------------------------------
r37 | rgb | 2007-07-05 01:38:22 -0400 (Thu, 05 Jul 2007) | 2 lines
ALMOST configures clean...
------------------------------------------------------------------------
r36 | rgb | 2007-07-05 01:36:12 -0400 (Thu, 05 Jul 2007) | 4 lines
Well, this seems to "work" in that it autoconf's right up, but alas it
also fails to actually build. I need to keep adding the minimal amount
from the dieharder tree required to make it all work.
------------------------------------------------------------------------
r33 | rgb | 2007-07-05 01:28:16 -0400 (Thu, 05 Jul 2007) | 2 lines
This buildroot is not necessary or desireable.
------------------------------------------------------------------------
r32 | rgb | 2007-07-05 01:27:32 -0400 (Thu, 05 Jul 2007) | 2 lines
This seems to work, right through Makefile.am...
------------------------------------------------------------------------
r31 | rgb | 2007-07-05 01:25:48 -0400 (Thu, 05 Jul 2007) | 2 lines
This nees a quick checkin, although it isn't really "there".
------------------------------------------------------------------------
r30 | rgb | 2007-06-28 06:32:39 -0400 (Thu, 28 Jun 2007) | 5 lines
I have no idea what's going on here, but either way I need to
pursue/continue this. I also NEED to register dieharder as an FC
project, but that's another story. Oh, and of course I need to install
debian under vmware.
------------------------------------------------------------------------
r29 | rgb | 2007-02-06 08:08:09 -0500 (Tue, 06 Feb 2007) | 2 lines
Making sure that this goes in and around...
------------------------------------------------------------------------
r28 | rgb | 2007-02-06 01:26:57 -0500 (Tue, 06 Feb 2007) | 11 lines
I have no idea what just happened, but a few of the scripts in this
package seem to get overwritten at random here and there. I ended up
with a wulf2html that was, in fact, a mirror of
/etc/wulfware/wulf2html.sh, which created a lovely loop that would lock
my box up in about 1 second beyond repair on the recursive loop. I
couldn't even zap it -- the zap command couldn't catch up.
Anyway, squashed, and wulfware now DEFINITELY does NOT do this, but gee,
I have no idea how or when it started in the first place and I suppose
it could happen again. Thank God for subversion...
------------------------------------------------------------------------
r27 | rgb | 2007-02-05 11:21:22 -0500 (Mon, 05 Feb 2007) | 2 lines
Just to make sure that this is all checked in and everything...
------------------------------------------------------------------------
r26 | rgb | 2007-02-04 22:49:40 -0500 (Sun, 04 Feb 2007) | 4 lines
This is a decrufting checking. Note that I'm carefully moving the cruft
into Cruft subdirectories instead of throwing it away. This just plain
seems sensible.
------------------------------------------------------------------------
r25 | rgb | 2007-02-04 22:26:04 -0500 (Sun, 04 Feb 2007) | 5 lines
This may, finally, be "it" -- done at last, with a working wulf2html.
This is clearly the way it should have been done in the first place.
I'm not certain I've got all the dependencies and so on done correctly,
but it seems like they are probably all right.
------------------------------------------------------------------------
r24 | rgb | 2007-02-04 21:46:27 -0500 (Sun, 04 Feb 2007) | 2 lines
OK, FIRST we check this in, as it all seems (miraculously) to work!
------------------------------------------------------------------------
r23 | rgb | 2007-02-04 20:34:19 -0500 (Sun, 04 Feb 2007) | 3 lines
I have NO IDEA what I did before, but we need to check this in and make
everything good.
------------------------------------------------------------------------
r22 | root | 2007-02-04 20:33:35 -0500 (Sun, 04 Feb 2007) | 3 lines
Let's see if this doesn't build and install for a really functional
wulf2html.
------------------------------------------------------------------------
r19 | rgb | 2007-02-03 11:35:46 -0500 (Sat, 03 Feb 2007) | 2 lines
This SHOULD work, but it isn't, quite. Odd.
------------------------------------------------------------------------
r18 | rgb | 2007-02-03 11:30:59 -0500 (Sat, 03 Feb 2007) | 5 lines
This should maybe build/install into ./buildroot cleanly on a make
install, so that I can replace all that garbage in the specfile
with a make BUILDROOT=%{buildroot} install and be done. One stop
shopping, so to speak.
------------------------------------------------------------------------
r17 | rgb | 2007-02-03 09:44:34 -0500 (Sat, 03 Feb 2007) | 3 lines
This is now fixed to make install through xmlsysd. Hmmm, let's do this
via the toplevel make install.
------------------------------------------------------------------------
r16 | rgb | 2007-02-03 08:58:04 -0500 (Sat, 03 Feb 2007) | 12 lines
This now works again through libwulf. I have to insert the buildroot
trick into the other four targets and fix the specfile, but then I
should be once again cooking with gas, so to speak. This is clearly
the way to go -- in fact I can easily enough make buildroot point
anywhere I like by default and life will be just fine, as long as
I have installs that create the actual tree as required beneath it.
I also want to make the build happen with a single make target, the
good old "make install". That will then build everything and install it
so that rpmbuild can package things up. In fact, I'm starting to grok
rpmbuild a bit better -- ALL that matters is building the tree...
------------------------------------------------------------------------
r15 | rgb | 2007-02-03 08:47:19 -0500 (Sat, 03 Feb 2007) | 5 lines
This MIGHT just work correctly, but we'll have to see if it builds at
all. It has to build even if the buildroot tree doesn't exist (that is,
the build cannot depend on buildroot/usr/include being already
installed) unless it forces it to be installed FIRST.
------------------------------------------------------------------------
r14 | rgb | 2007-02-03 08:32:35 -0500 (Sat, 03 Feb 2007) | 2 lines
Trying again...
------------------------------------------------------------------------
r12 | rgb | 2007-02-03 08:26:25 -0500 (Sat, 03 Feb 2007) | 7 lines
Alas, we're going to have to reorganize. Looks like
library/multipackage trees (and maybe even simple trees) benefit
tremendously in terms of portable Makefiles from having a buildroot.
make install can then build directly into it with a single
BUILDROOT or PREFIX override, and the spec file will do the Right Thing.
In the meantime, it becomes very easy to test.
------------------------------------------------------------------------
r9 | rgb | 2007-02-03 07:34:35 -0500 (Sat, 03 Feb 2007) | 3 lines
This now builds the source, libwulf, xmlsysd, wulfstat and wulflogger
rpms in a single build. Pretty cool, actually...
------------------------------------------------------------------------
r8 | rgb | 2007-02-03 07:21:00 -0500 (Sat, 03 Feb 2007) | 2 lines
This actually works. Now to add the other two clients...
------------------------------------------------------------------------
r7 | rgb | 2007-02-03 06:54:43 -0500 (Sat, 03 Feb 2007) | 2 lines
BEFORE I run this and maybe overwrite include, let's save this.
------------------------------------------------------------------------
r6 | rgb | 2007-02-03 06:40:30 -0500 (Sat, 03 Feb 2007) | 4 lines
This is getting CLOSER to a build. I do need to get my dependencies
right in the toplevel makefile, as the tgz needs to autorebuild when the
rpm is made.
------------------------------------------------------------------------
r5 | rgb | 2007-02-02 20:22:18 -0500 (Fri, 02 Feb 2007) | 3 lines
OK, this now actually "works" to make a tgz, we could start to work on
rpms...
------------------------------------------------------------------------
r4 | rgb | 2007-02-02 20:11:30 -0500 (Fri, 02 Feb 2007) | 2 lines
We'd better check this in lest we lose things...
------------------------------------------------------------------------
r3 | rgb | 2007-02-02 17:46:26 -0500 (Fri, 02 Feb 2007) | 2 lines
Well, we do need to check this in before we drop anything, sigh.
------------------------------------------------------------------------
r2 | rgb | 2007-02-02 16:50:26 -0500 (Fri, 02 Feb 2007) | 3 lines
OK, this checks in a completely ported libwulf that should be
build/installable from the toplevel Makefile.
------------------------------------------------------------------------
r1 | rgb | 2007-02-02 15:07:43 -0500 (Fri, 02 Feb 2007) | 3 lines
This should be interesting. This is a shell for the whole wulfware
project...
------------------------------------------------------------------------
./wulfware-2.6.0/wulfware.php 0000644 0002471 0002471 00000000367 10645251201 014167 0 ustar rgb rgb
./wulfware-2.6.0/Makefile.am 0000644 0002471 0002471 00000023433 10645251201 013655 0 ustar rgb rgb ## Process this file with automake to produce Makefile.in
SUBDIRS = libwulf xmlsysd wulfstat wulflogger wulf2html
EXTRA_DIST = autogen.sh wulfware-config.in configure.ac \
THANKS BUGS SUPPORT wulfware.spec.in wulfware.m4
# install the man pages (nope, not doing this right yet)
# man_MANS=wulfware.1 libwulfware.3
# m4datadir = $(datadir)/aclocal
# m4data_DATA = wulfware.m4
# check_SCRIPTS = test_wulfware.sh
# TESTS = test_wulfware.sh
#========================================================================
# This is the toplevel Makefile for the wulfware project. It has
# some very specialized targets:
#
# make alone should build the entire application
# make install should build and install the entire application
# make installweb installs to website for download
# make installrepo installs to yum repo
#
# make tgz makes $(TGZ) of entire tree for standalone or rpm build
# make rpm makes $(RPM) packages built by wulfware.spec
# make svn does a svn commit and creates the timestamp $(SVNTIME)
# make sync does a svn commit and syncs to list of svn-tree hosts
#
# make clean cleans the source directories
#========================================================================
# This is the project name
PROJECT = wulfware
# These are the toplevel packages built by this project
LIBRARY = libwulf
LIBTIME = libwulf.time
PROGRAM0 = xmlsysd
P0TIME = xmlsysd.time
PROGRAM1 = wulfstat
P1TIME = wulfstat.time
PROGRAM2 = wulflogger
P2TIME = wulflogger.time
PROGRAM3 = wulf2html
P3TIME = wulf2html.time
MANUALS = wulfware-doc
MANTIME = wulfware-doc.time
# The destination on a remote webserver, used as:
# $(HOME)/public_html/$(WDIR)
# on that server, and the name of an ssh-accessible login server
# that contains the public_html path.
WLOGIN = login.phy.duke.edu
WDIR = Beowulf
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(PROJECT:=.svn.time)
#========================================================================
# This is revision information that MUST be set here and ONLY here.
# It will automagically set the related information in $(SPEC) and the
# subsidiary Makefiles in the source subdirectories.
#========================================================================
#========================================================================
# This is revision information, automagically set from autoconf. The
# actual version information is set ONLY in configure.ac
#========================================================================
VERSION=@VERSION@
RELEASE=@RELEASE@
ABS = $(PROJECT).abs
PHP = $(PROJECT).php
# RPM/tarball target objects. We need rules for all of these.
PROJECTDIR = $(PROJECT)-$(VERSION)
TAR = $(PROJECTDIR).tar
TGZ = $(PROJECTDIR).tgz
SPEC = $(PROJECT).spec
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(LIBTIME) $(P0TIME) $(P1TIME) $(P2TIME) $(P3TIME)
# This is not, actually, a particularly useful toplevel target. To
# work correctly it also would require a full parsing of all
# lower level dependencies. I'm leaving it in for the moment just
# to have a default target at the toplevel that CAN be used to test.
$(LIBTIME):
(cd $(LIBRARY); \
make)
$(P0TIME):
(cd $(PROGRAM0); \
make)
$(P1TIME):
(cd $(PROGRAM1); \
make)
$(P2TIME):
(cd $(PROGRAM2); \
make)
$(P3TIME):
(cd $(PROGRAM3); \
make)
$(ABS): Makefile
cat $(ABS) | \
sed -e 's/^\(
Version \)\(.*\)/\1$(VERSION)<\/H2><\/center>/' > /tmp/$(ABS).$$
mv /tmp/$(ABS).$$ $(ABS)
#========================================================================
# This is a required target for both its own sake and to support the
# rpm build. It has to run unconditionally when called. Note that we
# make PRECISELY what we need in terms of the source directories,
# excluding all restricted material and irrelevant data.
#========================================================================
tgz: Makefile COPYING Copyright NOTES README $(SPEC) $(ABS) $(PHP)
( rm -rf $(TAR) $(TGZ) $(PROJECTDIR); \
mkdir -p $(PROJECTDIR); \
cd $(LIBRARY); \
make clean; \
cd ..; \
cp -r $(LIBRARY) $(PROJECTDIR); \
cd $(PROGRAM0); \
make clean; \
cd ..; \
cp -r $(PROGRAM0) $(PROJECTDIR); \
cd $(PROGRAM1); \
make clean; \
cd ..; \
cp -r $(PROGRAM1) $(PROJECTDIR); \
cd $(PROGRAM2); \
make clean; \
cd ..; \
cp -r $(PROGRAM2) $(PROJECTDIR); \
cd $(PROGRAM3); \
make clean; \
cd ..; \
cp -r $(PROGRAM3) $(PROJECTDIR); \
cp -r include $(PROJECTDIR); \
mkdir -p $(PROJECTDIR)/lib; \
cp $(ABS) $(PROJECTDIR); \
cp $(PHP) $(PROJECTDIR); \
cp Makefile.am $(PROJECTDIR); \
cp configure $(PROJECTDIR); \
cp $(SPEC).in $(PROJECTDIR); \
cp autogen.sh $(PROJECTDIR); \
cp config.guess $(PROJECTDIR); \
cp config.sub $(PROJECTDIR); \
cp missing $(PROJECTDIR); \
cp install-sh $(PROJECTDIR); \
cp mkinstalldirs $(PROJECTDIR); \
cp ltmain.sh $(PROJECTDIR); \
cp configure.ac $(PROJECTDIR); \
cp Copyright $(PROJECTDIR); \
cp COPYING $(PROJECTDIR); \
cp INSTALL $(PROJECTDIR); \
cp AUTHORS $(PROJECTDIR); \
cp NEWS $(PROJECTDIR); \
cp ChangeLog $(PROJECTDIR); \
cp README $(PROJECTDIR); \
cp NOTES $(PROJECTDIR); \
tar -cvpf $(TAR) \
--exclude=.svn \
--exclude=Cruft \
--exclude=Exclude \
--exclude=*.tar \
--exclude=*.tgz \
--exclude=*.rpm \
./$(PROJECTDIR); \
gzip $(TAR); \
mv $(TAR).gz $(TGZ); \
rm -rf $(PROJECTDIR))
#========================================================================
# rpm target special stuff
#
# To work in userspace, add the following:
# %_topdir /home/rgb/Src/redhat
# to your personal $(HOME)/.rpmmacros after building
# yourself a private copy of the /usr/src/redhat directory structure.
#
# RPM_TOPDIR=/usr/src/redhat
RPM_TOPDIR=$(HOME)/Src/rpm_tree
# This is needed to get the right library and binary rpm.
ARCH=`uname -i`
# ARCH=i386
# These are the three rpms automagically built by the spec
SRPM = $(PROJECT)-$(VERSION)-$(RELEASE).src.rpm
LIBWULF_RPM = libwulf-$(VERSION)-$(RELEASE).$(ARCH).rpm
XMLSYSD_RPM = xmlsysd-$(VERSION)-$(RELEASE).$(ARCH).rpm
WULFSTAT_RPM = wulfstat-$(VERSION)-$(RELEASE).$(ARCH).rpm
WULFLOGGER_RPM = wulflogger-$(VERSION)-$(RELEASE).$(ARCH).rpm
WULF2HTML_RPM = wulf2html-$(VERSION)-$(RELEASE).$(ARCH).rpm
$(TGZ): tgz
$(SRPM): rpm
$(LIBWULF_RPM): rpm
$(XMLSYSD_RPM): rpm
$(WULFSTAT_RPM): rpm
$(WULFLOGGER_RPM): rpm
$(WULF2HTML_RPM): rpm
#========================================================================
# One stop shop. Basically we build this every time, we hope.
rpm: Makefile $(TGZ) $(SPEC)
cp $(TGZ) $(RPM_TOPDIR)/SOURCES
cp $(SPEC) $(RPM_TOPDIR)/SPECS
rpmbuild -ba --target=$(ARCH) $(RPM_TOPDIR)/SPECS/$(SPEC)
cp $(RPM_TOPDIR)/SRPMS/$(SRPM) .
cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(LIBWULF_RPM) .
cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(XMLSYSD_RPM) .
cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULFSTAT_RPM) .
cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULFLOGGER_RPM) .
cp $(RPM_TOPDIR)/RPMS/$(ARCH)/$(WULF2HTML_RPM) .
svn:
echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision
svn commit .
cat $(SVNTIME) | \
sed -e '/^New Checkin/d' >> $(SVNTIME).tmp
mv $(SVNTIME).tmp $(SVNTIME)
sync:
echo "New Checkin `date`" >> $(SVNTIME) # Will force a commit and increment revision
svn commit . # Do the commit
rsync -avz --delete $(SVNPATH) login.phy.duke.edu:/home/einstein/prof/rgb/Src/svn-tree
rsync -avz --delete $(SVNPATH) uriel:$(SVNTREE)
cat $(SVNTIME) | \
sed -e '/^New Checkin/d' >> $(SVNTIME).tmp
mv $(SVNTIME).tmp $(SVNTIME)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- (cd $(LIBRARY); \
$(MAKE) clean; \
cd ..; \
cd $(PROGRAM0); \
$(MAKE) clean; \
cd ..; \
cd $(PROGRAM1); \
$(MAKE) clean; \
cd ..; \
cd $(PROGRAM2); \
$(MAKE) clean; \
cd ..; \
cd $(PROGRAM3); \
$(MAKE) clean;)
installweb : $(TGZ) $(LIBWULF_RPM) $(XMLSYSD_RPM) $(WULFSTAT_RPM) \
$(WULFLOGGER_RPM) $(WULF2HTML) $(SRPM) $(ABS) $(PHP)
(ssh $(WLOGIN) mkdir -p public_html/$(WDIR)/$(PROJECT);\
rsync -avz $(TGZ) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(SRPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(LIBWULF_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(XMLSYSD_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(WULFSTAT_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(WULFLOGGER_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(WULF2HTML_RPM) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(ABS) $(WLOGIN):public_html/$(WDIR)/$(PROJECT)/; \
rsync -avz $(PHP) $(WLOGIN):public_html/$(WDIR)/)
REPOSERVER = uriel
REPOPATH = /var/www/html/fc/6/local/
installrepo : $(TGZ) $(LIBWULF_RPM) $(XMLSYSD_RPM) $(WULFSTAT_RPM) \
$(WULFLOGGER_RPM) $(WULF2HTML)
(ssh $(REPOSERVER) mkdir -p $(REPOPATH);\
rsync -avz $(TGZ) root@$(REPOSERVER):$(REPOPATH);\
rsync -avz $(LIBWULF_RPM) root@$(REPOSERVER):$(REPOPATH)/SRPM;\
ssh $(REPOSERVER) mkdir -p $(REPOPATH)/$(ARCH);\
rsync -avz $(XMLSYSD_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\
rsync -avz $(WULFSTAT_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\
rsync -avz $(WULFLOGGER_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH);\
rsync -avz $(WULF2HTML_RPM) root@$(REPOSERVER):$(REPOPATH)/$(ARCH)\;
ssh root@$(REPOSERVER) "cd $(REPOPATH)/$(ARCH);createrepo .")
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES)
$(CC) -c $(CFLAGS) $<
./wulfware-2.6.0/wulfware.abs 0000644 0002471 0002471 00000010457 10645251201 014146 0 ustar rgb rgb Wulfware: A LAN/Cluster/Beowulf Monitoring Suite
Version 2.6.0
Robert G. Brown (rgb)
This is the official website for the Wulfware suite of LAN or
cluster monitoring tools. These tools all build from a single source
rpm, or alternatively one can build them from the source tarball.
This project has a mailing list here .
This is a (currently) very low traffic list devoted to bug reports,
development announcements, feature requests and little else.
xmlsysd -- a daemon that runs on the client to be monitored that
provides client statistics on demand via an xinetd or forking daemon
socket. The information is wrapped in XML tags that can be parsed or
presented on the client side in a variety of ways.
libwulf -- a library of functions that support configuring a
cluster or LAN for monitoring (using an XML-based cluster description
file), managing connections to the cluster nodes or LAN clients
automatically, configuring the connections to return minimal information
for the quantities being monitored or displayed, and then polling the
hosts and extracting their information into a struct for further
processing by a user interface (UI) program linked to the library.
wulflogger -- a very simple raw-tty (stdout) UI that is suitable
for extracting cluster/lan statistics from any of several useful
clusters of data. This data can be piped into a file or other
applications for post-processing, removing the burden from a programmer
of writing an automated UI for managing the connections themselves.
Alternatively, it can be used as a template for further UIs.
wulfstat -- an ncurses-based (cooked tty) UI that presents LAN or
cluster stats in a scrollable display within e.g. an xterm window.
wulf2html -- a perl filter that runs behind wulflogger and transforms
wulflogger output into a formatted html page that can then be viewed
from any browser. wulf2html can be started from chkconfig as a service
on a webserver or host that mounts webspace after editing
/etc/warewulf/wulf2html.sh and /etc/warewulf/wulfhosts to reflect the
cluster or LAN to be monitored. This is still a bit experimental.
wulfware-doc -- a future latex/pdf documentation set for all
of the above, which alas doesn't exist yet. The man pages do exist, and
are installed for each package within the package.
gwulfstat -- a future or planned piece of vaporware that
will someday come to fruition -- a nice, fully featured GUI based on
Gtk/Gnome for monitoring a cluster or LAN. Since it doesn't exist I can
be lavish with features such as a "panel of lights" display that lets
you see the state of a huge cluster at a glance on a high-res display,
settable alarms and an alarm messaging system, a remote shell interface
that lets you select blocks of nodes or clients by means of a mouse or
hostname glob and then run shell commands on all the selected clients at
one time, an integrated batch job scheduler with the ability to
implement SIMPLE policy schemes, and eating your meatloaf for you. With
catsup. Seriously, all of that and more is possible, it just needs the
work.
wulfwebd -- a future or planned aggregator daemon. This is
a daemon that is basically a stripped wulflogger on one side -- goes and
connects to an entire cluster and manages all connections for you. It
polls the connected clients, collects their raw xmlsysd results, and
spits them out on a SINGLE port offered on the daemon side. This daemon
(will) exists only to make it possible to drill a hole through a
firewall to a single host and retrieve all the information on a cluster
or LAN inside. Or, alternatively, within multiple VPNs across IP domain
boundaries and so on if you want to do this securely. So you can sit in
Boston and monitor your departmental LAN and your research cluster all
at the same time right through firewalls in between from a single e.g.
wulfstat or gwulfstat session. This will require changes to the libwulf
API to support an aggregated connection, probably to a different default
port number or connection type via an extension of the cluster defining
xml.
Submit bug reports, etc. to
rgb at phy dot duke dot edu
./wulfware-2.6.0/include/ 0000755 0002471 0002471 00000000000 10645251201 013237 5 ustar rgb rgb ./wulfware-2.6.0/include/wulfware/ 0000755 0002471 0002471 00000000000 10645251201 015073 5 ustar rgb rgb ./wulfware-2.6.0/include/wulfware/wulfware_version.h.in 0000644 0002471 0002471 00000000045 10645251201 021251 0 ustar rgb rgb #define WULFWARE_VERSION "@VERSION@"
./wulfware-2.6.0/include/wulfware/libwulf_copyright.h 0000644 0002471 0002471 00000001241 10645251201 020776 0 ustar rgb rgb /*
*
* Copyright (c) 2003 by Robert G. Brown, rgb@phy.duke.edu
* GPL version 2b (b for beverage) granted as given
* in the file COPYING in this distribution.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
*/
./wulfware-2.6.0/include/wulfware/libwulf_prototypes.h 0000644 0002471 0002471 00000010602 10645251201 021217 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_prototypes.h 90 2004-09-30 17:38:02Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include
/*
*========================================================================
* Subroutine Prototypes
*
* The organization of the following is straightforward.
* hosts.c creates, clears/zeros, destroys a Host.
* connect.c creates, manages, shuts down a Host connection
* init.c initializes Host data via a live connection
* update.c updates Host data via a live connection
* send.c manages sending commands to single hosts or all hosts
* wulfhosts.c opens and parses a wulfhosts file
* xml_xtract.c contains xml utility routines for parsing xml
* parse.c contains parsing utility routines
* util.c contains non-xml, non-parsing utility routines.
*
*========================================================================
*/
/* connect.c */
void connect_to_all_hosts(Connectlist *connectlist);
int connect_to_host_by_ptr(Host *hostptr);
void send_command_to_host_by_ptr(Host *hostptr, char *cmd);
void send_command_to_all_hosts(char *cmd);
/* placeholders that don't do anything yet */
int disconnect_from_host_by_ptr(Host *hostptr);
void disconnect_from_all_hosts();
/* hosts.c */
void clear_values(Host *hostptr);
void clear_host_values(List *hostlist);
/* init.c */
void init_values(Host *hostptr);
void init_identity(Host *hostptr);
void init_time(Host *hostptr);
void init_users(Host *hostptr);
void init_cpuinfo(Host *hostptr);
void init_loadavg(Host *hostptr);
void init_meminfo(Host *hostptr);
void init_net(Host *hostptr);
void init_stat(Host *hostptr);
void init_sysvipc(Host *hostptr);
void init_uptime(Host *hostptr);
void init_version(Host *hostptr);
void init_pids(Host *hostptr);
void init_host_values(List *hostlist);
void send_userlist(Host *hostptr,List *userlistptr);
void send_tasklist(Host *hostptr,List *tasklistptr);
void init_state(Host *hostptr);
/* update.c */
void update_values(Host *hostptr);
void update_identity(Host *hostptr);
void update_time(Host *hostptr);
void update_users(Host *hostptr);
void update_cpuinfo(Host *hostptr);
void update_meminfo(Host *hostptr);
void update_net(Host *hostptr);
void update_stat(Host *hostptr);
void update_sysvipc(Host *hostptr);
void update_uptime(Host *hostptr);
void update_version(Host *hostptr);
void update_pids(Host *hostptr);
void update_loadavg(Host *hostptr);
void update_host_values(List *hostlist);
/* from wulfhosts.c */
void allocate_hostlists();
int read_wulfhosts(char *hostfile);
/* from wulfhosts_util.c */
void parse_hostrange(xmlXPathContextPtr xp_hostdoc);
int validate_hostrange(List *hostrangelistptr);
void validate_host(Host *hostptr);
void parse_iprange(xmlXPathContextPtr xp_hostdoc);
int validate_iprange(List *iprangelistptr);
void parse_hosttag(xmlXPathContextPtr xp_hostdoc);
void add_localhost();
int validate_hosttag(List *hosttaglistptr);
void parse_tasktag(xmlXPathContextPtr xp_hostdoc);
void parse_usertag(xmlXPathContextPtr xp_hostdoc);
void parse_roottag(xmlXPathContextPtr xp_hostdoc);
/* from xmlsysd_util.c */
int recv_xmlDoc(Host *hostptr,char *msgbuf);
void create_xmlsysd_xpath(Host *hostptr,char *msgbuf);
void destroy_xmlsysd_xpath(Host *hostptr);
/* from xml_xtract.c */
int xtract(int type, void *dest, char *xpath, xmlXPathContextPtr xp_doc);
int xtract_attribute(int type, void *dest, char *xpath,
char *attribute, xmlXPathContextPtr xp_doc);
/* util.c */
int readn_from_hostptr(Host *hostptr, char *msgbuf, size_t len);
int readn(int fd, char *bp, size_t len);
int readline(int fd, char *msgbuf, int maxstrlen);
int readline_from_hostptr(Host *hostptr,char *msgbuf, size_t maxstrlen);
int select_fd (int fd, int seconds, int microseconds);
int wgetread(int fd, char *buf, int len);
void make_uptime(double total_secs,char *uptime);
char *scale_k(long unsigned int k,long unsigned int width,long unsigned int unit);
/* parse.c */
char **allocate_fields(size_t maxfields,size_t maxfieldlength);
int parse(char *inbuffer,char **outfields,int maxfields,int maxfieldlength);
int split(char *inbuffer,char **outfields,char *delim,
int maxfields,int maxfieldlength);
./wulfware-2.6.0/include/wulfware/libwulf_wulfhost.h 0000644 0002471 0002471 00000007563 10645251201 020656 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_wulfhost.h 90 2004-09-30 17:38:02Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include
/* libxml includes */
/*
* COMPAT using xml-config --cflags to get the include path this will
* work with both
*/
#include
#include
#include
/* We use these for certain buffer sizes */
#define K 1024
#define K4 4096
#define K64 65536
/*
* This defines some flags to control just what the daemon sends and how.
* Each is sort of documented in place.
*/
typedef struct {
int compress; /* Do we compress xml output? */
int whitespace; /* Do we squeeze out whitespace? */
/*
* All the following toggle various components of the return. Some of
* these are only needed "once" in a typical monitoring session anyway
* and can be pulled from the init return (which always sends
* "everything"). Future developers should note the 1:1 correspondance
* between many of these flags and "init_XXXX.c" and "update_XXXX.c"
* sources and calls.
*/
/* system call stuff */
int identity; /* Do we update system identity? */
int time; /* Do we update system time? */
int users; /* Do we update system pids? */
/* proc-derived stuff */
int cpuinfo; /* Do we update proc cpuinfo? */
int loadavg; /* Do we update proc loadavg? */
int meminfo; /* Do we update proc meminfo? */
int net; /* Do we update proc net? */
int stat; /* Do we update proc stat? */
int sysvipc; /* Do we update proc shared memory stuff? */
int uptime; /* Do we update proc uptime? */
int version; /* Do we update proc (kernel) version? */
/* Processes (in /proc/XXXXX where XXXXX is a pid) */
int pids; /* Do we update pids at all? */
int pidstats; /* (unused) for pidstats */
int cmdline; /* Do we get the cmdline in pids? */
int running; /* Running PIDs or all? */
int root; /* Including those owned by root? */
List *userlist; /* A linked list of usernames to watch */
List *tasklist; /* A linked list of tasknames to watch */
} Dctl;
/*
* This struct contains all per-host state information:
* hostname
* host IP number (character and binary)
* port number
* file descriptor of socket
* flag to indicate active connection
* xmlDocPtr to xmlDoc struct containing the as yet
* unparsed xml returned by a command. Note that this
* space is allocated by the xml parser on EACH call and
* must be freed when we've extracted as much or as little as
* we need. Note also that this CLIENT will have a nontrivial
* memory footprint when run on very large numbers of hosts
* because xmlDocs are lavishly provided with information.
* Value val is the struct containing most values of interest.
*
* Note that the first four values are set by the various
* wulfhost parsing blocks from , and
* tags.
*/
typedef struct {
char hostname[K];
char hostip[K];
unsigned long inetaddress;
int port;
int client_fd;
int connected;
xmlDocPtr doc;
xmlXPathContextPtr xp_doc;
Value val;
/*
* To avoid having to re-malloc this every time we clear values
* OR kludge something horrible to preserve the allocated memory,
* we put the linked list for pid's in this struct, not the val
* struct. We still clear its CONTENTS when we clear values.
*/
List *pidlist;
Dctl dctl;
} Host;
/*
* In order to be able to deal with variable numbers of hosts (add
* and delete hosts, for example) hosts are stored in a linked list
* so that we can freely add or delete them. This means that we
* have to walk the list whenever we loop over all hosts.
*/
List *hostlist;
./wulfware-2.6.0/include/wulfware/libwulf_wulfhosts.h 0000644 0002471 0002471 00000003004 10645251201 021023 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_wulfhosts.h 90 2004-09-30 17:38:02Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include
/* We use these for certain buffer sizes */
#define K 1024
#define K4 4096
#define K64 65536
/* Default xmlsysd port */
#define XMLSYSD_PORT 7887
/*
* This flag says "connect to localhost only" and skips parsing
* of wulfhosts files in any location.
*/
int localhosts_only;
/*
* The following structs exist only to allow and
* blocks of hosts to be read in and saved all at once.
*/
typedef struct {
char hostname[K];
char hostip[K];
unsigned long inetaddress;
int port;
} Hosttag;
typedef struct {
char hostfmt[K];
int imin;
int imax;
int port;
} Hostrange;
typedef struct {
int ipmin[4];
int ipmax[4];
int port;
} IPrange;
/*
* We keep linked lists of host tags and host ranges and ip ranges
* for parsing wulfhosts.
*/
List *hosttaglist;
List *hostrangelist;
List *iprangelist;
/*
* We'll also want a couple of linked lists for users and tasks to be
* monitored.
*/
List *userlist;
List *tasklist;
/*
* Needed by connect_to_hosts() since it is always a threaded routine
* and hence needs at most one argument
*/
typedef struct {
List *hostlist;
int connect_delay;
} Connectlist;
./wulfware-2.6.0/include/wulfware/libwulf_commands.h 0000644 0002471 0002471 00000006616 10645251201 020602 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_commands.h 87 2004-09-28 17:31:03Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
* Needed to define List below (linked list interface).
*/
#include
/*
* The following enumerates and defines all the base
* commands recognized by xmlsysd.
*
* init - opens all /proc files and does a sendall. Note that
* toggling a proc-derived field group does NOT cause the
* files to be closed -- they just aren't rewound and
* processed and sent on a "send" command. This command
* should therefore be the first thing sent to the daemon.
* sendall - sends all non-PID fields, regardless of the state of their
* toggle controls. PID fields are sent according to their
* controls, which may be in their default (running, no root)
* state.
* send - sends an update of all fields according to the state of
* their controls.
* on fgrp1 [fgrp2 fgrp3...]
* - turns the control toggle for a given list of field groups
* "on" (send if available).
* off fgrp1 [fgrp2 fgpr3...]
* - turns the control toggle for a given list of field groups
* "off" (do NOT send).
* adduser X - causes user X to be added to the user list. If this list
* is not empty, only processes belonging to users on this
* list are monitored.
* rmuser X - removes user X from the user list, if they are there to
* begin with.
* clrusers - clears user list.
* addtask X - causes task X to be added to the task list. If this list
* is not empty, only processes whose name matches an entry on
* this list are monitored.
* rmtask X - removes task X from the task list, if it is there to be
* removed.
* clrtask - clears task list.
*
* Note that user/task controls are combined with an "and"
* operator to facilitate task exclusion over inclusion.
* If both lists are non-empty, only tasks matching one of
* the task names belonging to users matching one of the
* user names are monitored. However, if either list is
* empty, only the other list is used -- a null list is
* is promiscuous.
*
* compress - short for off whitespace;on compress (minimum packet size).
* expand - short for on whitespace;off compress (easiest to read).
*
* verbose N - controls verbosity (for debugging only).
* quit - causes this instance of xmlsysd to exit.
*/
typedef enum {
INIT,
SENDALL,
SEND,
ON,
OFF,
ADDUSER,
RMUSER,
CLRUSER,
ADDTASK,
RMTASK,
CLRTASK,
COMPRESS,
EXPAND,
VERBOSE,
QUIT,
N_COMMANDS
} Commands;
/*
* if you add new commands that share leading characters (like sendall and
* send) be sure the LONGEST one is first or the shorter one will match
* accidentally in the parsing loop.
*/
static char *commands[] = {
"init",
"sendall",
"send",
"on",
"off",
"adduser",
"rmuser",
"clruser",
"addtask",
"rmtask",
"clrtask",
"compress",
"expand",
"verbose",
"quit",
"n_commands"
};
./wulfware-2.6.0/include/wulfware/libwulf_values.h 0000644 0002471 0002471 00000023370 10645251201 020274 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_values.h 90 2004-09-30 17:38:02Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include
/* We use these for certain buffer sizes */
#define K 1024
#define K4 4096
#define K64 65536
/*
* structs and enums to hold value(s) vector(s).
*/
typedef struct {
/*
* These are the raw values, and will also serve as the
* last values in the evaluation of the rates below.
*/
long int user;
long int nice;
long int sys;
long int idle;
long int tot;
/*
* These are the rates that we actually display.
*/
double user_rate;
double nice_rate;
double sys_rate;
double idle_rate;
double tot_rate;
} Cpu;
typedef struct {
/*
* Interface identifiers
*/
char devtype[K];
char devid[K];
char name[K];
char host[K];
char ip[K];
/*
* Receive numbers. Note all these are UNSIGNED long ints...
*/
unsigned long long int rx_bytes;
unsigned long long int rx_packets;
unsigned long long int rx_errs;
unsigned long long int rx_drop;
unsigned long long int rx_fifo;
unsigned long long int rx_frame;
unsigned long long int rx_compressed;
unsigned long long int rx_multicast;
/*
* Transmit numbers
*/
unsigned long long int tx_bytes;
unsigned long long int tx_packets;
unsigned long long int tx_errs;
unsigned long long int tx_drop;
unsigned long long int tx_fifo;
unsigned long long int tx_collisions;
unsigned long long int tx_compressed;
/*
* These are the rates that we actually display. We can add the rest
* if we ever want to build a display to show them.
*/
double rx_bytes_rate;
double rx_packets_rate;
double rx_errs_rate;
double tx_bytes_rate;
double tx_packets_rate;
double tx_errs_rate;
} Interface;
/*
* The following struct holds the "interesting" information about
* a running task (pid).
*/
typedef struct {
int pid;
char taskname[128];
char cmdline[K];
char state[128];
char user[128];
int uid;
char time[128];
int nice;
char vsize[128];
char rss[128];
} Pid;
/*
* May not ever use this. Eliminate if/when cruft.
*/
typedef enum {
COUNT, /* just count them, ignore the type */
STRING,
CHAR,
INT,
LONG,
UNSIGNED_LONG,
UNSIGNED_LONG_LONG,
FLOAT,
DOUBLE,
N_TYPES
} Types;
/*
* I don't think there is a "good" way to do this. Every way I can
* think of has elements that won't scale well, in part because like
* it or not, much of what we wish to present is made by a "recipe"
* from ingredients in /proc or elsewhere. Sure, some values are
* presentable raw, others are static and don't need to be re-extracted
* after the init, but we pretty much need individual, per-host indexed
* storage for field we plan to use in a recipe (or at least for the
* result of applying the recipe itself to fields directly extracted from
* the xml document(s)).
*
* SO, we're going to at least start by creating a massive "values" struct
* some of the elements of which (e.g. cpu, eth) are themselves structs
* or struct vectors. We can then allocate the whole damned thing at
* once in startup().
*
* Note that there is considerable redundancy in the values below. For
* example, hostname is defined in the parent host struct (used to contact
* the host), again in , and yet again in a .
* This is really unavoidable. Memory is cheap, and even the CPU required
* to fill it isn't that costly. We'll start this way, at any rate.
*
* Perhaps the experience of doing this will help us learn a more portable
* and scalable way of doing this for a future revision.
*
* In the meantime, we may as well start at the top xmlsysd and work down.
* We'll triply echo the tag structure -- Value, enum and path,
* plus we'll add attributes and auxiliary variables to Value as required.
*
* All strings MUST be of K length so we have an idea of how long to make
* the returns...
*/
typedef struct {
/* tags under */
/* */
unsigned long int identity_tv_sec;
unsigned long int identity_tv_usec;
char hostname[K];
char hostip[K];
/* */
unsigned long int time_tv_sec;
unsigned long int time_tv_usec;
char time[K];
/* cpuinfo */
unsigned long int cpuinfo_tv_sec;
unsigned long int cpuinfo_tv_usec;
char cpuinfo_model_name[K];
double cpuinfo_clock;
long int cpuinfo_cores;
long int cpuinfo_cachesize;
/* */
unsigned long int users_tv_sec;
unsigned long int users_tv_usec;
long int users;
/* tags under */
/* */
unsigned long int stat_tv_sec;
unsigned long int stat_tv_usec;
/*
* We count the number of cpus and save it for this host, then
* allocate just the right about of space for the cpu struct vector.
* Note that there are always at least TWO entries, one for cpu_tot
* and one for cpu0. cpu_tot goes at cpu[-1] in the vector below.
* num_cpus, however is the true number of cpus in /proc/stat.
*/
long int num_cpus;
Cpu *cpu;
/* page: two raw values, two float rates */
long int page_in;
long int page_out;
double page_in_rate;
double page_out_rate;
/* swap: two raw values, two float rates */
long int swap_in;
long int swap_out;
double swap_in_rate;
double swap_out_rate;
/* intr: we only present total, one raw, one float rate */
long int intr;
double intr_rate;
/* ctxt: we only present total, one raw, one float rate */
long int ctxt;
double ctxt_rate;
/* processes: one raw, one float rate */
long int processes;
double processes_rate;
/* kernel>=2.6 */
int procs_running;
int procs_blocked;
/* */
unsigned long int loadavg_tv_sec;
unsigned long int loadavg_tv_usec;
double load1;
double load5;
double load15;
/* */
unsigned long int meminfo_tv_sec;
unsigned long int meminfo_tv_usec;
unsigned long int mem_total;
unsigned long int mem_used;
unsigned long int mem_free;
unsigned long int mem_shared;
unsigned long int mem_buffers;
unsigned long int mem_cached;
unsigned long int swap_total;
unsigned long int swap_used;
unsigned long int swap_free;
/* */
unsigned long int netdev_tv_sec;
unsigned long int netdev_tv_usec;
/*
* interfaces are the contents of
*/
long int num_interfaces;
Interface *interface;
/* tcp sockets in use */
long int tcp_inuse;
/* */
unsigned long int sysvipc_tv_sec;
unsigned long int sysvipc_tv_usec;
/* uptime */
unsigned long int uptime_tv_sec;
unsigned long int uptime_tv_usec;
double uptime_up;
double uptime_idle;
double duty_cycle;
char uptime[K];
/* version */
unsigned long int version_tv_sec;
unsigned long int version_tv_usec;
char version[K];
/* */
long int pids_tv_sec;
long int pids_tv_usec;
} Value;
typedef enum {
IDENTITY,
HOSTNAME,
HOSTIP,
TIME,
USERS,
STAT,
CPU,
CPU_ID,
CPU_USER,
CPU_NICE,
CPU_SYS,
CPU_TOT,
PAGE_IN,
PAGE_OUT,
SWAP_IN,
SWAP_OUT,
INTR,
CTXT,
PROCESSES,
PROCS_RUNNING,
PROCS_BLOCKED,
LOADAVG,
LOAD1,
LOAD5,
LOAD15,
MEMINFO,
MEM_TOTAL,
MEM_USED,
MEM_FREE,
MEM_SHARED,
MEM_BUFFERS,
MEM_CACHED,
SWAP_TOTAL,
SWAP_USED,
SWAP_FREE,
NETDEV,
INTERFACE,
TCP_INUSE,
CPUINFO,
CPUINFO_MODEL_NAME,
CPUINFO_CLOCK,
CPUINFO_CORES,
CPUINFO_CACHESIZE,
SYSVIPC,
SYSVIPC_MSGBUFS,
SYSVIPC_MSGTOT,
SYSVIPC_SEMBUFS,
SYSVIPC_SEMTOT,
SYSVIPC_SHMBUFS,
SYSVIPC_SHMTOT,
UPTIME,
UPTIME_UP,
UPTIME_IDLE,
WULFVERSION,
PIDS,
} Values;
static char *value_xpath[] = {
"/xmlsysd/system/identity",
"/xmlsysd/system/identity/hostname",
"/xmlsysd/system/identity/hostip",
"/xmlsysd/system/time",
"/xmlsysd/system/users",
"/xmlsysd/proc/stat",
"/xmlsysd/proc/stat/cpu",
"/xmlsysd/proc/stat/cpu/cpuid",
"/xmlsysd/proc/stat/cpu/user",
"/xmlsysd/proc/stat/cpu/nice",
"/xmlsysd/proc/stat/cpu/sys",
"/xmlsysd/proc/stat/cpu/tot",
"/xmlsysd/proc/stat/page/in",
"/xmlsysd/proc/stat/page/out",
"/xmlsysd/proc/stat/swap/in",
"/xmlsysd/proc/stat/swap/out",
"/xmlsysd/proc/stat/intr",
"/xmlsysd/proc/stat/ctxt",
"/xmlsysd/proc/stat/processes",
"/xmlsysd/proc/stat/procs_running",
"/xmlsysd/proc/stat/procs_blocked",
"/xmlsysd/proc/loadavg",
"/xmlsysd/proc/loadavg/load1",
"/xmlsysd/proc/loadavg/load5",
"/xmlsysd/proc/loadavg/load15",
"/xmlsysd/proc/meminfo",
"/xmlsysd/proc/meminfo/memory/total",
"/xmlsysd/proc/meminfo/memory/used",
"/xmlsysd/proc/meminfo/memory/free",
"/xmlsysd/proc/meminfo/memory/shared",
"/xmlsysd/proc/meminfo/memory/buffers",
"/xmlsysd/proc/meminfo/memory/cached",
"/xmlsysd/proc/meminfo/swap/total",
"/xmlsysd/proc/meminfo/swap/used",
"/xmlsysd/proc/meminfo/swap/free",
"/xmlsysd/proc/net/dev",
"/xmlsysd/proc/net/dev/interface",
"/xmlsysd/proc/net/sockstat/tcp/inuse",
"/xmlsysd/proc/cpuinfo",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/model_name",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/clock",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/cores",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/cachesize",
"/xmlsysd/proc/sysvipc",
"/xmlsysd/proc/sysvipc/msgbufs",
"/xmlsysd/proc/sysvipc/msgtot",
"/xmlsysd/proc/sysvipc/sembufs",
"/xmlsysd/proc/sysvipc/semtot",
"/xmlsysd/proc/sysvipc/shmbufs",
"/xmlsysd/proc/sysvipc/shmtot",
"/xmlsysd/proc/uptime",
"/xmlsysd/proc/uptime/up",
"/xmlsysd/proc/uptime/idle",
"/xmlsysd/proc/version",
"/xmlsysd/pids",
"n_values"
};
./wulfware-2.6.0/include/wulfware/libwulf.h 0000644 0002471 0002471 00000006720 10645251201 016715 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf.h 90 2004-09-30 17:38:02Z rgb $
*
* See copyright in libwulf_copyright.h and the accompanying file COPYING
*========================================================================
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/*
* This is required to get nanosleep right
#define USE_POSIX199309
*/
#include
/*
*========================================================================
* Useful defines
*========================================================================
*/
#define STDIN stdin
#define STDOUT stdout
#define STDERR stderr
#define OUTFP stderr
#define YES 1
#define NO 0
#define PI 3.141592653589793238462643
#define K 1024
#define K4 4096
#define K64 65536
#define UDELAY 0
/*
* This is all structs and enums needed to extract and store the values
* on a per-host basis for further processing and display.
*/
#include
/*
* This ensures that wulfstat can execute all the commands recognized
* by xmlsysd, no more and no less. With a fair bit of work, of course...;-)
*/
#include
/*
* These are structs used to xml-parse wulfhosts
*/
#include
/* the main gnome include */
/* #include */
/*
* The primary host structs. Must be included after wulfhosts.h
* xml stuff.
*/
#include
/*
* Subroutine Prototypes
*/
#include
/*
*========================================================================
* Debug enum -- one per separate component, no particular order
*========================================================================
*/
typedef enum {
D_QUIET,
D_ALL,
D_MAIN,
D_UTIL,
D_PARSECL,
D_STARTUP,
D_WORK,
D_PARSE,
D_CONNECT,
D_INIT_HOST,
D_CONNECT_HOSTS,
D_READHOST,
D_SENDCMD,
D_SELECT_OPTION,
D_EXTRACT_VALUES,
D_INIT_VALUES,
D_UPDATE_VALUES,
D_VALUES,
D_DISPLAY_VALUES,
D_DISPLAY_DEBUG,
D_SCREEN,
D_XMLSYSD,
D_QUIT,
N_DEBUG
} Debug;
/*
*========================================================================
* Global Variables and relevant #defines
*
* Set the default values and override from the command line in parsecl().
*========================================================================
*/
/*
* verbose is a debug switch. One can switch on the debugging
* of many components of the program with different values. However
* one has to read the source to know what turns on what.
*/
extern int verbose;
extern int udelay;
/*
* 64K i/o buffers for receiving/parsing the xmlsysd returns. Global is
* faster, but we absolutely must NOT use the same buffers on the
* connection/initialization thread and the update thread, as eventually
* they are bound to collide with unpredictable results.
*/
char init_buf[K64];
char update_buf[K64];
/*
* For parsing attributes etc.
*/
char tmp_buf[K];
./wulfware-2.6.0/include/wulfware/libwulf_llist.h 0000644 0002471 0002471 00000002532 10645251201 020121 0 ustar rgb rgb /*
*========================================================================
* $Id: libwulf_llist.h 76 2004-07-07 01:08:58Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
* (Doubly) Linked list interface. We double link it to make it
* easier to remove an element -- walk until we find it, free the
* data pointer, put its next pointer into the next pointer of its
* previous pointer, and free the element.
*
* We need to define an element in the list
*/
#include
#include
#include
typedef struct ListElement {
void *data; /* Contents of THIS list element */
struct ListElement *prev; /* Pointer to the PREVIOUS list element */
struct ListElement *next; /* Pointer to the NEXT list element */
} ListElement;
/*
* Then we need to define the list itself -- basically a wrapper
* struct that contains pointers to the head and tail of the (doubly
* linked) list.
*/
typedef struct List_ {
int size; /* Number of elements */
struct ListElement *head; /* starting point for a walkthrough */
struct ListElement *tail; /* endpoint of a walkthrough */
} List;
List *newlist();
void add_list(List *list,void *data,int size);
void rm_list(List *list,void *data,int size);
void delete_list(List *list);
./wulfware-2.6.0/include/wulfware/wulfware_version.h 0000644 0002471 0002471 00000000041 10645251201 020640 0 ustar rgb rgb #define WULFWARE_VERSION "2.6.0"
./wulfware-2.6.0/README 0000644 0002471 0002471 00000004112 10645251201 012472 0 ustar rgb rgb ------------------------------------------------------------------------
Wulfware
by
Robert G. Brown
------------------------------------------------------------------------
By FAR the desireable way to install this suite is via RPMs from a
suitable repository via e.g. yum. On a good day you can accomplish this
by any of the following means (you will likely need RPM_TOPDIR to point
to a valid rpm build tree):
rpmbuild --rebuild wulfware-whatever.src.rpm
or just:
autogen.sh
configure --prefix=/usr
make rpm (or just make).
in the toplevel directory of the untarballed source (where you are
reading this file, presumably). Give it a try, what can it hurt? Or
you can unpack it, put the tarball in your SOURCE directory, the
specfile in your SPECS directory and do an
rpmbuild -ba warewulf.spec
where this would let you hack away on the sources first. Note that
make tgz
should in general make you a tarball that can go in SOURCE so that this
works.
------------------------------------------------------------------------
Feel free to write me with bug reports or to ask (within reason) for
features. Please do this via the wulfware mailing list:
https://lists.phy.duke.edu/mailman/listinfo/wulfware
(which is a LOW TRAFFIC mailing list for users/contributors of the
project) although I generally answer personal mail as well at
rgb at phy duke edu (obfuscated).
------------------------------------------------------------------------
The latest version (2.6.0) has support for multicore processors and
reports the number of processor cores/CPU under the "Time" display.
With quad core processors (and 8-16 core systems) around the corner so
to speak, I'll probably have to add back a direct cpu load display, per
core. That would be somewhat useful even on a single box, as most
existing tools won't show per core statistics and a load average of 2
means very different things on a single core or a four core machine...
Report any problems with this, or bug me if you want new changes.
./wulfware-2.6.0/config.sub 0000755 0002471 0002471 00000075777 10645251201 013626 0 ustar rgb rgb #! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
timestamp='2005-07-08'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
# 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Please send patches to . Submit a context
# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS
$0 [OPTION] ALIAS
Canonicalize a configuration name.
Operation modes:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to ."
version="\
GNU config.sub ($timestamp)
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo $1
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
then os=`echo $1 | sed 's/.*-/-/'`
else os=; fi
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray)
os=
basic_machine=$1
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
;;
-windowsnt*)
os=`echo $os | sed -e 's/windowsnt/winnt/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
| ip2k | iq2000 \
| m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64vr | mips64vrel \
| mips64orion | mips64orionel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| ms1 \
| msp430 \
| ns16k | ns32k \
| or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
| sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b \
| strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k)
basic_machine=$basic_machine-unknown
;;
m32c)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | craynv-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
| ip2k-* | iq2000-* \
| m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64vr-* | mips64vrel-* \
| mips64orion-* | mips64orionel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| ms1-* \
| msp430-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \
| xstormy16-* | xtensa-* \
| ymp-* \
| z8k-*)
;;
m32c-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-unknown
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16c)
basic_machine=cr16c-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2* | dpx2*-bull)
basic_machine=m68k-bull
os=-sysv3
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppa-next)
os=-nextstep3
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
i386-vsta | vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
m88k-omron*)
basic_machine=m88k-omron
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
mingw32)
basic_machine=i386-pc
os=-mingw32
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next )
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc) basic_machine=powerpc-unknown
;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh)
basic_machine=sh-hitachi
os=-hms
;;
sh64)
basic_machine=sh64-unknown
;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tic55x | c55x*)
basic_machine=tic55x-unknown
os=-coff
;;
tic6x | c6x*)
basic_machine=tic6x-unknown
os=-coff
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
z8k-*-coff)
basic_machine=z8k-unknown
os=-sim
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp10)
# there are many clones, so DEC is not a safe bet
basic_machine=pdp10-unknown
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x"$os" != x"" ]
then
case $os in
# First match some system type aliases
# that might get confused with valid system types.
# -solaris* is a basic system type, with this one exception.
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-svr4*)
os=-sysv4
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# First accept the basic system types.
# The portable systems comes first.
# Each alternative MUST END IN A *, to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo $os | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-osfrose*)
os=-osfrose
;;
-osf*)
os=-osf
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2 )
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-es1800*)
os=-ose
;;
-xenix)
os=-xenix
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-aros*)
os=-aros
;;
-kaos*)
os=-kaos
;;
-zvmoe)
os=-zvmoe
;;
-none)
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
# This also exists in the configure program, but was not the
# default.
# os=-sunos4
;;
m68*-cisco)
os=-aout
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
*-be)
os=-beos
;;
*-haiku)
os=-haiku
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next )
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-next)
os=-nextstep3
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
exit
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
./wulfware-2.6.0/missing 0000755 0002471 0002471 00000025406 10645251201 013222 0 ustar rgb rgb #! /bin/sh
# Common stub for a few missing GNU programs while installing.
scriptversion=2005-06-08.21
# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005
# Free Software Foundation, Inc.
# Originally by Fran,cois Pinard , 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
# 02110-1301, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
msg="missing on your system"
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
# Exit code 63 means version mismatch. This often happens
# when the user try to use an ancient version of a tool on
# a file that requires a minimum version. In this case we
# we should proceed has if the program had been absent, or
# if --run hadn't been passed.
if test $? = 63; then
run=:
msg="probably too old"
fi
;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]
Send bug reports to ."
exit $?
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing $scriptversion (GNU Automake)"
exit $?
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
esac
# Now exit if we have it, but it failed. Also exit now if we
# don't have it and --version was passed (most likely to detect
# the program).
case "$1" in
lex|yacc)
# Not GNU programs, they don't have --version.
;;
tar)
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
exit 1
fi
;;
*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
# Could not run --version or --help. This is probably someone
# running `$TOOL --version' or `$TOOL --help' to check whether
# $TOOL exists and not knowing $TOOL uses missing.
exit 1
fi
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
aclocal*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
echo 1>&2 "\
WARNING: \`$1' is needed, but is $msg.
You might have modified some files without having the
proper tools for further handling them.
You can get \`$1' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' $msg. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
echo 1>&2 "\
WARNING: \`$1' is $msg. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
# The file to touch is that specified with -o ...
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
# ... or it is the one specified with @setfilename ...
infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile`
# ... or it is derived from the source name (dir/f.texi becomes f.info)
test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
fi
# If the file does not exist, the user really needs makeinfo;
# let's fail without touching anything.
test -f $file || exit 1
touch $file
;;
tar)
shift
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and is $msg.
You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequisites for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-end: "$"
# End:
./wulfware-2.6.0/wulfstat/ 0000755 0002471 0002471 00000000000 10645251201 013465 5 ustar rgb rgb ./wulfware-2.6.0/wulfstat/wulfstat.1 0000644 0002471 0002471 00000026063 10645251201 015427 0 ustar rgb rgb .\" $Id: wulfstat.1 225 2004-05-18 14:16:59Z rgb $
.TH WULFSTAT 1 "Copyright 2000 Robert G. Brown" "WULFSTAT"
.SH NAME
wulfstat \- A simple project template
.SH SYNOPSIS
wulfstat [-h] [-v] [-t display_type] [-d delay] [-c count]
[-f /path/to/wulfhosts] [-l]
.SH WULFSTAT OPTIONS
-h shows help (command synopsis).
-v makes execution verbose for debugging or the bored.
-t display_type selects display type from list below
-d delay (in seconds) selects update loop delay
-c count causes it to output only count times and exit (for debugging)
-f /path/to/wulfhosts to use a particular wulfhosts file
-l show localhost only (use no wulfhosts file from any location)
.SH DESCRIPTION
.B wulfstat
is a simple yet powerful tty (ncurses) based cluster monitoring
tool. It requires xmlsysd (running on each system to be monitored) to
efficiently provide it with system and proc-derived information that is
processed and provided to the user in one of several user-selectable
display formats. With it a user can monitor things across en entire
beowulf, cluster, or workstation LAN systems descriptors such as load
average, memory consumption, swap, page, and interrupt activity and
network loads or can even retrieve and display such mundane information
is CPU make and base clock, system time, uptime or other potentially
useful but slowly varying system descriptors. The information presented
is updated regularly after a user-selectable delay. The tool allows
displays to be selected or changed while the application is running, and
more hosts or nodes can be displayed than will easily fit on a single
e.g. xterm by paging through them with key-based commands.
.SH WULFHOST
To run wulfhost as anything but a monitor of the local host one REQUIRES
a wulfhost file. wulfstat run with no viable wulfhost file defaults to
a localhost connection. A localhost connection can also be forced
(overriding the search for a wulfhost file) with the -l command line
argument.
The wulfhost file tells wulfstat where to to connect to xmlsysd's. It
consists of any mix of the following xml discriptors:
rgb
On_spin3d
ganesh
192.168.1.132
7887
lucifer
192.168.1.131
7887
g%02d
1
15
7887
152.3.182.193
152.3.182.200
7887
From this example, one sees that the tag defines a host to
connect to. Within this tag, the host can be specified by the
tag (which can contain any name resolvable by
gethostbyname()) or the tag, most commonly used for hosts in a
cluster that haven't been named. In addition, for each host one can
specify a if one for any reason is running the xmlsysd on
a different port than its installation default.
This information can easily be overspecified. In most cases, for
example, it is better to just use the default port (7887) and let local
hostname ip address lookup take care of determining the interface IP
number. Note that xml doesn't care how the tags are laid out as long as
they are nested correctly, and that there can be more than one ,
, or tagset in a wulfhosts to specify the
simultaneous monitoring of any mix of hosts, clusters, lans.
Note also that xml DOES preserve whitespace, so
b0
is NOT the same is
b0
and would likely not work correctly. If you do enter port, name, and ip
explicitly and incorrectly or inconsistently, be prepared for odd
behavior.
The is hopefully self explanatory. It can be used to
rapidly define an entire cluster on the basis of a systematic ordering
of hostname. The contents of the tag should be a SIMPLE
printf-format string for a presumed integer that will be iterated from
to in steps of one. In this way a single xml tag can
define an entire cluster e.g. g01-g15.
The is similar, except that it uses ip number directly in
and . Use caution -- in almost all cases the first three
tuples in the ip number should be the SAME in and . This
option is provided in case the hosts don't have a well-defined and
published hostname and are accessible only by e.g. dhcp-assigned ip
number in any event.
All forms of defining a host or list of hosts permit an optional
to be assigned to override xmlsysd's installation default of 7887.
wulfstat will connect to these hosts as fast as it can in a parallel
thread, and then will periodically attempt to REconnect to any hosts
that might be down or that might go down while wulfstat is running.
wulfstat itself is thus moderately robust against cluster node state
changes, although this is an area still being debugged (1/9/03).
wulfstat looks for a useable wulfhosts file in many places (in order):
NO wulfhosts file (localhost only) via the -l flag;
where it is directed by the -f /path/to/wulfhosts command line option;
in ./wulfhosts (in the current working directory);
in $HOME/.wulfhosts (in the home directory, note the ".");
in the file pointed to by environment variable WULFHOSTS;
in /etc/wulfhosts;
and if it can find none of them it tries to come up on localhost.
Note that any hosts that do not resolve are displayed but marked
unknown. Any hosts that resolve but that cannot accept a connection
(which could mean that no daemon is installed or running, the daemon has
more connections than the number permitted in e.g.
/etc/xinetd.d/xmlsysd, or that the host is down) are marked down.
.SH DISPLAY TYPES
The following display types are supported by wulfstat:
0 - load and status only (default), a very useful display for cluster
users
1 - stat -- information and rates primary derived from /proc/stat
2 - memory only (similar to running "free" on each host)
3 - network rates
4 - time displays system clocks, uptime, cpu type and clock
5 - "user" interface for monitoring distributed tasks by username or
taskname (experimental).
Each of these interfaces can also be reached interactively within wulfstat
by typing the first letter as shown on the menu.
.SH INTERACTIVE COMMANDS
wulfstat also permits things like delay, display type and quit to be
selected with single keystrokes when the mouse focus is in the window.
Single-key commands it recognizes include:
q(uit)
+/- increments or decrements the delay clock, zero is the minimum
permitted value and basically spins wulfstat as fast as it can spin,
which is useful for creating a modest "load" on cpu or network so you
can see wulfstat work.
PgUp displays the next page of hosts
PgDn displays the last page of hosts
UpArrow scrolls the display up
DnArrow scrolls the display down
in a circular queue. Using these keys a user can rapidly cycle through
quite large clusters.
l(oad) selects the cpu load display (likely the most useful)
m(emory) selects the memory display
n(etwork) selects the network load display
t(ime) selects the time (and cpu info) display
u(ser) selects the user task interface (experimental).
Finally, if there is enough room (it is recommended that wulfstat be
used with at least 35x80 xterms or larger) a debug window will rarely
display interesting messages. Starting wulfstat with a -v option will
increase the noisiness in this window, but isn't recommended unless you
are debugging the wulfstat source for some reason.
.SH DEBUGGING
To help debug wulfstat (or problems you might have with wulfhosts),
note the table of verbose/debugging values that is printed as part of
its Usage (-h flag). This yields anything from a simple trace of a
particular subsystem such as connect_hosts() to everything the program
does. To limit the output, one can also use the -c count flag to only
display a single cycle. It is a good idea to pipe stderr into a logfile
separately so that the display output is unaltered. The logfile can be
examined later or mailed back to me for analysis.
An example of this might be:
wulfstat -l -c 1 -v 10 2>connect_hosts.log
to trace what wulfstat does connecting to localhost.
.SH SEE ALSO
libwulf(3), wulflogger(1)
.SH PUBLICATION RULES
.B wulfstat
can be modified and used at will by any user, provided that:
a) The original copyright notices are maintained and that the source,
including all modifications, is made publically available at the time of
any derived publication. This is open source software according to the
precepts and spirit of the Gnu Public License. See the accompanying
file COPYING, which also must accompany any redistribution.
b) The author of the code (Robert G. Brown) is appropriately
acknowledged and referenced in any derived use or publication.
c) Full responsibility for the accuracy, suitability, and
effectiveness of the program rests with the users and/or modifiers. As
is clearly stated in the accompanying copyright.h:
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.SH ACKNOWLEDGEMENTS
None to speak of now, but a good place to comply with b) above later, if
you hack this code. Well, I should probably acknowledge the essential
help of Icon (Konstantin Raibetsev) and Seth Vidal, the entire beowulf
list, and various books on xml, network programming (e.g. Stevens) and a
cast of thousands. So let's assume that I just did;-)
.sh COPYRIGHT
GPL 2b; see the file COPYING that accompanies the source of this
program. This is the "standard Gnu General Public License version 2 or
any later version", with the one minor (humorous) "Beverage"
modification listed below. Note that this modification is probably not
legally defensible and can be followed really pretty much according to
the honor rule.
As to my personal preferences in beverages, red wine is great, beer is
delightful, and Coca Cola or coffee or tea or even milk acceptable to
those who for religious or personal reasons wish to avoid stressing my
liver.
.B The "Beverage" Modification to the GPL:
Any satisfied user of this software shall, upon meeting the primary
author(s) of this software for the first time under the appropriate
circumstances, offer to buy him or her or them a beverage. This
beverage may or may not be alcoholic, depending on the personal ethical
and moral views of the offerer. The beverage cost need not exceed one
U.S. dollar (although it certainly may at the whim of the offerer:-) and
may be accepted or declined with no further obligation on the part of
the offerer. It is not necessary to repeat the offer after the first
meeting, but it can't hurt...
./wulfware-2.6.0/wulfstat/Makefile.am 0000644 0002471 0002471 00000011206 10645251201 015521 0 ustar rgb rgb #========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulfstat
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION=@VERSION@
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
# Linker flags
LDFLAGS =
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
./wulfware-2.6.0/wulfstat/Makefile.in 0000644 0002471 0002471 00000031431 10645251201 015534 0 ustar rgb rgb # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = wulfstat
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
CCDEPMODE = @CCDEPMODE@
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
# Linker flags
LDFLAGS =
LIBOBJS = @LIBOBJS@
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
RELEASED = @RELEASED@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION = @VERSION@
WULFWARE_CFLAGS = @WULFWARE_CFLAGS@
WULFWARE_LIBS = @WULFWARE_LIBS@
WULFWARE_LT_VERSION = @WULFWARE_LT_VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
#========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulfstat
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wulfstat/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu wulfstat/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
./wulfware-2.6.0/wulfstat/wulfhosts 0000644 0002471 0002471 00000000256 10645251201 015451 0 ustar rgb rgb
nano15
nano14
nano15
./wulfware-2.6.0/wulfstat/work.c 0000644 0002471 0002471 00000004471 10645251201 014621 0 ustar rgb rgb /*
*========================================================================
* $Id: work.c 225 2004-05-18 14:16:59Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* This is the main loop of the program. We should remain here looping
* until the program is terminated.
*========================================================================
*/
#include "wulfstat.h"
void work()
{
int i,j,k;
char *xpval;
static int cycle=0;
static int cycle_seconds=0,cycle_last=0,cycle_time;
struct timeval sleepytime;
fd_set in;
char keyin;
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_WORK)){
fprintf(OUTFP,"D_WORK: Starting wulfstat_work(). Use -v %d to focus.\n",D_WORK);
sleep(1);
}
/*
* Zero the cycle counter and off to work-loop we go...
*/
cycle_cnt = 0;
/*
* We loop forever, with a variable (user selectable) delay and a keyboard
* escape (where we CAN do e.g. dynamic reconfiguration therein).
*/
while(1){
sleepytime.tv_sec = update_delay;
sleepytime.tv_usec = 0;
FD_ZERO(&in);
FD_SET(0, &in);
if((verbose == D_ALL) || (verbose == D_WORK)){
fprintf(OUTFP,"D_WORK: About to wait for keystroke or %d seconds\n",update_delay);
}
if(select(1, &in, 0, 0, &sleepytime) > 0 && read(0, &keyin, 1) == 1) {
if((verbose == D_ALL) || (verbose == D_WORK)){
fprintf(OUTFP,"D_WORK: Got %c keystroke, calling select_option().\n",keyin);
}
select_option(keyin);
} else {
/*
* Increment cycle counter, but only on a timeout.
*/
cycle_cnt++;
}
/*
* receive the results and put them where they belong.
*/
if((verbose == D_ALL) || (verbose == D_WORK)){
fprintf(OUTFP,"D_WORK:\n");
fprintf(OUTFP,"D_WORK: UPDATING ALL INITIALIZED HOSTS\n");
fprintf(OUTFP,"D_WORK:\n");
}
update_host_values(hostlist);
/*
* display them.
*/
if((verbose == D_ALL) || (verbose == D_WORK)){
fprintf(OUTFP,"D_WORK:\n");
fprintf(OUTFP,"D_WORK: DISPLAYING ALL INITIALIZED HOSTS\n");
fprintf(OUTFP,"D_WORK:\n");
}
display_values(hostlist);
if(count != -1 && cycle_cnt >= count) quit();
}
}
./wulfware-2.6.0/wulfstat/Makefile 0000644 0002471 0002471 00000031414 10645251201 015130 0 ustar rgb rgb # Makefile.in generated by automake 1.9.6 from Makefile.am.
# wulfstat/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/wulfware
pkglibdir = $(libdir)/wulfware
pkgincludedir = $(includedir)/wulfware
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
subdir = wulfstat
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run autoconf
AUTOHEADER = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run autoheader
AUTOMAKE = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run automake-1.9
AWK = gawk
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
CCDEPMODE = depmode=gcc3
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
# Linker flags
LDFLAGS =
LIBOBJS =
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAINT = #
MAINTAINER_MODE_FALSE =
MAINTAINER_MODE_TRUE = #
MAKEINFO = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run makeinfo
OBJEXT = o
PACKAGE = wulfware
PACKAGE_BUGREPORT =
PACKAGE_NAME = wulfware
PACKAGE_STRING = wulfware 2.6.0
PACKAGE_TARNAME = wulfware
PACKAGE_VERSION = 2.6.0
PATH_SEPARATOR = :
RANLIB = ranlib
RELEASE = 0
RELEASED =
SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION = 2.6.0
WULFWARE_CFLAGS = -I${prefix}/include
WULFWARE_LIBS = -L${exec_prefix}/lib -ldieharder
WULFWARE_LT_VERSION = 0:0:0
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/rgb/Src/Projects/wulfware/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
prefix = /usr
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
#========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulfstat
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wulfstat/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu wulfstat/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: # $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
./wulfware-2.6.0/wulfstat/xml_display_values.c 0000644 0002471 0002471 00000010455 10645251201 017542 0 ustar rgb rgb /*
*========================================================================
* $Id: xml_display_values.c 167 2002-11-01 22:15:57Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
/*
*========================================================================
* xml_display routines all work according to the following general
* recipe:
*
* We walk the (linked) list of hosts. For each host we read its xml
* return from the already-completed send_to_all command (if possible)
* and convert it into an xpath context to make extracting data as easy
* as possible. We then walk ITS list of pid's, displaying each value
* as we go.
*
* In this way we don't NEED much extra storage. hostptr->doc "is" the
* actual data structure displayed for everything but rates, and the
* overhead of allocating it and freeing it each pass through is
* inescapable. xpath is actually a redirection structure and we
* could (if we wished) avoid its use altogether and parse the data out
* of the xml doc itself. This also gives us a clear place to focus
* optimization energy -- we "could" make the document walker as close to
* single pass (per host) as possible by doing the entire list of possible
* values to be parsed all at once and using ncurses a bit more.
*
* To develop this as reusably as possible, we're going to split off the
* general formatting of the window from the parse/display part, and
* TRY to work out routines that do "all" the parsing, ncurses locating,
* and printing of a result with a single line of arguments. That way
* building a display should be very easy.
*========================================================================
*/
void xml_display_pids()
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
wprintw(debugpad,"D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
wrefresh(debugpad);
}
mvwprintw(headerwin,0,1,"%-9s|%5s|%7s|%7s|%7s|%5s|%7s|%7s|%5s|%5s|%5s|",
"hostname",
"PID",
"User",
"RSS",
"Size",
"Share",
"Stat",
"%CPU",
"%Mem",
"Time",
"Command"
);
/*
* Loop over all hosts in THIS column. Note that we have to basically
* walk the list of hosts, but we do so inside an i-loop based on
* numhosts. It is therefore important that numhosts be kept accurate.
*/
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
mvwprintw(displaywin,i,0,"%-9.9s|",
hostptr->hostname
);
} else {
mvwprintw(displaywin,i,j,"%-9.9s| Not connected...",
hostptr->hostname);
}
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
./wulfware-2.6.0/wulfstat/startup.c 0000644 0002471 0002471 00000007430 10645251201 015337 0 ustar rgb rgb /*
*========================================================================
* $Id: startup.c 208 2004-02-20 14:55:00Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* wulfstat_startup inherits the parsed command line and the does the
* derived bookkeeping and initialization. In particular it
* a) allocates space for the important vectors and structures ;
* b) opens sockets to the list of hosts in hostfile (if possible);
* c) sends baseline init to all of those xmlsysd's. This needs to
* be done in startup because eventually the init process will be used to
* mask the subset of all fields actually needed to generate the wulfstat
* results (only);
* d) delay one second, and then pass control on to wulfstat_work for
* an infinite loop of updates. The one second will allow reasonably
* accurate rates to be displayed from the beginning.
*========================================================================
*/
#include "wulfstat.h"
void startup()
{
/* loop index */
int i;
/* length of io buffer in use */
int buflen,readcnt;
/* pointer to return from xmltract */
char *xpval;
/*
* This sets up ncurses, but unless I implement debugging output going
* into a log file instead of stdout (a moderately massive rewrite)
* we can only use ncurses if not verbose. ncurses is pretty much
* all or nothing and doesn't "like" freeform error messages.
*/
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"D_STARTUP: Setting up curses screen. Use -v %d to focus.\n",D_STARTUP);
}
start_screen();
if((verbose == D_ALL) || (verbose == D_STARTUP)){
wprintw(debugpad,"D_STARTUP: Starting startup(). Use -v %d to focus.\n",D_STARTUP);
wrefresh(debugpad);
}
/*
* Allocate space for fields[][] (for parser). This is needed for
* sending commands to daemon. Note that for many purposes we prefer
* to use our own general purpose parser rather than deal with fscanf()
* and having to match types and whitespace and odd separators.
command = (char *) malloc((size_t) (K*sizeof(char)));
fields = (char **) malloc((size_t) (MAXFIELDNUMBER*sizeof(char*)));
for(i = 0;i < MAXFIELDNUMBER;i++) {
fields[i] = (char *) malloc((size_t)(K*sizeof(char)));
}
*/
/*
* XML setup.
* I like keeping blanks in the XML that is parsed and printed if I'm
* going to read it. One has to initialize the xpath parser as
* well.
*/
LIBXML_TEST_VERSION
xmlKeepBlanksDefault(0);
xmlXPathInit();
allocate_hostlists();
/*
* Read in the xml wulfhost file.
*/
if((verbose == D_ALL) || (verbose == D_STARTUP)){
wprintw(debugpad,"D_STARTUP: Read the hostfile.");
wrefresh(debugpad);
}
numhosts = read_wulfhosts(hostfile);
/*
* We have to set the DEFAULT state here so that init_host_values()
* call below can Do The Right Thing.
*/
set_display_dctl_state(hostlist);
/*
* This can't be done until numhosts is defined
*/
start_displaypad();
/*
* Establish a connection to all hosts (if possible). The threaded
* connection loop resets the daemon and initializes all host values
* according to the current dctl state.
*/
if((verbose == D_ALL) || (verbose == D_STARTUP)){
wprintw(debugpad,"D_STARTUP: Connect to the hosts in hostlist = %0x.\n",hostlist);
wprintw(debugpad,"D_STARTUP: hostlist->head = %0x\n",hostlist->head);
wrefresh(debugpad);
}
connectlist.hostlist = hostlist;
connectlist.connect_delay = connect_delay;
pthread_create(&connecttid,NULL,(void*)connect_to_all_hosts,&connectlist);
if((verbose == D_ALL) || (verbose == D_STARTUP)){
wprintw(debugpad,"D_STARTUP: All done with startup().\n");
wrefresh(debugpad);
}
}
./wulfware-2.6.0/wulfstat/show_status.c 0000644 0002471 0002471 00000001534 10645251201 016217 0 ustar rgb rgb /*
*========================================================================
* $Id: show_status.c 210 2004-02-21 18:08:04Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
/*
*==================================================================
* show_status() writes a short dump of system configuration
* parameters to debugpad.
*==================================================================
*/
void show_status()
{
wprintw(debugpad,"numhosts = %d\n",numhosts);
/*
wprintw(debugpad,"lh = %d ld = %d lf = %d lm = %d ldbg = %d\n",
display.lines_headerwin,
display.lines_displaywin,
display.lines_footerwin,
display.lines_menuwin,
display.lines_debugwin);
*/
wrefresh(debugpad);
}
./wulfware-2.6.0/wulfstat/wulfhosts.example 0000644 0002471 0002471 00000001343 10645251201 017101 0 ustar rgb rgb
ganesh
On_spin3d
taskman.pl
rgb
bass
g%02d
1
15
7887
c%02d
14
15
7887
p%02d
0
3
152.3.182.193
152.3.182.200
7887
152.3.182.202
152.3.182.212
7887
./wulfware-2.6.0/wulfstat/display_values.c 0000644 0002471 0002471 00000061026 10645251201 016662 0 ustar rgb rgb /*
*========================================================================
* $Id: display_values.c 239 2004-09-21 23:05:01Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
/*
* This routine switches between all the different kinds of displays
* we recognize and walks the linked list of hosts, displaying its
* (relevant) contents.
*/
void display_values(List *hostlist)
{
char displaytype[64];
/*
* If verbose is on, we don't do a "real" display at all, regardless
* of how it is set.
*/
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_values(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
switch(display.type) {
case DISPLAY_BASIC:
display_basic(hostlist);
display_messages();
break;
case DISPLAY_NET:
display_net(hostlist);
display_messages();
break;
case DISPLAY_TIMES:
display_times(hostlist);
display_messages();
break;
case DISPLAY_PIDS:
display_pids(hostlist);
/* xml_display_pids(); */
display_messages();
break;
case DISPLAY_PIDS_CMDLINE:
display_pids_cmdline(hostlist);
/* xml_display_pids(); */
display_messages();
break;
case DISPLAY_MEMORY:
display_memory(hostlist);
display_messages();
break;
case DISPLAY_LOAD:
default:
display_load(hostlist);
display_messages();
break;
}
}
/*
*========================================================================
* display_messages()
*
* This routine manages the messages at the bottom of the screen. We
* should probably allow this to be dynamically surpressed so it goes
* from five lines to just 1-2, where a key toggles messages on and off.
*========================================================================
*/
void display_messages()
{
mvwprintw(menuwin,1,1,"Monitoring %d hosts every %d seconds, display count = %-6d ",numhosts,update_delay,cycle_cnt);
mvwprintw(menuwin,2,1," Menu: | scroll: up/down arrows page: Page Up/Page Down");
mvwprintw(menuwin,3,1," Menu: | q(uit) -/+(change update delay)");
switch(display.type) {
case DISPLAY_NET:
mvwprintw(menuwin,1,58,"%+18s ","display: net");
break;
case DISPLAY_TIMES:
mvwprintw(menuwin,1,58,"%+18s ","display: time");
break;
case DISPLAY_MEMORY:
mvwprintw(menuwin,1,58,"%+18s ","display: memory");
break;
case DISPLAY_PIDS:
mvwprintw(menuwin,1,58,"%+18s ","display: pids ");
break;
case DISPLAY_PIDS_CMDLINE:
mvwprintw(menuwin,1,58,"%+18s ","display: cmdline ");
break;
case DISPLAY_BASIC:
mvwprintw(menuwin,1,58,"%+18s ","display: basic ");
break;
default:
case DISPLAY_LOAD:
mvwprintw(menuwin,1,58,"%+18s","display: load");
break;
}
mvwprintw(menuwin,4,1," Display: | c(mdline) l(oad) m(emory) n(et) t(imes) p(ids) b(asic)");
wrefresh(menuwin);
}
/*
*========================================================================
* display_load()
*
* This is a new, improved host/load display. It works with features
* in ncurses that permit a scrollable virtual viewport to be created,
* which eliminates the relatively ugly two column display and makes the
* display itself much prettier/gui-like.
*
* As before, this display will be the template for other displays.
*========================================================================
*/
void display_load(List *hostlist)
{
/* Loop indices */
int i,j,k;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_load. Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
mvwprintw(headerwin,0,1,"%-10.10s|%4s|%7s|%7s|%7s|",
" name",
"stat",
" Load 1",
" Load 5",
"Load 15"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
werase(displaypad);
display.bottomline_displayed = 0; /* count the lines */
for(i=0;idata;
if(hostptr->connected) {
mvwprintw(displaypad,i,0,"%-10.10s|%4s|%6.2f |%6.2f |%6.2f |",
hostptr->hostname,
" up ",
hostptr->val.load1,
hostptr->val.load5,
hostptr->val.load15);
} else {
mvwprintw(displaypad,i,0,"%-10.10s|%4s|%4s |%4s |%4s |",
hostptr->hostname,
"down",
" -",
" -",
" -");
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
void display_basic(List *hostlist)
{
/* Loop indices */
int i,j,k;
unsigned int mem_used,mem_free;
char scaleout[4][32];
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_basic. Use -v %d to focus.\n",D_DISPLAY_VALUES);
fprintf(OUTFP,"D_DISPLAY_VALUES: Displaying %d hosts.\n",numhosts);
}
mvwprintw(headerwin,0,1,"%-10.10s|%2s|%11s|%7s|%7s|%7s|%7s|%4s|%4s|%7s",
" name",
"st",
"Load 1,5,15",
"rx byts",
"tx byts",
" si/so ",
" pi/po ",
"ctxt",
"intr",
"run/blk"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
werase(displaypad);
display.bottomline_displayed = 0; /* count the lines */
for(i=0;idata;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Displaying row for host %s, connected = %d\n",hostptr->hostname,hostptr->connected);
}
if(hostptr->connected == 2) {
mvwprintw(displaypad,i,0,"%-10.10s|%2s|%3.1f,%3.1f,%3.1f|%6.0f |%6.0f |%3.0f/%-3.0f|%3.0f/%-3.0f|%4.0f|%4.0f|%3d/%d",
hostptr->hostname,
"up",
hostptr->val.load1,
hostptr->val.load5,
hostptr->val.load15,
hostptr->val.interface[-1].rx_bytes_rate,
hostptr->val.interface[-1].tx_bytes_rate,
hostptr->val.swap_in_rate,
hostptr->val.swap_out_rate,
hostptr->val.page_in_rate,
hostptr->val.page_out_rate,
hostptr->val.ctxt_rate,
hostptr->val.intr_rate,
hostptr->val.procs_running,
hostptr->val.procs_blocked
);
} else {
mvwprintw(displaypad,i,0,"%-10.10s|%2s|%7s |%4s |%4s |%5s |%5s |%3s |%3s |%7s",
hostptr->hostname,
"dn",
" -",
" -",
" -",
" -",
" -",
" -",
" -",
" -",
" -",
"-/-"
);
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_memory()
*
* This routine displays memory statistics (from meminfo) and related
* values for each host.
*========================================================================
*/
void display_memory(List *hostlist)
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_memory(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
mvwprintw(headerwin,0,0,"%-9s|%5s|%7s|%7s|%7s|%5s|%7s|%7s|%5s|%5s|%5s|",
" name",
"m-tot",
"m-used",
"m-free",
"m-free*",
"s-tot",
"s-used",
"s-free",
"m-shr",
"m-buf",
"m-cch"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
display.bottomline_displayed = 0; /* count the lines */
werase(displaypad);
for(i=0;idata;
if(hostptr->connected) {
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
sprintf(row_out[1],"%7.7s",scale_k(hostptr->val.mem_used,7,0));
sprintf(row_out[2],"%7.7s",scale_k(hostptr->val.mem_free,7,0));
sprintf(row_out[3],"%7.7s",scale_k(hostptr->val.mem_free + hostptr->val.mem_buffers + hostptr->val.mem_cached,7,0));
sprintf(row_out[4],"%5.5s",scale_k(hostptr->val.swap_total,5,0));
sprintf(row_out[5],"%7.7s",scale_k(hostptr->val.swap_used,7,0));
sprintf(row_out[6],"%7.7s",scale_k(hostptr->val.swap_free,7,0));
sprintf(row_out[7],"%5.5s",scale_k(hostptr->val.mem_shared,5,0));
sprintf(row_out[8],"%5.5s",scale_k(hostptr->val.mem_buffers,5,0));
sprintf(row_out[9],"%5.5s",scale_k(hostptr->val.mem_cached,5,0));
mvwprintw(displaypad,i,0,"%-8.8s|%5.5s|%7.7s|%7.7s|%7.7s|%5.5s|%7.7s|%7.7s|%5.5s|%5.5s|%5.5s",
hostptr->hostname,
row_out[0],
row_out[1],
row_out[2],
row_out[3],
row_out[4],
row_out[5],
row_out[6],
row_out[7],
row_out[8],
row_out[9]
);
} else {
mvwprintw(displaypad,i,0,"%-8.8s| Not connected...",
hostptr->hostname);
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_pids()
*
* This defines the task/user interface and display. The interface part
* of this is a bit more complex than the passive displays as one has to
* be able to add tasknames or usernames to a list to be monitored. We'll
* probably need to put an e(dit) command to kick one into an interface
* where one can add or remove usernames and tasknames (and which displays
* the ones already there).
*
* Of course, we START with pretty much nothing at all.
*========================================================================
*/
void display_pids(List *hostlist)
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
Pid *pidptr;
ListElement *element,*pidelement;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
mvwprintw(headerwin,0,1,"%-9s|%5s|%4s|%8s|%7s|%7s|%8s|%-s",
" name",
"PID ",
"Nice",
"User ",
"Vsize",
"RSS ",
"Time",
" Command"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
/*
* Loop over all hosts and pop them on the pad
*/
element = hostlist->head;
werase(displaypad);
display.bottomline_displayed = 0; /* count the lines */
j = 0;
for(i=0;idata;
if(hostptr->connected) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
if(hostptr->pidlist->size == 0){
mvwprintw(displaypad,j,0,"%-9.9s|%5s| %2s |%8s|%7s|%7s|%8s|%-s",
hostptr->hostname,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
} else {
pidelement = hostptr->pidlist->head;
while(pidelement != NULL){
pidptr = pidelement->data;
/*
* Never display xmlsysd itself. I know, one "should", but
* we won't.
*/
if(strncmp(pidptr->taskname,"xmlsysd",7) == 0) {
if(hostptr->pidlist->size == 1) {
mvwprintw(displaypad,j,0,"%-9.9s|%5s| %2s |%8s|%7s|%7s|%8s|%-s",
hostptr->hostname,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
}
} else {
mvwprintw(displaypad,j,0,"%-9.9s|%5d| %2d |%8s|%7s|%7s|%8s|%-s",
hostptr->hostname,
pidptr->pid,
pidptr->nice,
pidptr->user,
pidptr->vsize,
pidptr->rss,
pidptr->time,
pidptr->taskname
);
j++;
}
pidelement = pidelement->next;
}
}
} else {
mvwprintw(displaypad,j,0,"%-9.9s|%5s| %2s |%8s|%7s|%7s|%8s|%-s",
hostptr->hostname,
" -",
"-",
" -",
" -",
" -",
" -",
"Not connected..."
);
j++;
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_pids_cmdline()
*
* This defines the task/user interface and display. It is "like"
* display_pids(), but shows the whole command line of each running
* command. This is very useful if you are tracking a set of distributed
* jobs.
*========================================================================
*/
void display_pids_cmdline(List *hostlist)
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0,colsleft;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
Pid *pidptr;
ListElement *element,*pidelement;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
mvwprintw(headerwin,0,1,"%-9s|%6s|%6s|%6s|%6s|%-s",
" name",
"User ",
"Vsize",
"RSS ",
"Time",
"Cmdline"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
/*
* Loop over all hosts and pop them on the pad
*/
element = hostlist->head;
werase(displaypad);
display.bottomline_displayed = 0; /* count the lines */
j = 0;
for(i=0;idata;
if(hostptr->connected) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
if(hostptr->pidlist->size == 0){
mvwprintw(displaypad,j,0,"%-9.9s|%6s|%6s|%6s|%6s|%-s",
hostptr->hostname,
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
} else {
pidelement = hostptr->pidlist->head;
while(pidelement != NULL){
pidptr = pidelement->data;
/*
* Never display xmlsysd itself. I know, one "should", but
* we won't.
*/
if(strncmp(pidptr->taskname,"xmlsysd",7) == 0) {
if(hostptr->pidlist->size == 1) {
mvwprintw(displaypad,j,0,"%-9.9s|%6s|%6s|%6s|%6s|%-s",
hostptr->hostname,
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
}
} else {
if(strlen(pidptr->cmdline) == 0){
mvwprintw(displaypad,j,0,"%-9.9s|%6s|%6s|%6s|%6s|%-s (cmdline N/A)",
hostptr->hostname,
pidptr->user,
pidptr->vsize,
pidptr->rss,
pidptr->time,
pidptr->taskname
);
} else {
colsleft = display.cols_displaywin - 38;
if(strlen(pidptr->cmdline) > colsleft && colsleft < K){
pidptr->cmdline[colsleft] = (char)NULL;
}
mvwprintw(displaypad,j,0,"%-9.9s|%6s|%6s|%6s|%6s|%-s",
hostptr->hostname,
pidptr->user,
pidptr->vsize,
pidptr->rss,
pidptr->time,
pidptr->cmdline
);
}
j++;
}
pidelement = pidelement->next;
}
}
} else {
mvwprintw(displaypad,j,0,"%-9.9s|%6s|%6s|%6s|%6s|%-s",
hostptr->hostname,
" -",
" -",
" -",
" -",
"Not connected..."
);
j++;
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_net()
*
* This routine displays hostname and status and key network interface
* rates for all eth interfaces found on the host. For the moment we'll
* skip the loopback interface. We'll just have to see if 40 or 80 char
* columns work better for this. We may ALSO present data on e.g.
* number of sockets open and so forth.
*========================================================================
*/
void display_net(List *hostlist)
{
/* Loop indices */
int i,j,k;
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_net(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
sprintf(display_msg,"");
mvwprintw(headerwin,0,0,"%-9.9s|%-15s|%4s|%6s|%6s|%6s|%6s|%6s|%6s|%6s",
" name",
" ip",
"dev#",
"rx_bts",
"rx_pks",
"rx_ers",
"tx_bts",
"tx_pks",
"tx_ers",
"tcp_sk"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
k = 0;
element = hostlist->head;
werase(displaypad);
display.bottomline_displayed = 0; /* count the lines */
for(i=0;idata;
if(hostptr->connected) {
for(j = 0;j < hostptr->val.num_interfaces;j++){
/* For the moment, only eth displays... */
if( strncmp("eth",hostptr->val.interface[j].devtype,3) == 0 )
mvwprintw(displaypad,k++,0,"%-8.8s|%15s|%3s%1s|%6.0f|%6.0f|%6.0f|%6.0f|%6.0f|%6.0f| %2ld ",
hostptr->hostname,
hostptr->val.interface[j].ip,
hostptr->val.interface[j].devtype,
hostptr->val.interface[j].devid,
hostptr->val.interface[j].rx_bytes_rate,
hostptr->val.interface[j].rx_packets_rate,
hostptr->val.interface[j].rx_errs_rate,
hostptr->val.interface[j].tx_bytes_rate,
hostptr->val.interface[j].tx_packets_rate,
hostptr->val.interface[j].tx_errs_rate,
hostptr->val.tcp_inuse);
}
} else {
mvwprintw(displaypad,k++,0,"%-8.8s|%15s|%s",
hostptr->hostname,
hostptr->hostip,
"Not connected");
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_times()
*
* This routine displays time, uptime, and some static system stats.
* Most of this is slowly varying and will only be useful for a glance.
*========================================================================
*/
void display_times(List *hostlist)
{
/* Loop indices */
int i,j,k;
/*
* Display controls, both local and semi-global.
* minimum number of lines needed to run an xterm display with ONE host
*/
int minlines;
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting D_DISPLAY_VALUES. Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
mvwprintw(headerwin,0,0,"%-8s| %15.15s |%3s|%4s|%4s|%7s | %7s |%5s",
" name",
"CPU Model Name",
"Crs",
"ClkM",
"CchK",
"Time",
"Uptime",
"Duty%"
);
wclrtoeol(headerwin);
wrefresh(headerwin);
element = hostlist->head;
display.bottomline_displayed = 0; /* count the lines */
werase(displaypad);
for(i=0;idata;
if(hostptr->connected) {
mvwprintw(displaypad,i,0,"%-7.7s|%-22.22s|%2d |%4.f|%4d|%11s|%16s|%3.f",
hostptr->hostname,
hostptr->val.cpuinfo_model_name,
hostptr->val.cpuinfo_cores,
hostptr->val.cpuinfo_clock,
hostptr->val.cpuinfo_cachesize,
hostptr->val.time,
hostptr->val.uptime,
hostptr->val.duty_cycle
);
} else {
mvwprintw(displaypad,i,0,"%-7.7s|%22.22s|%2s |%4s|%4s|%11s|%16s|%3s",
hostptr->hostname,
"",
"",
"",
"",
"",
"down ",
"");
}
display.bottomline_displayed++; /* count the lines */
element = element->next;
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
*========================================================================
* display_config()
*
* This routine manages the interactive interface, where users can
* manage things like the wulfhost list, the users whose tasks are to
* be monitored, the tasklist to be monitored, and as the interface
* evolves, probably things like alarms.
*========================================================================
*/
void display_config(List *hostlist)
{
}
./wulfware-2.6.0/wulfstat/quit.c 0000644 0002471 0002471 00000001126 10645251201 014613 0 ustar rgb rgb /*
*========================================================================
* $Id: quit.c 208 2004-02-20 14:55:00Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
void quit()
{
Host *hostptr;
ListElement *element;
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
if(hostptr->client_fd && hostptr->connected){
close(hostptr->client_fd);
}
element = element->next;
}
/* Shut down curses! */
endwin();
exit(0);
}
./wulfware-2.6.0/wulfstat/select_option.c 0000644 0002471 0002471 00000010112 10645251201 016473 0 ustar rgb rgb /*
*========================================================================
* $Id: select_option.c 231 2004-07-07 01:08:54Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* This routine is a callback for select on keyboard (stdin) I/O.
* We eventually need to document these controls in the man page.
* In the meantime I know the controls (I wrote them:-) and they
* are documented in comments below.
*
* The display type is going to be tricky. We really want something
* like "t" plus a digit from a menu that "pops up" in the messages,
* while the cycle is suspended. What we'll probably do first is just
* give different options their own letter until this gets boring.
*========================================================================
*/
#include "wulfstat.h"
void select_option(char c)
{
/*
* We sometimes have to count characters to decide if a special key
* was struck. This is our counter. We have to reset it to zero when
* we process the actual special character.
*/
static int escape = 0;
if((verbose == D_ALL) || (verbose == D_SELECT_OPTION)){
fprintf(OUTFP,"D_SELECT_OPTION: Starting D_SELECT_OPTION. Use -v %d to focus.\n",D_SELECT_OPTION);
fprintf(OUTFP,"D_SELECT_OPTION: Key %d (ascii) or %c (character) pressed.\n",c,c);
}
wclear(debugpad);
switch(c){
/*
* escape precedes all special keyboard characters, e.g. pgup, pgdn.
* We toggle it each time it is struck, which can produce odd
* odd results if it is struck directly.
*/
case 27:
if(escape){
escape = 0;
} else {
escape = 1;
}
break;
case 'O':
/*
* This is the second character of up, down, left, right arrows.
*/
if(escape == 1){
escape = 2;
}
break;
case '[':
/*
* This is the second character of pageup, pagedown
*/
if(escape == 1){
escape = 2;
}
break;
case 'A':
/*
* This is up arrow
*/
if(escape == 2){
scroll_displaypad(-1);
escape = 0;
}
break;
case '5':
/*
* This is Page down
*/
if(escape == 2){
scroll_displaypad(-display.lines_displaypad+2);
escape = 0;
}
break;
case '6':
/*
* This is Page up
*/
if(escape == 2){
scroll_displaypad(display.lines_displaypad-2);
escape = 0;
}
break;
/* q(uit), obviously */
case 'q':
case 'Q':
escape = 0;
quit();
break;
/* We accept f(orward) or n(ext) */
/* and b(ackward) or p(revious) */
case 'B':
/*
* This is down arrow
*/
if(escape == 2){
scroll_displaypad(1);
escape = 0;
}
break;
/*
* +/- step the cycle delay up and down, in seconds. Can't be less
* 0, though.
*/
case '+':
update_delay++;
break;
case '-':
update_delay--;
if(update_delay < 0) update_delay = 0;
break;
case 'b':
display.type = DISPLAY_BASIC;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 'c':
display.type = DISPLAY_PIDS_CMDLINE;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 'l':
display.type = DISPLAY_LOAD;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 'm':
display.type = DISPLAY_MEMORY;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 'n':
display.type = DISPLAY_NET;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 'p':
display.type = DISPLAY_PIDS;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
case 's':
show_status();
break;
case 't':
display.type = DISPLAY_TIMES;
set_display_dctl_state(hostlist);
init_host_values(hostlist);
break;
default:
break;
}
}
./wulfware-2.6.0/wulfstat/set_display_dctl_state.c 0000644 0002471 0002471 00000022154 10645251201 020363 0 ustar rgb rgb /*
*========================================================================
* $Id: set_display_dctl_state.c 231 2004-07-07 01:08:54Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* Set all the dctl state features according to a display type switch.
*========================================================================
*/
#include "wulfstat.h"
void set_display_dctl_state(List *hostlist)
{
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
fprintf(OUTFP,"D_DISPLAY_VALUES: Starting display_values(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
switch(display.type) {
case DISPLAY_LOAD:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_LOAD: display_type = %d\n",DISPLAY_LOAD);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 1;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_NET:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_NET: display_type = %d\n",DISPLAY_NET);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 1;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_TIMES:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_TIMES: display_type = %d\n",DISPLAY_TIMES);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 1;
hostptr->dctl.users = 1;
hostptr->dctl.cpuinfo = 1;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 1;
hostptr->dctl.version = 1;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_PIDS:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_PIDS: display_type = %d\n",DISPLAY_PIDS);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 1;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_PIDS_CMDLINE:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_PIDS: display_type = %d\n",DISPLAY_PIDS);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 1;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 1;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_MEMORY:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_MEMORY: display_type = %d\n",DISPLAY_MEMORY);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 1;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_BASIC:
default:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
fprintf(OUTFP,"DISPLAY_BASIC: display_type = %d\n",DISPLAY_BASIC);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 1;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 1;
hostptr->dctl.stat = 1;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
}
}
void dump_dctl_state(Host *hostptr)
{
fprintf(OUTFP,"==================================\n");
fprintf(OUTFP,"DCTL STATE DUMP for host %s:\n",hostptr->hostname);
fprintf(OUTFP,"DISPLAY_BASIC: compress = %d\n",hostptr->dctl.compress);
fprintf(OUTFP,"DISPLAY_BASIC: whitespace = %d\n",hostptr->dctl.whitespace);
fprintf(OUTFP,"DISPLAY_BASIC: identity = %d\n",hostptr->dctl.identity);
fprintf(OUTFP,"DISPLAY_BASIC: time = %d\n",hostptr->dctl.time);
fprintf(OUTFP,"DISPLAY_BASIC: users = %d\n",hostptr->dctl.users);
fprintf(OUTFP,"DISPLAY_BASIC: cpuinfo = %d\n",hostptr->dctl.cpuinfo);
fprintf(OUTFP,"DISPLAY_BASIC: loadavg = %d\n",hostptr->dctl.loadavg);
fprintf(OUTFP,"DISPLAY_BASIC: meminfo = %d\n",hostptr->dctl.meminfo);
fprintf(OUTFP,"DISPLAY_BASIC: net = %d\n",hostptr->dctl.net);
fprintf(OUTFP,"DISPLAY_BASIC: stat = %d\n",hostptr->dctl.stat);
fprintf(OUTFP,"DISPLAY_BASIC: sysvipc = %d\n",hostptr->dctl.sysvipc);
fprintf(OUTFP,"DISPLAY_BASIC: uptime = %d\n",hostptr->dctl.uptime);
fprintf(OUTFP,"DISPLAY_BASIC: version = %d\n",hostptr->dctl.version);
fprintf(OUTFP,"DISPLAY_BASIC: pids = %d\n",hostptr->dctl.pids);
fprintf(OUTFP,"DISPLAY_BASIC: pidstats = %d\n",hostptr->dctl.pidstats);
fprintf(OUTFP,"DISPLAY_BASIC: cmdline = %d\n",hostptr->dctl.cmdline);
fprintf(OUTFP,"DISPLAY_BASIC: running = %d\n",hostptr->dctl.running);
fprintf(OUTFP,"DISPLAY_BASIC: root = %d\n",hostptr->dctl.root);
fprintf(OUTFP,"==================================\n");
}
./wulfware-2.6.0/wulfstat/wulfstat.h 0000644 0002471 0002471 00000021615 10645251201 015514 0 ustar rgb rgb /*
*========================================================================
* $Id: wulfstat.h 244 2004-09-30 17:59:32Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "copyright.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* Sets WULFWARE_VERSION */
#include
/*
* This ensures that wulfstat can execute all the commands recognized
* by xmlsysd, no more and no less. With a fair bit of work, of course...;-)
*/
#include
/*
* This is all structs and enums needed to extract and store the values
* on a per-host basis for further processing and display.
*/
#include
/*
* These are structs used to xml-parse wulfhosts
*/
#include
/*
* The primary host structs. Must be included after wulfhosts.h
* xml stuff.
*/
#include
/*
* Subroutine Prototypes
*/
#include
/* libxml includes */
/*
* COMPAT using xml-config --cflags to get the include path this will
* work with both
*/
#include
#include
#include
/*
*========================================================================
* Useful defines
*========================================================================
*/
#define STDIN stdin
#define STDOUT stdout
#define STDERR stderr
#define OUTFP stderr
#define YES 1
#define NO 0
#define PI 3.141592653589793238462643
#define K 1024
#define K4 4096
#define K64 65536
/*
*========================================================================
* Debug enum -- one per separate component, no particular order
*========================================================================
*/
typedef enum {
D_QUIET,
D_ALL,
D_MAIN,
D_UTIL,
D_PARSECL,
D_STARTUP,
D_WORK,
D_PARSE,
D_CONNECT,
D_INIT_HOST,
D_CONNECT_HOSTS,
D_READHOST,
D_SENDCMD,
D_SELECT_OPTION,
D_EXTRACT_VALUES,
D_INIT_VALUES,
D_UPDATE_VALUES,
D_VALUES,
D_DISPLAY_VALUES,
D_DISPLAY_DEBUG,
D_SCREEN,
D_XMLSYSD,
D_QUIT,
N_DEBUG
} Debug;
/*
*========================================================================
* Subroutine Prototypes
*========================================================================
*/
/* from parsecl.c */
void parsecl(int argc, char **argv);
void Usage();
void Usagemap();
/* from startup.c */
void startup();
/* from screen.c */
void start_screen();
void start_displaypad();
void stop_screen();
void scroll_displaypad(int scroll_lines);
/* from work.c */
void work();
/* from select_option.c */
void select_option(char c);
/* quit.c */
void quit();
/* from show_status.c */
void show_status();
/* from set_display_dctl_state.c */
void set_display_dctl_state(List *hostlist);
void dump_dctl_state(Host *hostptr);
/* from display_values.c */
void display_basic(List *hostlist);
void display_net(List *hostlist);
void display_times(List *hostlist);
void display_pids(List *hostlist);
void display_pids_cmdline(List *hostlist);
void display_memory(List *hostlist);
void display_load(List *hostlist);
void display_messages();
/* Probable cruft */
void display_values(List *hostlist);
void display_stat(List *hostlist);
void display_user(List *hostlist);
void display_config(List *hostlist);
/*
*========================================================================
* Global Variables and relevant #defines
*
* Set the default values and override from the command line in parsecl().
*========================================================================
*/
/*
* verbose is also a debug switch. One can switch on the debugging
* of many components of the program with different values. However
* one has to read the source to know what turns on what.
*/
int verbose;
int udelay; /* debug message delay */
/* Default xmlsysd port */
#define XMLSYSD_PORT 7887
/* A few general purpose 64K i/o buffers */
char inbuf[K64];
char outbuf[K64];
char msgbuf[K64]; /* used in recv_xmlDoc() */
/* command buffer, parse buffer, space for hostfile path */
#define MAXFIELDNUMBER 12
char *command;
char **fields;
char hostfile[K];
char display_msg[K]; /* a global buffer to display errors or messages in */
char inchar; /* single character buffer for getch() commands */
int update_delay; /* how long to wait between updates */
int connect_delay; /* how long to wait between reconnection loops */
unsigned long long int count; /* Maximum number of cycles */
unsigned long long int cycle_cnt; /* cycle counter */
Connectlist connectlist; /* Argument struct for threaded connect_to_hosts() */
/* pthread tid's */
pthread_t connecttid;
int numhosts;
/*
* ncurses windows. Scrollable ones need both window (for borders)
* and pad. ncurses can't seem to write to the LINES,COLS character
* without triggering a "7" from xterm for writing past EOL.
*/
WINDOW *headerwin,*menuwin,*footerwin;
/* scrollable frame/window combos */
WINDOW *displaywin,*displaypad;
WINDOW *debugwin,*debugpad;
/*
* In order to be able to deal with variable numbers of hosts (add
* and delete hosts, for example) we MUST make host into a linked list
* so that we can freely add hosts or delete hosts. The one thing
* about this that is "bad" is that we'll have to signficantly change
* the way we loop over the hostlist -- we have to walk the list
* until we reach the end instead of advance an index.
*
* We'll try doing this in parallel rather than hacking out the one
* and replacing it all at once.
*/
List *hostlist;
List *hosttaglist;
List *hostrangelist;
List *iprangelist;
/*
* We'll also want a couple of linked lists for users and tasks to be
* monitored. We will be loading all of this up in read_wulfhosts()
* for the moment, and working with them in the interactive interface
* later.
*/
List *userlist;
List *tasklist;
/*
* This determines whether or not to display running root processes,
* default no.
*/
int root_flag;
/*
* The following variables control the state of the display according
* to what keys are pressed.
*
* Most of these are more or less fixed by the display layout, which must
* have at least 80 columns The exception is the "display" window, which
* will always have the largest possible VIEWPORT and which will always be
* a scrollable virtual (pad) window behind it.
*
* A lot of the old members are going to go away. What we are going to
* need with the new way of doing things is:
* a) type,
* b) lines_headerwin, lines_displaywin, lines_displaypad,
* lines_menuwin, lines_footerwin, lines_debugwin, lines_debugpad.
* c) topline_displaypad, bottomline_displaypad, showline_displaypad,
* topline_debugpad, bottomline_debugpad, showline_debugpad
*/
typedef struct {
int type; /* controls the KIND of wulfstat display */
int current_corner_line; /* cycles forward or backward in a quasi-ring */
int lines_headerwin;
int lines_displaywin;
int cols_displaywin;
int lines_displaypad;
int lines_menuwin;
int lines_footerwin;
int lines_debugwin;
int lines_debugpad;
int line_displaypad;
int topline_displaypad;
int bottomline_displaypad;
int bottomline_displayed; /* This counts number of nonblank lines */
int showline_displaypad;
int topline_debugpad;
int bottomline_debugpad;
int showline_debugpad;
int lines_per_host;
} Display;
/* We should need just one for our single xterm */
Display display;
/*
* This list of types will eventually allow users to select from
* several predefined and simple displays. Most of the time they
* will likely choose only load or wulfstat, but if we make the display
* width depend on what is being shown, a load display might be only
* 30 characters wide, so that a row of xterm windows, each with a list
* of perhaps 50 hosts, could conceivably allow hundreds of hosts to be
* monitored on single X window.
*/
typedef enum {
DISPLAY_BASIC, /* show basic stats */
DISPLAY_LOAD, /* show load average only */
DISPLAY_MEMORY, /* show memory only */
DISPLAY_NET, /* show network loads only */
DISPLAY_TIMES, /* show uptime and current time */
DISPLAY_PIDS, /* show pids */
DISPLAY_PIDS_CMDLINE, /* show pids with cmdline */
/* The following aren't implemented */
DISPLAY_STAT, /* show stat-derived rates (mostly) */
N_DISPLAYTYPES
} Displaytypes;
./wulfware-2.6.0/wulfstat/parsecl.c 0000644 0002471 0002471 00000015731 10645251201 015271 0 ustar rgb rgb /*
*========================================================================
* $Id: parsecl.c 248 2004-12-02 15:57:19Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
/*
* This routine sets certain globals to their default values and permits
* those defaults to be overridden on the command line.
*/
void parsecl(int argc, char **argv)
{
int opt_c,opt_errflg=0;
extern char *optarg;
extern int optind, opterr, optopt;
int localhost_flag = 0;
struct stat statbuf;
char *eptr;
/*
* Initialize global variables with defaults, then override if
* desired on command line. Read the getopt man page to see how
* to set other variables. Or insert your own parsing code in here --
* Sometimes I use getopts, sometimes I parse myself, sometimes both.
*/
verbose = 0; /* Default is quiet */
update_delay = 5; /* 5 seconds */
connect_delay = 10; /* Reloop hosts every 10 seconds */
count = -1; /* -1 is infinity */
numhosts = 0; /* Want to lose this eventually */
localhosts_only = 0; /* Permit wulfhosts file by default */
hostfile[0] = (char) NULL; /* to show it not yet initialized */
/*
* Select display type and reset associated control variables as
* needed. Some get computed in display_whatever().
*/
display.type = DISPLAY_BASIC; /* default is BASIC */
/* Some of these may need to be overridden depending on type */
display.lines_footerwin = 6; /* This is the default message panel */
while ((opt_c = getopt(argc,argv,"c:d:f:hlt:v:")) != EOF){
switch (opt_c){
case 'c':
count = atoi(optarg);
break;
case 'd':
update_delay = atoi(optarg);
break;
case 'f':
strncpy(hostfile,optarg,1024);
if( (verbose == D_ALL) || (verbose == D_PARSECL) ){
fprintf(OUTFP,"D_PARSECL: Setting hostfile via -f %s\n",hostfile);
}
break;
case 'h':
Usage();
exit(0);
break;
case 'l':
/* If this is set, UNset any and all values for hostfile */
localhosts_only = 1;
break;
case 't': /* Set display type */
display.type = atoi(optarg);
/* May need to reset display.lines_for_messages here. */
break;
case 'v':
verbose = atoi(optarg);
break;
case '?':
opt_errflg++;
}
}
/*
* If there are no more arguments, we are done. Otherwise print
* Usage and exit.
*/
if(argc-optind != 0){
Usage();
}
/*
* The last thing we have to do is set the hostfile.
*
* We want to get get our hostfile from one of several places (in
* increasing order of significance):
* No hostfile (-l flag) forces localhost only (debugging)
* /etc/wulfhosts
* WULFHOSTS (environment variable)
* ~/.wulfhosts
* ./wulfhosts
* command line -f wulfhosts
* so that one can always specify a wulfhost file explicitly but
* otherwise a modest search will occur.
*
* If it was set by the command line above, it is non-null and
* we return. Whether it "works" will be tested elsewhere.
*/
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: Looking for (-f) hostfile: %s\n",hostfile);
}
/*
* If -l was used we unset hostfile OVERRIDING -f or anything
* else.
*/
if(localhosts_only){
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: localhost only flag set. No hostfile used.\n");
}
sprintf(hostfile,"");
return;
}
/*
* If hostfile was set via -f above AND EXISTS, it is used
*/
if( stat(hostfile,&statbuf) == 0) return;
/*
* Does ./wulfhosts exist? If so, use it.
*/
sprintf(hostfile,"wulfhosts");
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: Looking for ./hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
/*
* How about $HOME/.wulfhosts?
*/
eptr = getenv("HOME");
sprintf(hostfile,"%s/.wulfhosts",eptr);
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: Looking for ~/.hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
/*
* How about $WULFHOSTS
*/
eptr = getenv("WULFHOSTS");
if(eptr == NULL) {
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: No $WULFHOSTS hostfile defined.\n");
}
} else {
sprintf(hostfile,"%s",eptr);
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: Looking for $WULFHOSTS hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
}
/*
* Goodness. Not much there. How about /etc/wulfhosts.
*/
sprintf(hostfile,"/etc/wulfhosts");
if((verbose == D_ALL) || (verbose == D_PARSECL)){
fprintf(OUTFP,"D_PARSECL: Looking for system hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
}
void Usage()
{
fprintf(stdout, "\n");
fprintf(stdout, "Usage: \n");
fprintf(stdout, " wulfstat [-h] [-v] [-t display_type] [-d delay]\n");
fprintf(stdout, " [-c count] [-f /path/to/wulfhosts] [-l]\n");
fprintf(stdout, "\n");
fprintf(stdout, " -v selects \"verbose\" operation for debugging, very noisy.\n");
fprintf(stdout, " -h prints usage statement (this message) and exits.\n");
fprintf(stdout, " -t display_type selects display type from list below.\n");
fprintf(stdout, " -d delay (in seconds) selects update loop delay.\n");
fprintf(stdout, " -c count loops only count times (default loops forever).\n");
fprintf(stdout, " -f /path/to/wulfhosts to use a particular wulfhosts file.\n");
fprintf(stdout, " -l show localhost only (use no wulfhosts file from any location).\n");
fprintf(stdout, "\n");
/* Usagemap(); */
exit(0);
}
void Usagemap()
{
fprintf(stdout,"For verbose debugging output, enter:\n");
fprintf(stdout," -v %d (quiet/default)\n",D_QUIET);
fprintf(stdout," -v %d (to see almost everything)\n",D_ALL);
fprintf(stdout," -v %d main()\n",D_MAIN);
fprintf(stdout," -v %d parsecl()\n",D_PARSECL);
fprintf(stdout," -v %d startup()\n",D_STARTUP);
fprintf(stdout," -v %d work()\n",D_WORK);
fprintf(stdout," -v %d parse()\n",D_PARSE);
fprintf(stdout," -v %d connect()\n",D_CONNECT);
fprintf(stdout," -v %d init_host()\n",D_INIT_HOST);
fprintf(stdout," -v %d connect_hosts()\n",D_CONNECT_HOSTS);
fprintf(stdout," -v %d readhost()\n",D_READHOST);
fprintf(stdout," -v %d sendcmd()\n",D_SENDCMD);
fprintf(stdout," -v %d select_option()\n",D_SELECT_OPTION);
fprintf(stdout," -v %d extract_values()\n",D_EXTRACT_VALUES);
fprintf(stdout," -v %d init_values()\n",D_INIT_VALUES);
fprintf(stdout," -v %d update_values()\n",D_UPDATE_VALUES);
fprintf(stdout," -v %d values()\n",D_VALUES);
fprintf(stdout," -v %d display_values()\n",D_DISPLAY_VALUES);
fprintf(stdout," -v %d display_debug()\n",D_DISPLAY_DEBUG);
fprintf(stdout," -v %d screen()\n",D_SCREEN);
fprintf(stdout," -v %d quit()\n",D_QUIT);
fprintf(stdout,"(Some of the values above are obsolete.)\n");
}
./wulfware-2.6.0/wulfstat/wulfstat.c 0000644 0002471 0002471 00000002145 10645251201 015504 0 ustar rgb rgb /*
*========================================================================
* $Id: wulfstat.c 208 2004-02-20 14:55:00Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* Project template.
*========================================================================
*/
#include "wulfstat.h"
/*
* main() is just a shell for routines that parse the command line,
* do all the requested work, and then exit cleanly. main() is pretty
* much all there is in wulfstat.c
*/
int main(int argc, char *argv[])
{
/*
* Parse command line and set global variables
*/
parsecl(argc,argv);
/*
* Startup: Allocate memory, initialize all derivative variables from
* command line values. Connect to xmlsysd's and init.
*/
startup();
/*
* Work: Do all the work. Typically loop on a delay, poll xmlsysd sockets, parse
* results, display.
*/
work();
/*
* Quit: Done. Clean up (if necessary) and exit.
*/
quit();
}
./wulfware-2.6.0/wulfstat/copyright.h 0000644 0002471 0002471 00000001261 10645251201 015646 0 ustar rgb rgb /*
*
* Copyright (c) 2001 by Robert G. Brown, rgb@phy.duke.edu
*
* GPL version 2b (b for beverage) granted as given
* in the file COPYING in the parent wulfware source tree
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
*/
./wulfware-2.6.0/wulfstat/screen.c 0000644 0002471 0002471 00000014577 10645251201 015126 0 ustar rgb rgb /*
*========================================================================
* $Id: screen.c 244 2004-09-30 17:59:32Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulfstat.h"
/*
*==================================================================
* Curses/screen routines.
*==================================================================
*/
/*
* This routine sets up and starts the curses screen(s).
*/
void start_screen()
{
int i;
int pos;
initscr(); /* Initialize screen for manipulation */
keypad(stdscr, TRUE); /* enable keyboard mapping */
cbreak(); /* character at a time */
noecho(); /* with no character echo */
nonl(); /* Don't do NL to NL/CR on output */
/*
* Now we need to define a bunch of windows, one for each functional
* display. Scrollable windows require two windows, one for the "window"
* (including the pretty border) and the "pad" that fits inside which
* displays actual content text. Pads can be bigger than their viewport
* windows and can be slid up and down, left and right, within the "virtual"
* window of their viewport. Not as intuitive as it could be, but I
* think we've figured it out. Now to put it all to work.
*/
#define HEADER_LINES 1
#define MENU_LINES 6
#define FOOTER_LINES 3
#define DEBUG_LINES 3
/* there are 3 borders shared, hence the minus 3 below */
#define FIXED_LINES (HEADER_LINES + MENU_LINES + FOOTER_LINES + DEBUG_LINES - 3)
/*
* header for host display
*/
pos = 0;
display.lines_headerwin = HEADER_LINES;
headerwin = newwin(display.lines_headerwin,COLS,pos,0);
keypad(headerwin, TRUE); /* enable keyboard mapping */
wrefresh(headerwin);
pos += HEADER_LINES;
/*
* host display
*/
display.lines_displaywin = LINES - FIXED_LINES;
display.cols_displaywin = COLS;
/* Allow for border at top and bottom. */
displaywin = newwin(display.lines_displaywin ,COLS,pos,0);
wborder(displaywin,(char)NULL,(char)NULL,(char)NULL,(char)NULL,
(char)NULL,(char)NULL,(char)NULL,(char)NULL);
wrefresh(displaywin);
pos += display.lines_displaywin - 1;
/*
* menu display
*/
menuwin = newwin(MENU_LINES,COLS, pos , 0);
keypad(menuwin, TRUE); /* enable keyboard mapping */
wborder(menuwin,(char)NULL,(char)NULL,(char)NULL,(char)NULL,
ACS_LTEE,ACS_RTEE,(char)NULL,(char)NULL );
wrefresh(menuwin);
pos += MENU_LINES - 1;
/*
* footer display
*/
footerwin = newwin(FOOTER_LINES,COLS, pos ,0);
keypad(footerwin, TRUE); /* enable keyboard mapping */
wborder(footerwin,(char)NULL,(char)NULL,(char)NULL,(char)NULL,
ACS_LTEE,ACS_RTEE,(char)NULL,(char)NULL );
mvwprintw(footerwin,1,1," wulfstat %s Copyright 2004 Robert G. Brown",WULFWARE_VERSION);
wrefresh(footerwin);
pos += FOOTER_LINES - 1;
/*
* debug display. Let's try making the debugpad into a window.
*/
debugwin = newwin(DEBUG_LINES,COLS , pos,0);
wborder(debugwin,(char)NULL,(char)NULL,(char)NULL,(char)NULL,
ACS_LTEE,ACS_RTEE,(char)NULL,(char)NULL );
mvwprintw(debugwin,DEBUG_LINES,33,"Debug/Messages");
wrefresh(debugwin);
debugpad = newwin(DEBUG_LINES - 2,COLS-2, pos + 1,1);
keypad(debugpad, TRUE); /* enable keyboard mapping */
scrollok(debugpad, TRUE); /* Enable a scrolloff at bottom */
wprintw(debugpad,"mem* entries adjusted for cache/buffers\n");
wrefresh(debugpad);
pos += DEBUG_LINES;
if(display.lines_displaywin < 1){
mvwprintw(debugwin,1,1,"Warning: display has less than %d rows.", FIXED_LINES);
mvwprintw(debugwin,2,1,"wulfstat may not display properly...");
wrefresh(debugwin);
sleep(5);
}
}
/*
* This routine sets up and starts the curses screen(s).
*/
void start_displaypad()
{
/* this is the top line of the display in screen coords */
display.line_displaypad = display.lines_headerwin + 1;
/* leave room for displaywin border */
display.lines_displaypad = display.lines_displaywin - 1;
/* start displaypad at top (line 0) */
display.topline_displaypad = 0;
/* plenty of room for up to ten lines per host */
display.bottomline_displaypad = numhosts*10;
/* The corner of the displayed region is initially the topline */
display.showline_displaypad = display.topline_displaypad;
/* Create the pad */
displaypad = newpad(display.bottomline_displaypad,COLS-2);
/*
mvwprintw(displaypad,0,0,"Hi there! numhosts = %d",numhosts);
mvwprintw(displaypad,15,0,"Hi there! numhosts = %d",numhosts);
mvwprintw(displaypad,16,0,"Hi there! numhosts = %d",numhosts);
mvwprintw(displaypad,17,0,"Hi there! numhosts = %d",numhosts);
*/
keypad(displaywin, TRUE); /* enable keyboard mapping */
/* upper left corners of pad diplayed in sliding window. */
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
/*
* This routine stops the curses screen if necessary to permit i/o to
* a normal tty without curses control. Otherwise it does nothing.
*/
void stop_screen()
{
endwin();
}
void scroll_displaypad(int scroll_lines)
{
/*
* This scrolls displaypad up (+) or down (-) scroll_lines lines or
* fewer. We have to make sure that the result stays on the pad, so
* all this routine does is some bounds checking and then displays the
* new window onto the pad.
*/
int new_showline = display.showline_displaypad + scroll_lines;
int max_showline = display.bottomline_displaypad - display.lines_displaypad + 3;
if((verbose == D_ALL) || (verbose == D_SCREEN)){
wprintw(debugpad,"Scrolling %d lines, new = %d max = %d\n",
scroll_lines,new_showline,max_showline);
}
if(new_showline < 0) {
if((verbose == D_ALL) || (verbose == D_SCREEN)){
wprintw(debugpad,"too small\n");
}
display.showline_displaypad = 0;
} else if(new_showline > max_showline){
if((verbose == D_ALL) || (verbose == D_SCREEN)){
wprintw(debugpad,"too big\n");
}
display.showline_displaypad = max_showline;
} else {
if((verbose == D_ALL) || (verbose == D_SCREEN)){
wprintw(debugpad,"just right\n");
}
display.showline_displaypad = new_showline;
}
if((verbose == D_ALL) || (verbose == D_SCREEN)){
wprintw(debugpad,"top = %d bottom = %d lines = %d new = %d \n",
display.showline_displaypad,
display.bottomline_displaypad,
display.lines_displaypad,
new_showline);
wrefresh(debugpad);
}
prefresh(displaypad,display.showline_displaypad,0,display.line_displaypad,1,display.lines_displaypad,COLS-2);
}
./wulfware-2.6.0/autogen.sh 0000755 0002471 0002471 00000001255 10645251201 013620 0 ustar rgb rgb #! /bin/sh
# Run this to generate all the auto-generated files needed by the GNU
# configure program
# libtoolize --automake
autoheader
aclocal
rm -f Makefile Makefile.in dieharder/Makefile dieharder/Makefile.in \
libdieharder/Makefile libdieharder/Makefile.in
automake --add-missing --gnu
autoconf
echo "Now run ./configure --prefix=/usr completed. Afterwards"
echo "you should be able to make, make install, or make rpm."
# Might as well run this
# ./configure --prefix=/usr
# echo "./configure --prefix=/usr completed. Rerun with different"
# echo "--prefix if you want to put it someplace else. Otherwise"
# echo "you should be able to make, make install, or make rpm."
./wulfware-2.6.0/INSTALL 0000644 0002471 0002471 00000022432 10645251201 012650 0 ustar rgb rgb Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, and a
file `config.log' containing compiler output (useful mainly for
debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If you are using the cache, and at
some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.ac' (or `configure.in') is used to create
`configure' by a program called `autoconf'. You only need
`configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Optionally, type `make check' to run any self-tests that come with
the package.
4. Type `make install' to install the programs and any data files and
documentation.
5. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that the
`configure' script does not know about. Run `./configure --help' for
details on some of the pertinent environment variables.
You can give `configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a
time in the source code directory. After you have installed the
package for one architecture, use `make distclean' before reconfiguring
for another architecture.
Installation Names
==================
By default, `make install' installs the package's commands under
`/usr/local/bin', include files under `/usr/local/include', etc. You
can specify an installation prefix other than `/usr/local' by giving
`configure' the option `--prefix=PREFIX'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' cannot figure out automatically,
but needs to determine by the type of machine the package will run on.
Usually, assuming the package is built to be run on the _same_
architectures, `configure' can figure that out, but if it prints a
message saying it cannot guess the machine type, give it the
`--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option `--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share, you
can create a site shell script called `config.site' that gives default
values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script). Here is a another example:
/bin/bash ./configure CONFIG_SHELL=/bin/bash
Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent
configuration-related scripts to be executed by `/bin/bash'.
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help'
`-h'
Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
./wulfware-2.6.0/lib/ 0000755 0002471 0002471 00000000000 10645251201 012362 5 ustar rgb rgb ./wulfware-2.6.0/wulflogger/ 0000755 0002471 0002471 00000000000 10645251201 013771 5 ustar rgb rgb ./wulfware-2.6.0/wulflogger/Makefile.am 0000644 0002471 0002471 00000011210 10645251201 016020 0 ustar rgb rgb #========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulflogger
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION=@VERSION@
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
# Linker flags
LDFLAGS =
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
./wulfware-2.6.0/wulflogger/Makefile.in 0000644 0002471 0002471 00000031441 10645251201 016041 0 ustar rgb rgb # Makefile.in generated by automake 1.9.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = wulflogger
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMDEP_FALSE = @AMDEP_FALSE@
AMDEP_TRUE = @AMDEP_TRUE@
AMTAR = @AMTAR@
AR = @AR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
CCDEPMODE = @CCDEPMODE@
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO = @ECHO@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
# Linker flags
LDFLAGS =
LIBOBJS = @LIBOBJS@
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
RANLIB = @RANLIB@
RELEASE = @RELEASE@
RELEASED = @RELEASED@
SED = @SED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION = @VERSION@
WULFWARE_CFLAGS = @WULFWARE_CFLAGS@
WULFWARE_LIBS = @WULFWARE_LIBS@
WULFWARE_LT_VERSION = @WULFWARE_LT_VERSION@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
prefix = @prefix@
program_transform_name = @program_transform_name@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
#========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulflogger
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wulflogger/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu wulflogger/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
./wulfware-2.6.0/wulflogger/wulfhosts 0000644 0002471 0002471 00000000130 10645251201 015744 0 ustar rgb rgb
ganesh
./wulfware-2.6.0/wulflogger/work.c 0000644 0002471 0002471 00000003153 10645251201 015121 0 ustar rgb rgb /*
*========================================================================
* $Id: work.c 72 2006-07-20 18:04:33Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* This is the main loop of the program. We should remain here looping
* until the program is terminated.
*========================================================================
*/
#include "wulflogger.h"
void work()
{
struct timeval sleepytime;
fd_set in;
char keyin;
if((verbose == D_ALL) || (verbose == D_WORK)){
printf("D_WORK: Starting wulfstat_work(). Use -v %d to focus.\n",D_WORK);
sleep(1);
/* printf("D_WORK: Starting wulfstat_work(). Use -v %d to focus.\n",D_WORK); */
}
/*
* Zero the cycle counter and off to work-loop we go...
*/
cycle_cnt = 0;
/*
* We loop forever, with a variable (user selectable) delay and a keyboard
* escape (where we CAN do e.g. dynamic reconfiguration therein).
*/
while(1){
if((verbose == D_ALL) || (verbose == D_WORK)){
printf("D_WORK: About to wait for %d seconds\n",update_delay);
}
sleep(update_delay);
/*
* Increment cycle counter
*/
cycle_cnt++;
if((verbose == D_ALL) || (verbose == D_WORK)){
printf("D_WORK: cycle counter = %d\n",cycle_cnt);
}
/*
* receive the results and put them where they belong.
*/
update_host_values(hostlist);
/*
* display them.
*/
display_values();
if(count != -1 && cycle_cnt >= count) exit(0);
}
}
./wulfware-2.6.0/wulflogger/Makefile 0000644 0002471 0002471 00000031426 10645251201 015437 0 ustar rgb rgb # Makefile.in generated by automake 1.9.6 from Makefile.am.
# wulflogger/Makefile. Generated from Makefile.in by configure.
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
srcdir = .
top_srcdir = ..
pkgdatadir = $(datadir)/wulfware
pkglibdir = $(libdir)/wulfware
pkgincludedir = $(includedir)/wulfware
top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = /usr/bin/install -c
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = i686-pc-linux-gnu
host_triplet = i686-pc-linux-gnu
subdir = wulflogger
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
DIST_SOURCES =
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run aclocal-1.9
AMDEP_FALSE = #
AMDEP_TRUE =
AMTAR = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run tar
AR = ar
AUTOCONF = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run autoconf
AUTOHEADER = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run autoheader
AUTOMAKE = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run automake-1.9
AWK = gawk
#========================================================================
# Define parameters and directives needed in compile/link steps.
#========================================================================
# C Compiler
CC = gcc
CCDEPMODE = depmode=gcc3
# Compile flags
CFLAGS = -O3 -I/usr/include/libxml2 -I ../include $(DEFINES)
CPP = gcc -E
CPPFLAGS =
CYGPATH_W = echo
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
ECHO = echo
ECHO_C =
ECHO_N = -n
ECHO_T =
EGREP = grep -E
EXEEXT =
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s
# Linker flags
LDFLAGS =
LIBOBJS =
# Libraries
LIBS = -L ../libwulf -lwulf -lpthread -lcurses -lxml2 -lm
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LN_S = ln -s
LTLIBOBJS =
MAINT = #
MAINTAINER_MODE_FALSE =
MAINTAINER_MODE_TRUE = #
MAKEINFO = ${SHELL} /home/rgb/Src/Projects/wulfware/missing --run makeinfo
OBJEXT = o
PACKAGE = wulfware
PACKAGE_BUGREPORT =
PACKAGE_NAME = wulfware
PACKAGE_STRING = wulfware 2.6.0
PACKAGE_TARNAME = wulfware
PACKAGE_VERSION = 2.6.0
PATH_SEPARATOR = :
RANLIB = ranlib
RELEASE = 0
RELEASED =
SED = /bin/sed
SET_MAKE =
SHELL = /bin/sh
STRIP = strip
# This is automagically set in the toplevel build. Do not edit by
# hand.
VERSION = 2.6.0
WULFWARE_CFLAGS = -I${prefix}/include
WULFWARE_LIBS = -L${exec_prefix}/lib -ldieharder
WULFWARE_LT_VERSION = 0:0:0
ac_ct_AR = ar
ac_ct_CC = gcc
ac_ct_RANLIB = ranlib
ac_ct_STRIP = strip
am__fastdepCC_FALSE = #
am__fastdepCC_TRUE =
am__include = include
am__leading_dot = .
am__quote =
am__tar = ${AMTAR} chof - "$$tardir"
am__untar = ${AMTAR} xf -
bindir = ${exec_prefix}/bin
build = i686-pc-linux-gnu
build_alias =
build_cpu = i686
build_os = linux-gnu
build_vendor = pc
datadir = ${prefix}/share
exec_prefix = ${prefix}
host = i686-pc-linux-gnu
host_alias =
host_cpu = i686
host_os = linux-gnu
host_vendor = pc
includedir = ${prefix}/include
infodir = ${prefix}/info
install_sh = /home/rgb/Src/Projects/wulfware/install-sh
libdir = ${exec_prefix}/lib
libexecdir = ${exec_prefix}/libexec
localstatedir = ${prefix}/var
mandir = ${prefix}/man
mkdir_p = mkdir -p --
oldincludedir = /usr/include
prefix = /usr
program_transform_name = s,x,x,
sbindir = ${exec_prefix}/sbin
sharedstatedir = ${prefix}/com
sysconfdir = ${prefix}/etc
target_alias =
#========================================================================
# This is a Makefile for the wulfstat application, part of the
# overall wulfware package. It has a very abbreviated set of targets.
#
# make alone should build the application.
#
# make clean deletes the application and all object files
# make install strips and installs application and a man page
# make printout prints out all source and include files
#
# These two commands execute in the toplevel project directory only.
# make svn does a svn commit and creates the timestamp $(SVN)
# make sync does a svn commit and rsyncs to list of hosts
#========================================================================
PROJECT = wulfware
PROGRAM = wulflogger
DIR = $(PROGRAM)
SVNTREE = $(HOME)/Src/svn-tree
SVNPATH = $(SVNTREE)/$(PROJECT)
SVNTIME = $(DIR:=.svn.time)
#========================================================================
# Define all sources. Note that we choose to depend on ALL the includes
# in the include directory, which cannot be empty or this will barf.
# We also have dependencies that extend to the libdieharder source
# directory, as we need to force a build if any of them change.
#========================================================================
SRCSOURCES = $(shell ls *.c 2>&1 | sed -e "/\/bin\/ls:/d")
SRCINCLUDES = $(shell ls *.h 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
# This library must be linked, but may exist only in the toplevel
# wulfware build tree at this point. We have to therefore name it
# and force a build of it, if necessary.
# LIBSOURCES = $(shell ls ../libwulf/*.c 2>&1 | sed -e "/\/bin\/ls:/d")
#========================================================================
LIBINCLUDES = $(shell ls ../include/wulfware/*.h 2>&1 | sed -e "/\/bin\/ls:/d")
PROGLIB_SONAME = ../libwulf/libwulf.so.$(VERSION)
# PROGLIB_SO = $(LIBDIR)/libwulf.so
SOURCES = $(LIBSOURCES) $(SRCSOURCES)
INCLUDES = $(LIBINCLUDES) $(SRCINCLUDES)
OBJECTS = $(SRCSOURCES:.c=.o)
DEFINES = -DVERSION=$(VERSION)
#========================================================================
# printout makes an enscript -2r printout of SOURCES and
# and INCLUDES. Use lpr if you don't have enscript
#========================================================================
LPR = enscript -2r
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wulflogger/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu wulflogger/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: # $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
mostlyclean-libtool:
-rm -f *.lo
clean-libtool:
-rm -rf .libs _libs
distclean-libtool:
-rm -f libtool
uninstall-info-am:
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean-am: clean-generic clean-libtool mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-libtool
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am:
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
distclean distclean-generic distclean-libtool distdir dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-exec install-exec-am \
install-info install-info-am install-man install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \
uninstall-info-am
#========================================================================
# List of variants one can make. all is the default. We always
# presume the simplest of dependencies and remake if includes change
# for example.
#========================================================================
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS) $(INCLUDES) $(PROGLIB_SONAME)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBS)
#========================================================================
# This won't be executed unless the build is performed in the
# source tree AND it is not up to date in the $(BUILDDIR) tree.
#========================================================================
$(PROGLIB_SONAME):
- (cd ../libwulf ;\
$(MAKE))
#========================================================================
# The only safe place to do commits is in the toplevel directory
#========================================================================
svn:
(cd ..;make svn)
sync:
(cd ..;make sync)
# LPR = lpr
printout:
$(LPR) $(SRCSOURCES) $(SRCINCLUDES)
#========================================================================
# A standard cleanup target
#========================================================================
clean :
- rm -f core $(PROGRAM) *.o $(PROGRAM).1.gz
install : $(PROGRAM)
(strip $(PROGRAM);\
install -d $(prefix)/bin; \
install -m 755 $(PROGRAM) $(prefix)/bin; \
install -d $(prefix)/share/man/man1; \
gzip -c -9 $(PROGRAM).1 > $(PROGRAM).1.gz; \
install -m 644 $(PROGRAM).1.gz $(prefix)/share/man/man1)
#========================================================================
# We give all generic rules below. Currently we only need a rule for
# objects.
#========================================================================
%.o:%.c $(INCLUDES) Makefile
$(CC) -c $(CFLAGS) $<
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
./wulfware-2.6.0/wulflogger/wulflogger.1 0000644 0002471 0002471 00000023551 10645251201 016236 0 ustar rgb rgb .\" $Id: wulflogger.1 72 2006-07-20 18:04:33Z rgb $
.TH WULFLOGGER 1 "Copyright 2004 Robert G. Brown" "WULFLOGGER"
.SH NAME
wulflogger \- A logging utility/client for xmlsysd
.SH SYNOPSIS
wulflogger [-h] [-v] [-t display_type] [-d delay] [-c count]
[-f /path/to/wulfhosts] [-l]
.SH WULFLOGGER OPTIONS
-h shows help (command synopsis).
-v makes execution verbose for debugging or the bored.
-t display_type selects display type from list below
-d delay (in seconds) selects update loop delay
-c count causes it to output count pages (only) and exit
-f /path/to/wulfhosts to use a particular wulfhosts file
-l show localhost only (use no wulfhosts file from any location)
.SH DESCRIPTION
.B wulflogger
is a simple yet powerful tty based cluster monitoring tool. It requires
xmlsysd (running on each system to be monitored) to efficiently provide
it with system and proc-derived information that is processed and
provided to the user in one of several user-selectable display formats.
With it a user can monitor things across en entire beowulf, cluster, or
workstation LAN systems descriptors such as load average, memory
consumption, swap, page, and interrupt activity and network loads or can
even retrieve and display such mundane information is CPU make and base
clock, system time, uptime or other potentially useful but slowly
varying system descriptors. The information presented is updated
regularly after a user-selectable delay. This tool prints cluster
results to stdout, from which they can be redirected into a log file or
piped into a tool (for example, a graphing utility or web application).
.SH WULFHOST
To run wulflogger as anything but a monitor of the local host one REQUIRES
a wulfhost file. wulflogger run with no viable wulfhost file defaults to
a localhost connection. A localhost connection can also be forced
(overriding the search for a wulfhost file) with the -l command line
argument.
The wulfhost file tells wulflogger where to to connect to xmlsysd's. It
consists of any mix of the following xml discriptors:
rgb
On_spin3d
ganesh
192.168.1.132
7887
lucifer
192.168.1.131
7887
g%02d
1
15
7887
152.3.182.193
152.3.182.200
7887
From this example, one sees that the tag defines a host to
connect to. Within this tag, the host can be specified by the
tag (which can contain any name resolvable by
gethostbyname()) or the tag, most commonly used for hosts in a
cluster that haven't been named. In addition, for each host one can
specify a if one for any reason is running the xmlsysd on
a different port than its installation default.
This information can easily be overspecified. In most cases, for
example, it is better to just use the default port (7887) and let local
hostname ip address lookup take care of determining the interface IP
number. Note that xml doesn't care how the tags are laid out as long as
they are nested correctly, and that there can be more than one ,
, or tagset in a wulfhosts to specify the
simultaneous monitoring of any mix of hosts, clusters, lans.
Note also that xml DOES preserve whitespace, so
b0
is NOT the same is
b0
and would likely not work correctly. If you do enter port, name, and ip
explicitly and incorrectly or inconsistently, be prepared for odd
behavior.
The is hopefully self explanatory. It can be used to
rapidly define an entire cluster on the basis of a systematic ordering
of hostname. The contents of the tag should be a SIMPLE
printf-format string for a presumed integer that will be iterated from
to in steps of one. In this way a single xml tag can
define an entire cluster e.g. g01-g15.
The is similar, except that it uses ip number directly in
and . Use caution -- in almost all cases the first three
tuples in the ip number should be the SAME in and . This
option is provided in case the hosts don't have a well-defined and
published hostname and are accessible only by e.g. dhcp-assigned ip
number in any event.
All forms of defining a host or list of hosts permit an optional
to be assigned to override xmlsysd's installation default of 7887.
wulflogger will connect to these hosts as fast as it can in a parallel
thread, and then will periodically attempt to REconnect to any hosts
that might be down or that might go down while wulflogger is running.
wulflogger itself is thus moderately robust against cluster node state
changes.
Note that any hosts that do not resolve are displayed but marked
unknown. Any hosts that resolve but that cannot accept a connection
(which could mean that no daemon is installed or running, the daemon has
more connections than the number permitted in e.g.
/etc/xinetd.d/xmlsysd, or that the host is down) are marked down.
.SH DISPLAY TYPES
The following display types are supported by wulflogger:
0 - load and status only (default), a very useful display for cluster
users
1 - stat -- information and rates primary derived from /proc/stat
2 - memory only (similar to running "free" on each host)
3 - network rates
4 - time displays system clocks, uptime, cpu type and clock
5 - pids interface for monitoring running distributed tasks.
6 - pids interface for monitoring running distributed tasks with
full command line displayed.
The pids interface is a bit quirky. It will generally ignore root-owned
tasks, for example, presuming that the tool is intended to monitor
userspace applications. There exist wulfhosts controls for these
properties; eventually they will likely be controllable at the command
line as well.
.SH CRON USAGE
wulflogger can be used in a cron script in a variety of ways. The -c
count flag was introduced to facilitate this usage. For example, one
could put wulflogger into the following sort of pipe:
#!/bin/sh
DOWN=\`/usr/bin/wulflogger -f /etc/wulfhosts.cluster1 -t 1 -c 1 \\
| grep down | cut -f 1 -d \' \'\`
# now do something about the down hosts...
.SH DEBUGGING
To help debug wulflogger (or problems you might have with wulfhosts),
note the table of verbose/debugging values that is printed as part of
its Usage (-h flag). This yields anything from a simple trace of a
particular subsystem such as connect_hosts() to everything the program
does. To limit the output, one can also use the -c count flag to only
display a single cycle. It is a good idea to pipe stderr into a logfile
separately so that the display output is unaltered. The logfile can be
examined later or mailed back to me for analysis.
An example of this might be:
wulflogger -l -c 1 -v 10 2>connect_hosts.log
to trace what wulflogger does connecting to localhost.
.SH SEE ALSO
libwulf(3), wulfstat(1)
.SH PUBLICATION RULES
.B wulflogger
can be modified and used at will by any user, provided that:
a) The original copyright notices are maintained and that the source,
including all modifications, is made publically available at the time of
any derived publication. This is open source software according to the
precepts and spirit of the Gnu Public License. See the accompanying
file COPYING, which also must accompany any redistribution.
b) The author of the code (Robert G. Brown) is appropriately
acknowledged and referenced in any derived use or publication.
c) Full responsibility for the accuracy, suitability, and
effectiveness of the program rests with the users and/or modifiers. As
is clearly stated in the accompanying copyright.h:
THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.SH ACKNOWLEDGEMENTS
None to speak of now, but a good place to comply with b) above later, if
you hack this code. Well, I should probably acknowledge the essential
help of Icon (Konstantin Raibetsev) and Seth Vidal, the entire beowulf
list, and various books on xml, network programming (e.g. Stevens) and a
cast of thousands. So let's assume that I just did;-)
.sh COPYRIGHT
GPL 2b; see the file COPYING that accompanies the source of this
program. This is the "standard Gnu General Public License version 2 or
any later version", with the one minor (humorous) "Beverage"
modification listed below. Note that this modification is probably not
legally defensible and can be followed really pretty much according to
the honor rule.
As to my personal preferences in beverages, red wine is great, beer is
delightful, and Coca Cola or coffee or tea or even milk acceptable to
those who for religious or personal reasons wish to avoid stressing my
liver.
.B The "Beverage" Modification to the GPL:
Any satisfied user of this software shall, upon meeting the primary
author(s) of this software for the first time under the appropriate
circumstances, offer to buy him or her or them a beverage. This
beverage may or may not be alcoholic, depending on the personal ethical
and moral views of the offerer. The beverage cost need not exceed one
U.S. dollar (although it certainly may at the whim of the offerer:-) and
may be accepted or declined with no further obligation on the part of
the offerer. It is not necessary to repeat the offer after the first
meeting, but it can't hurt...
./wulfware-2.6.0/wulflogger/xml_display_values.c 0000644 0002471 0002471 00000010150 10645251201 020036 0 ustar rgb rgb /*
*========================================================================
* $Id: xml_display_values.c 11 2004-02-04 15:49:55Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulflogger.h"
/*
*========================================================================
* xml_display routines all work according to the following general
* recipe:
*
* We walk the (linked) list of hosts. For each host we read its xml
* return from the already-completed send_to_all command (if possible)
* and convert it into an xpath context to make extracting data as easy
* as possible. We then walk ITS list of pid's, displaying each value
* as we go.
*
* In this way we don't NEED much extra storage. hostptr->doc "is" the
* actual data structure displayed for everything but rates, and the
* overhead of allocating it and freeing it each pass through is
* inescapable. xpath is actually a redirection structure and we
* could (if we wished) avoid its use altogether and parse the data out
* of the xml doc itself. This also gives us a clear place to focus
* optimization energy -- we "could" make the document walker as close to
* single pass (per host) as possible by doing the entire list of possible
* values to be parsed all at once and using ncurses a bit more.
*
* To develop this as reusably as possible, we're going to split off the
* general formatting of the window from the parse/display part, and
* TRY to work out routines that do "all" the parsing, ncurses locating,
* and printing of a result with a single line of arguments. That way
* building a display should be very easy.
*========================================================================
*/
void xml_display_pids()
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("%-9s|%5s|%7s|%7s|%7s|%5s|%7s|%7s|%5s|%5s|%5s|",
"hostname",
"PID",
"User",
"RSS",
"Size",
"Share",
"Stat",
"%CPU",
"%Mem",
"Time",
"Command"
);
/*
* Loop over all hosts in THIS column. Note that we have to basically
* walk the list of hosts, but we do so inside an i-loop based on
* numhosts. It is therefore important that numhosts be kept accurate.
*/
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
printf("%-9.9s|",
hostptr->hostname
);
} else {
printf("%-9.9s| Not connected...",
hostptr->hostname);
}
element = element->next;
}
}
./wulfware-2.6.0/wulflogger/example_perl/ 0000755 0002471 0002471 00000000000 10645251201 016446 5 ustar rgb rgb ./wulfware-2.6.0/wulflogger/example_perl/log.pl 0000755 0002471 0002471 00000000631 10645251201 017567 0 ustar rgb rgb #! /usr/bin/perl
use lib qw( /usr/lib/perl );
use FileHandle;
use IO::Handle;
$delay = 5;
open(STDIN ,"./wulflogger -t 1 -d $delay | ") || die "Sorry, I couldn't open stdin: $!\n";
while(){
chop;
if(!/^#/){
@fields = split(/\s+/,$_);
($node,$stat,$time,$load1,$load5,$load15) = split(/\s+/,$_);
$time = int($time);
print "$node: $stat $time $load1 $load5 $load15\n";
}
}
./wulfware-2.6.0/wulflogger/example_perl/load_rrd.pl 0000755 0002471 0002471 00000003364 10645251201 020602 0 ustar rgb rgb #! /usr/bin/perl
#makes programm work AFTER install
use lib qw( /usr/lib/perl );
use RRDs;
use FileHandle;
use IO::Handle;
# this simpulates a standard mrtg-2.x setup ... we can use this to
# compare performance ...
$main::DEBUG=0;
$delay = 5;
$nhosts = 9;
$rrd = "loads.rrd";
$gif = "loads.gif";
$png = "loads.png";
$start = time();
print "Creating RRD for load1/load5/load15 at time = $start\n";
RRDs::create ($rrd, "--start",$start, "--step",$delay,
"DS:load1:GAUGE:10:U:U",
"DS:load5:GAUGE:10:U:U",
"DS:load15:GAUGE:10:U:U",
"RRA:AVERAGE:0.5:1:10");
my $ERROR = RRDs::error;
die "$0: unable to create `$rrd': $ERROR\n" if $ERROR;
print "Filling RRD with 9 values from wulflogger in a delayed loop.\n";
open(STDIN ,"./wulflogger -t 1 -d $delay | ") || die "Sorry, I couldn't open stdin: $!\n";
# open(STDIN ,"<-") || die "Sorry, I couldn't open stdin: $!\n";
while(){
chop;
if(!/^#/){
@fields = split(/\s+/,$_);
($node,$stat,$time,$load1,$load5,$load15) = split(/\s+/,$_);
$time = int($time);
print "$node: $stat $time $load1 $load5 $load15\n";
RRDs::update $rrd, "$time:$load1:$load5:$load15";
if ($ERROR = RRDs::error) {
die "$0: unable to update `$rrd': $ERROR\n";
}
RRDs::graph "localhost.png",
"--title", 'localhost Loads',
"--start", $start,
"--end", $time,
"--interlace",
"--imgformat","PNG",
"--width=450",
"DEF:load1=$rrd:load1:AVERAGE",
"DEF:load5=$rrd:load5:AVERAGE",
"DEF:load15=$rrd:load15:AVERAGE",
"LINE1:load1#ff4400:load1 envelope\\c",
"LINE1:load5#22FF00:load5 envelope\\c",
"LINE1:load15#0011FF:load15 envelope\\c";
if ($ERROR = RRDs::error) {
print "ERROR: $ERROR\n";
};
}
}
./wulfware-2.6.0/wulflogger/example_perl/weblog.pl 0000755 0002471 0002471 00000004333 10645251201 020270 0 ustar rgb rgb #! /usr/bin/perl
use lib qw( /usr/lib/perl );
use FileHandle;
use IO::Handle;
$new = "$ENV{HOME}/public_html/wulflogger.html.new";
$old = "$ENV{HOME}/public_html/wulflogger.html";
$time = localtime;
open(WEBOUT,">$new") || die "Sorry, I couldn't open $new: $!\n";
print WEBOUT "
r-cluster load average data from time $time
NODE Load 1 Load 5 Load 15
";
$delay = 5;
open(STDIN ,"./wulflogger -t 1 -d $delay -f ~/.wulfhosts-r | ") || die "Sorry, I couldn't open stdin: $!\n";
while(){
chop;
if(!/^#/){
@fields = split(/\s+/,$_);
($node,$stat,$time,$load1,$load5,$load15) = split(/\s+/,$_);
$time = int($time);
$_ = $stat;
if(/down/) {
print WEBOUT "$node down \n";
} else {
if($load1 > 2.5) {
print WEBOUT " $node $load1 $load5 $load15 \n";
} elsif($load1 > 1.5) {
print WEBOUT " $node $load1 $load5 $load15 \n";
} elsif($load1 > 0.5) {
print WEBOUT " $node $load1 $load5 $load15 \n";
} else {
print WEBOUT " $node $load1 $load5 $load15 \n";
}
}
flush WEBOUT;
} else {
print WEBOUT "
";
close(WEBOUT);
rename $new,$old;
$time = localtime;
open(WEBOUT,">$new") || die "Sorry, I couldn't open $new: $!\n";
print WEBOUT "
r-cluster load average data from time $time
NODE Load 1 Load 5 Load 15
";
}
}
# Get rid of temporary file on exit, if possible.
unlink $new;
./wulfware-2.6.0/wulflogger/startup.c 0000644 0002471 0002471 00000006440 10645251201 015643 0 ustar rgb rgb /*
*========================================================================
* $Id: startup.c 72 2006-07-20 18:04:33Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* wulflogger startup inherits the parsed command line and the does the
* derived bookkeeping and initialization. In particular it
* a) allocates space for the important vectors and structures ;
* b) opens sockets to the list of hosts in hostfile (if possible);
* c) sends baseline init to all of those xmlsysd's. This needs to
* be done in startup because eventually the init process will be used to
* mask the subset of all fields actually needed to generate the wulflogger
* results (only);
* d) delay one second, and then pass control on to wulfstat_work for
* an infinite loop of updates. The one second will allow reasonably
* accurate rates to be displayed from the beginning.
*========================================================================
*/
#include "wulflogger.h"
void startup()
{
/* loop index */
int i;
/* length of io buffer in use */
int buflen,readcnt;
/* pointer to return from xmltract */
char *xpval;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("D_STARTUP: XML initialization. Use -v %d to focus.\n",D_STARTUP);
}
/*
* Need to do this so it doesn't mess up use in scripts?
fclose(stdin);
*/
/*
* XML setup.
* I like keeping blanks in the XML that is parsed and printed if I'm
* going to read it. One has to initialize the xpath parser as
* well.
*/
LIBXML_TEST_VERSION
xmlKeepBlanksDefault(0);
xmlXPathInit();
/*
* OK, we'll try something ELSE to free us from the nasty blocking
* properties of bash if stdin is left open.
ioctl(0,TIOCNOTTY);
*/
/*
* allocate all the various hostlist linked lists with a
* libwulf library call.
*/
allocate_hostlists();
/*
* Read in/parse the xml wulfhost file with a single libwulf call.
*/
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("D_STARTUP: Read in the hostfile %s.\n",hostfile);
}
numhosts = read_wulfhosts(hostfile);
/*
* Set the dctl struct to the state associated with the initial
* display type. Each xmlsysd connection will then be started
* up correctly.
*/
set_display_dctl_state();
/*
* This libwulf function establishes a connection to all hosts in a
* separate thread, initializes them according to the current dctl state.
* It polls the list of hosts every connect_delay seconds and if any are
* marked down, it tries to restart their connections. In this way
* downed hosts that come back up are automagically restored.
* Connectlist is a struct because a thread call can have only a single
* void* argument.
*/
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("D_STARTUP: Connect to the hosts in hostlist = %0x.\n",hostlist);
printf("D_STARTUP: hostlist->head = %0x\n",hostlist->head);
}
connectlist.hostlist = hostlist;
connectlist.connect_delay = connect_delay;
pthread_create(&connecttid,NULL,(void*)connect_to_all_hosts,&connectlist);
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("D_STARTUP: All done with startup().\n");
}
}
./wulfware-2.6.0/wulflogger/show_status.c 0000644 0002471 0002471 00000001065 10645251201 016522 0 ustar rgb rgb /*
*========================================================================
* $Id: show_status.c 11 2004-02-04 15:49:55Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulflogger.h"
/*
*==================================================================
* show_status() writes a short dump of system configuration
* parameters to debugpad.
*==================================================================
*/
void show_status()
{
}
./wulfware-2.6.0/wulflogger/wulfhosts.example 0000644 0002471 0002471 00000001343 10645251201 017405 0 ustar rgb rgb
ganesh
On_spin3d
taskman.pl
rgb
bass
g%02d
1
15
7887
c%02d
14
15
7887
p%02d
0
3
152.3.182.193
152.3.182.200
7887
152.3.182.202
152.3.182.212
7887
./wulfware-2.6.0/wulflogger/BUGS/ 0000755 0002471 0002471 00000000000 10645251201 014531 5 ustar rgb rgb ./wulfware-2.6.0/wulflogger/BUGS/carlier_2 0000644 0002471 0002471 00000000723 10645251201 016320 0 ustar rgb rgb From carlierd@acm.org Fri Apr 16 12:04:11 2004
Date: Fri, 16 Apr 2004 16:51:26 +0200
From: Didier Carlier
To: Robert G.Brown
Subject: wulfhost - minor fix ?
wulflogger was not properly connecting to all hosts.
I didn't find where the connected field was initialized, so I've added:
hostptr->connected = 0;
right after
hostptr->val.cpu = 0;
in libwulf/wulfhosts_util.c, in function void validate_host(Host
*hostptr)
didier
./wulfware-2.6.0/wulflogger/BUGS/bellve_1 0000644 0002471 0002471 00000001547 10645251201 016154 0 ustar rgb rgb From Karl.Bellve@umassmed.edu Mon May 17 12:43:39 2004
Date: Mon, 17 May 2004 11:53:53 -0400
From: Karl Bellve
To: rgb@phy.duke.edu
Subject: wulflogger
Roger,
Great work on wulfstat, xmlsysd, and wulflogger.
Just a couple of things. Very minor, but when you do -h on wulflogger,
it reports itself as wulfstat.
Second, when I run wulflogger, it reports my first node down when I
start wulflogger for the first time. By the third report, it shows it is
up. This is repeatable. I will try and track this bug down further.
--
Cheers,
Karl Bellve, Ph.D. ICQ # 13956200
Biomedical Imaging Group TLCA# 7938
University of Massachusetts
Email: Karl.Bellve@umassmed.edu
Phone: (508) 856-6514
Fax: (508) 856-1840
PGP Public key: finger kdb@molmed.umassmed.edu
http://invitro.umassmed.edu/~kdb/grok_is.html
./wulfware-2.6.0/wulflogger/BUGS/carlier_1 0000644 0002471 0002471 00000001514 10645251201 016316 0 ustar rgb rgb From dc@hemeris.com Fri Apr 16 12:04:00 2004
Date: Wed, 14 Apr 2004 14:27:38 +0200
From: Didier Carlier
To: Robert G. Brown
Subject: wulflogger segfault
wulflogger (0.1.4) crashes on startup in libwulf/parse.c, at line 57,
or rather within strncpy called from that place.
The trouble is that the "outfields" argument is declared in split() as
a "char **" but what is passed to it is the "fields" static variable
from wulfhosts_util.c
That one is declared as:
static char fields[4][K];
I changed that to:
static char f0[K];
static char f1[K];
static char f2[K];
static char f3[K];
static char *fields[] = {f0, f1, f2, f3};
since it seems that fields is always used as a char** and never as a
char[][].
Not really elegant I know, but I beleive it is more correct and it
fixes the problem...
Didier
./wulfware-2.6.0/wulflogger/wulflogger.c 0000644 0002471 0002471 00000002150 10645251201 016310 0 ustar rgb rgb /*
*========================================================================
* $Id: wulflogger.c 37 2004-02-13 22:34:15Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* Project template.
*========================================================================
*/
#include "wulflogger.h"
/*
* main() is just a shell for routines that parse the command line,
* do all the requested work, and then exit cleanly. main() is pretty
* much all there is in wulfstat.c
*/
int main(int argc, char *argv[])
{
/*
* Parse command line and set global variables
*/
parsecl(argc,argv);
/*
* Startup: Allocate memory, initialize all derivative variables from
* command line values. Connect to xmlsysd's and init.
*/
startup();
/*
* Work: Do all the work. Typically loop on a delay, poll xmlsysd sockets, parse
* results, display.
*/
work();
/*
* Quit: Done. Clean up (if necessary) and exit.
*/
quit();
}
./wulfware-2.6.0/wulflogger/display_values.c 0000644 0002471 0002471 00000051241 10645251201 017164 0 ustar rgb rgb /*
*========================================================================
* $Id: display_values.c 72 2006-07-20 18:04:33Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulflogger.h"
/*
* This routine switches between all the different kinds of displays
* we recognize and walks the linked list of hosts, displaying its
* (relevant) contents.
*/
void display_values()
{
char displaytype[64];
/*
* If verbose is on, we don't do a "real" display at all, regardless
* of how it is set.
*/
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_values(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
switch(display_type) {
case DISPLAY_BASIC:
display_basic();
break;
case DISPLAY_LOAD:
default:
display_load();
break;
case DISPLAY_MEMORY:
display_memory();
break;
case DISPLAY_NET:
display_net();
break;
case DISPLAY_TIMES:
display_times();
break;
case DISPLAY_PIDS:
display_pids();
break;
case DISPLAY_PIDS_CMDLINE:
display_pids_cmdline();
break;
}
}
/*
*========================================================================
* display_basic()
*
* Displays name, status, timestamp, eth0 rx/tx, swapin, swapout,
* pagein, pageout, ctxt, intr, and users. Is currently default display
* (type 0).
* (Note that this is very much like vmstat on a whole cluster at once.)
*========================================================================
*/
void display_basic()
{
/* Loop indices */
int i,j,k;
unsigned int mem_used,mem_free;
char scaleout[4][32];
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_basic. Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("# %14s %6s %11s %6s %6s %6s %7s %7s %3s %3s %3s %3s %4s %4s %4s\n",
"Name ",
"Status",
"Timestamp",
" load1",
" load5",
"load15",
"rx byts",
"tx byts",
" si",
" so",
" pi"
" po",
"ctxt",
"intr",
"prun",
"pblk"
);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected == 2) {
printf("%-16.16s %6s%11lu.%02d %6.2f %6.2f %6.2f %6.0f %6.0f %3.0f %3.0f %3.0f %3.0f %4.0f %4.0f %4d %4d\n",
hostptr->hostname,
"up ",
hostptr->val.stat_tv_sec,
hostptr->val.stat_tv_usec / 10000,
hostptr->val.load1,
hostptr->val.load5,
hostptr->val.load15,
hostptr->val.interface[-1].rx_bytes_rate,
hostptr->val.interface[-1].tx_bytes_rate,
hostptr->val.swap_in_rate,
hostptr->val.swap_out_rate,
hostptr->val.page_in_rate,
hostptr->val.page_out_rate,
hostptr->val.ctxt_rate,
hostptr->val.intr_rate,
hostptr->val.procs_running,
hostptr->val.procs_blocked
);
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_load()
*
* Displays: name, status, timestamp, load1, load5, load15. Much like
* the load part of uptime. This is currently display type 1.
*========================================================================
*/
void display_load()
{
/* Loop indices */
int i,j,k;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_load. Use -v %d to focus.\n",D_DISPLAY_VALUES);
printf("D_DISPLAY_VALUES: hostlist = %0x\n",hostlist);
}
printf("# %14s %6s %11s %6s %6s %6s\n",
"Name ",
"Status",
"Timestamp",
" load1",
" load5",
"load15"
);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected == 2) {
printf("%-16.16s %6s%11lu.%02d %6.2f %6.2f %6.2f\n",
hostptr->hostname,
"up ",
hostptr->val.loadavg_tv_sec,
hostptr->val.loadavg_tv_usec / 10000,
hostptr->val.load1,
hostptr->val.load5,
hostptr->val.load15);
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_memory()
*
* This routine displays memory statistics (from meminfo) and related
* values for each host, much like free or meminfo for a whole cluster at
* once. It is display type 2, currently.
*========================================================================
*/
void display_memory()
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_memory(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("# %14s %6s %11s %7s %7s %7s %7s %5s %7s %7s %5s %5s %5s\n",
"Name ",
"Status",
"Timestamp",
"m-tot",
"m-used",
"m-free",
"m-free*",
"s-tot",
"s-used",
"s-free",
"m-shr",
"m-buf",
"m-cch"
);
/*
* Loop over all hosts and pop them on the display pad
*/
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected == 2) {
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
sprintf(row_out[1],"%7.7s",scale_k(hostptr->val.mem_used,7,0));
sprintf(row_out[2],"%7.7s",scale_k(hostptr->val.mem_free,7,0));
sprintf(row_out[3],"%7.7s",scale_k(hostptr->val.mem_free + hostptr->val.mem_buffers + hostptr->val.mem_cached,7,0));
sprintf(row_out[4],"%5.5s",scale_k(hostptr->val.swap_total,5,0));
sprintf(row_out[5],"%7.7s",scale_k(hostptr->val.swap_used,7,0));
sprintf(row_out[6],"%7.7s",scale_k(hostptr->val.swap_free,7,0));
sprintf(row_out[7],"%5.5s",scale_k(hostptr->val.mem_shared,5,0));
sprintf(row_out[8],"%5.5s",scale_k(hostptr->val.mem_buffers,5,0));
sprintf(row_out[9],"%5.5s",scale_k(hostptr->val.mem_cached,5,0));
printf("%-16.16s %6s%11lu.%02d %5.5s %7.7s %7.7s %7.7s %5.5s %7.7s %7.7s %5.5s %5.5s %5.5s\n",
hostptr->hostname,
"up ",
hostptr->val.meminfo_tv_sec,
hostptr->val.meminfo_tv_usec / 10000,
row_out[0],
row_out[1],
row_out[2],
row_out[3],
row_out[4],
row_out[5],
row_out[6],
row_out[7],
row_out[8],
row_out[9]
);
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_net()
*
* Displays hostname, status, timestamp and various key network interface
* rates for all interfaces found on all hosts. Note that variable
* numbers and types of interfaces make this ugly -- can't be helped.
* This is display type 3.
*========================================================================
*/
void display_net()
{
/* Loop indices */
int i,j,k;
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_net(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
sprintf(display_msg,"");
printf("# %14s %-15s %6s %11s %4s %6s %6s %6s %6s %6s %6s %6s\n",
"Name ",
" IP",
"Status",
"Timestamp",
"dev#",
"rx_bts",
"rx_pks",
"rx_ers",
"tx_bts",
"tx_pks",
"tx_ers",
"tcp_sk"
);
k = 0;
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected == 2) {
for(j = 0;j < hostptr->val.num_interfaces;j++){
/* For the moment, only eth displays... */
if( strncmp("eth",hostptr->val.interface[j].devtype,3) == 0 )
/* printf("Device type = %s\n",hostptr->val.interface[j].devtype);*/
printf("%-16.16s %15s %6s%11lu.%02d %3s%1s %6.0f %6.0f %6.0f %6.0f %6.0f %6.0f %2ld\n",
hostptr->hostname,
hostptr->val.interface[j].ip,
"up ",
hostptr->val.netdev_tv_sec,
hostptr->val.netdev_tv_usec / 10000,
hostptr->val.interface[j].devtype,
hostptr->val.interface[j].devid,
hostptr->val.interface[j].rx_bytes_rate,
hostptr->val.interface[j].rx_packets_rate,
hostptr->val.interface[j].rx_errs_rate,
hostptr->val.interface[j].tx_bytes_rate,
hostptr->val.interface[j].tx_packets_rate,
hostptr->val.interface[j].tx_errs_rate,
hostptr->val.tcp_inuse);
}
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_times()
*
* Displays name, status, timestamp, cpu information, time, uptime, and
* duty cycle (fraction of clocks the CPU(s) has been in use).
* Most of this is slowly varying and will only be useful for a glance,
* but duty cycle is actually a composite measure of some interest.
* This is display type 4.
*========================================================================
*/
void display_times()
{
/* Loop indices */
int i,j,k;
/*
* Display controls, both local and semi-global.
* minimum number of lines needed to run an xterm display with ONE host
*/
int minlines;
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting D_DISPLAY_VALUES. Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("# %14s %6s %11s %17.17s %4s %4s %4s %7s %7s %4s\n",
"Name ",
"Status",
"Timestamp",
"CPU Model Name",
"Cores",
"ClkM",
"CchK",
"Time",
"Uptime",
"Dty%"
);
element = hostlist->head;
for(i=0;idata;
if(hostptr->connected == 2) {
printf("%-16.16s %6s%11lu.%02d %-26.26s %2d %4.f %4d %11s %16s %3.f\n",
hostptr->hostname,
"up ",
hostptr->val.cpuinfo_tv_sec,
hostptr->val.cpuinfo_tv_usec / 10000,
hostptr->val.cpuinfo_model_name,
hostptr->val.cpuinfo_cores,
hostptr->val.cpuinfo_clock,
hostptr->val.cpuinfo_cachesize,
hostptr->val.time,
hostptr->val.uptime,
hostptr->val.duty_cycle
);
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_pids()
*
* Displays the name, status, timestamp and then all RUNNING tasks.
* This is display type 5 and the "riskiest" of the displays, since
* a runaway system may be able to produce evil results if
*
*========================================================================
*/
void display_pids()
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
Pid *pidptr;
ListElement *element,*pidelement;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("# %14s %6s %11s %5s %4s %8s %7s %7s %8s %-s\n",
"Name ",
"Status",
"Timestamp",
"PID ",
"Nice",
"User ",
"Vsize",
"RSS ",
"Time",
" Command"
);
/*
* Loop over all hosts and pop them on the pad
*/
element = hostlist->head;
j = 0;
for(i=0;idata;
if(hostptr->connected == 2) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
if(hostptr->pidlist->size == 0){
printf("%-16.16s %6s%11lu.%02d %5s %2s %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
} else {
pidelement = hostptr->pidlist->head;
while(pidelement != NULL){
pidptr = pidelement->data;
/*
* Never display xmlsysd itself. I know, one "should", but
* we won't.
*/
if(strncmp(pidptr->taskname,"xmlsysd",7) == 0) {
if(hostptr->pidlist->size == 1) {
printf("%-16.16s %6s%11lu.%02d %5s %2s %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
}
} else {
printf("%-16.16s %6s%11lu.%02d %5d %2d %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
pidptr->pid,
pidptr->nice,
pidptr->user,
pidptr->vsize,
pidptr->rss,
pidptr->time,
pidptr->taskname
);
j++;
}
pidelement = pidelement->next;
}
}
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
j++;
}
element = element->next;
}
fflush(STDOUT);
}
/*
*========================================================================
* display_pids_cmdline()
*
* Displays the name, status, timestamp and then all RUNNING tasks,
* including the entire commandline (otherwise much like display_pids()).
* This is display type 6.
*========================================================================
*/
void display_pids_cmdline()
{
/* Loop indices */
int i,j,k;
/*
* A buffer to aid in truncating names. One extra space for terminating
* null. The second one is to hold output from scale_k().
*/
char namebuf[10];
char row_out[10][10];
/* scratch space for positioning and counters both */
int row = 0,col = 0;
/* controls the hosts loop so we can page */
int imin_col,imax_col;
/*
* We need these to define EACH host as we walk the list of hosts for
* display.
*/
Host *hostptr;
Pid *pidptr;
ListElement *element,*pidelement;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_user(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
printf("# %14s %6s %11s %5s %4s %8s %7s %7s %8s %-s\n",
"Name ",
"Status",
"Timestamp",
"PID ",
"Nice",
"User ",
"Vsize",
"RSS ",
"Time",
" Command"
);
/*
* Loop over all hosts and pop them on the pad
*/
element = hostlist->head;
j = 0;
for(i=0;idata;
if(hostptr->connected == 2) {
/*
* This display is going to be fundamentally different from
* the others in that one cannot predict how many (if any)
* tasks that match the specified criteria will be running
* on any host in the list. These numbers can also jump
* up or down without warning as tasks are started or die or
* or stopped. To manage this sort of free form data presentation
* we will collect the pid data in a linked list of structs
* indexed per host. That is, hostptr->var.runlist will be
* a linked list of tasks that match the specified task criteria
* Filling it will be tricky, but is handled elsewhere. Here
* we simply walk the list for each host and displace a line
* for each entry found.
sprintf(row_out[0],"%5.5s",scale_k(hostptr->val.mem_total,5,0));
*/
if(hostptr->pidlist->size == 0){
printf("%-16.16s %6s%11lu.%02d %5s %2s %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
} else {
pidelement = hostptr->pidlist->head;
while(pidelement != NULL){
pidptr = pidelement->data;
/*
* Never display xmlsysd itself. I know, one "should", but
* we won't.
printf("host %s, taskname %s, size %d\n",hostptr->hostname,pidptr->taskname,hostptr->pidlist->size);
*/
if(strncmp(pidptr->taskname,"xmlsysd",7) == 0) {
if(hostptr->pidlist->size == 1) {
printf("%-16.16s %6s%11lu.%02d %5s %2s %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
" -",
"-",
" -",
" -",
" -",
" -",
"Idle/No Matching Task"
);
j++;
}
} else {
printf("%-16.16s %6s%11lu.%02d %5d %2d %8s %7s %7s %8s %-s\n",
hostptr->hostname,
"up ",
hostptr->val.pids_tv_sec,
hostptr->val.pids_tv_usec / 10000,
pidptr->pid,
pidptr->nice,
pidptr->user,
pidptr->vsize,
pidptr->rss,
pidptr->time,
pidptr->cmdline
);
j++;
}
pidelement = pidelement->next;
}
}
} else {
printf("%-16.16s %6s\n",
hostptr->hostname,
"down ");
j++;
}
element = element->next;
}
fflush(STDOUT);
}
./wulfware-2.6.0/wulflogger/quit.c 0000644 0002471 0002471 00000001063 10645251201 015117 0 ustar rgb rgb /*
*========================================================================
* $Id: quit.c 37 2004-02-13 22:34:15Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulflogger.h"
void quit()
{
Host *hostptr;
ListElement *element;
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
if(hostptr->client_fd && hostptr->connected){
close(hostptr->client_fd);
}
element = element->next;
}
exit(0);
}
./wulfware-2.6.0/wulflogger/wulflogger.h 0000644 0002471 0002471 00000013074 10645251201 016324 0 ustar rgb rgb /*
*========================================================================
* $Id: wulflogger.h 68 2004-12-01 16:51:29Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "copyright.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
/* libxml includes */
/*
* COMPAT using xml-config --cflags to get the include path this will
* work with both
*/
#include
#include
#include
/*
* This ensures that wulfstat can execute all the commands recognized
* by xmlsysd, no more and no less. With a fair bit of work, of course...;-)
*/
#include
/*
* This is all structs and enums needed to extract and store the values
* on a per-host basis for further processing and display.
*/
#include
/*
* These are structs used to xml-parse wulfhosts
*/
#include
/*
* The primary host structs. Must be included after xml stuff.
*/
#include
/*
* Subroutine Prototypes from libwulf
*/
#include
/*
* wulflogger prototypes
*/
void parsecl(int argc, char **argv);
void startup();
void dump_dctl_state(Host *hostptr);
void set_display_dctl_state();
void display_values();
void display_basic();
void display_load();
void display_memory();
void display_net();
void display_times();
void display_pids_cmdline();
void display_pids();
/*
*========================================================================
* Useful defines
*========================================================================
*/
#define STDIN stdin
#define STDOUT stdout
#define STDERR stderr
#define YES 1
#define NO 0
#define PI 3.141592653589793238462643
#define K 1024
#define K4 4096
#define K64 65536
/* Default xmlsysd port */
#define XMLSYSD_PORT 7887
/*
*========================================================================
* Debug enum -- one per separate component, no particular order
*========================================================================
*/
typedef enum {
D_QUIET,
D_ALL,
D_MAIN,
D_UTIL,
D_PARSECL,
D_STARTUP,
D_WORK,
D_PARSE,
D_CONNECT,
D_INIT_HOST,
D_CONNECT_HOSTS,
D_READHOST,
D_SENDCMD,
D_SELECT_OPTION,
D_EXTRACT_VALUES,
D_INIT_VALUES,
D_UPDATE_VALUES,
D_VALUES,
D_DISPLAY_VALUES,
D_DISPLAY_DEBUG,
D_SCREEN,
D_XMLSYSD,
D_QUIT,
N_DEBUG
} Debug;
/*
*========================================================================
* Subroutine Prototypes
*========================================================================
*/
/* toplevel routines in the main execution schema. */
void Usage();
void Usagemap();
void startup();
void work();
void quit();
/* from display_values.c */
void display_values();
void display_load();
void display_user();
void display_memory();
void display_net();
void display_times();
/*
*========================================================================
* Global Variables and relevant #defines
*
* Set the default values and override from the command line in parsecl().
*========================================================================
*/
/*
* verbose is also a debug switch. One can switch on the debugging
* of many components of the program with different values. However
* one has to read the source to know what turns on what. These are
* shared with libwulf and MUST be defined/allocated here, I suppose.
*/
int verbose;
int udelay; /* debug message delay */
/* command buffer, parse buffer, space for hostfile path */
char command[K];
char hostfile[K];
char display_msg[K]; /* a global buffer to display errors or messages in */
int update_delay; /* how long to wait between updates */
int connect_delay; /* how long to wait between reconnection loops */
unsigned long long int count; /* how many times to loop before exiting */
unsigned long long int cycle_cnt; /* the loop cycle counter */
Connectlist connectlist; /* Argument struct for threaded connect_to_hosts() */
/* pthread tid's */
pthread_t connecttid;
int numhosts;
/*
* This list of types will eventually allow users to select from
* several predefined and simple displays. Most of the time they
* will likely choose only load or wulfstat, but if we make the display
* width depend on what is being shown, a load display might be only
* 30 characters wide, so that a row of xterm windows, each with a list
* of perhaps 50 hosts, could conceivably allow hundreds of hosts to be
* monitored on single X window.
*/
int display_type;
typedef enum {
DISPLAY_BASIC, /* show basic stats */
DISPLAY_LOAD, /* show load average only */
DISPLAY_MEMORY, /* show memory only */
DISPLAY_NET, /* show network loads only */
DISPLAY_TIMES, /* show uptime and current time */
DISPLAY_PIDS, /* show pids */
DISPLAY_PIDS_CMDLINE, /* show pids AND command line */
/* The following aren't implemented */
DISPLAY_STAT, /* show stat-derived rates (mostly) */
N_DISPLAYTYPES
} Displaytypes;
./wulfware-2.6.0/wulflogger/set_display_dctl_state.c 0000644 0002471 0002471 00000017452 10645251201 020674 0 ustar rgb rgb /*
*========================================================================
* $Id: set_display_dctl_state.c 72 2006-07-20 18:04:33Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
*========================================================================
* Set all the dctl state features according to a display type switch.
*========================================================================
*/
#include "wulflogger.h"
void set_display_dctl_state()
{
Host *hostptr;
ListElement *element;
if((verbose == D_ALL) || (verbose == D_DISPLAY_VALUES)){
printf("D_DISPLAY_VALUES: Starting display_values(). Use -v %d to focus.\n",D_DISPLAY_VALUES);
}
switch(display_type) {
case DISPLAY_LOAD:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_LOAD: display_type = %d\n",DISPLAY_LOAD);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 1;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_NET:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_NET: display_type = %d\n",DISPLAY_NET);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 1;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_TIMES:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_TIMES: display_type = %d\n",DISPLAY_TIMES);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 1;
hostptr->dctl.users = 1;
hostptr->dctl.cpuinfo = 1;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 1;
hostptr->dctl.version = 1;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_PIDS:
case DISPLAY_PIDS_CMDLINE:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_PIDS: display_type = %d\n",DISPLAY_PIDS);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 1;
hostptr->dctl.pidstats = 1;
hostptr->dctl.cmdline = 1;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_MEMORY:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_MEMORY: display_type = %d\n",DISPLAY_MEMORY);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 0;
hostptr->dctl.meminfo = 1;
hostptr->dctl.net = 0;
hostptr->dctl.stat = 0;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
case DISPLAY_BASIC:
default:
if((verbose == D_ALL) || (verbose == D_STARTUP)){
printf("DISPLAY_BASIC: display_type = %d\n",DISPLAY_BASIC);
}
element = hostlist->head;
while(element != NULL){
hostptr = element->data;
hostptr->dctl.compress = 0;
hostptr->dctl.whitespace = 0;
hostptr->dctl.identity = 0;
hostptr->dctl.time = 0;
hostptr->dctl.users = 0;
hostptr->dctl.cpuinfo = 0;
hostptr->dctl.loadavg = 1;
hostptr->dctl.meminfo = 0;
hostptr->dctl.net = 1;
hostptr->dctl.stat = 1;
hostptr->dctl.sysvipc = 0;
hostptr->dctl.uptime = 0;
hostptr->dctl.version = 0;
hostptr->dctl.pids = 0;
hostptr->dctl.pidstats = 0;
hostptr->dctl.cmdline = 0;
hostptr->dctl.running = 0;
hostptr->dctl.root = 0;
if((verbose == D_ALL) || (verbose == D_STARTUP)){
dump_dctl_state(hostptr);
}
element = element->next;
}
break;
}
}
void dump_dctl_state(Host *hostptr)
{
printf("==================================\n");
printf("DCTL STATE DUMP:\n");
printf("DISPLAY_BASIC: compress = %d\n",hostptr->dctl.compress);
printf("DISPLAY_BASIC: whitespace = %d\n",hostptr->dctl.whitespace);
printf("DISPLAY_BASIC: identity = %d\n",hostptr->dctl.identity);
printf("DISPLAY_BASIC: time = %d\n",hostptr->dctl.time);
printf("DISPLAY_BASIC: users = %d\n",hostptr->dctl.users);
printf("DISPLAY_BASIC: cpuinfo = %d\n",hostptr->dctl.cpuinfo);
printf("DISPLAY_BASIC: loadavg = %d\n",hostptr->dctl.loadavg);
printf("DISPLAY_BASIC: meminfo = %d\n",hostptr->dctl.meminfo);
printf("DISPLAY_BASIC: net = %d\n",hostptr->dctl.net);
printf("DISPLAY_BASIC: stat = %d\n",hostptr->dctl.stat);
printf("DISPLAY_BASIC: sysvipc = %d\n",hostptr->dctl.sysvipc);
printf("DISPLAY_BASIC: uptime = %d\n",hostptr->dctl.uptime);
printf("DISPLAY_BASIC: version = %d\n",hostptr->dctl.version);
printf("DISPLAY_BASIC: pids = %d\n",hostptr->dctl.pids);
printf("DISPLAY_BASIC: running = %d\n",hostptr->dctl.running);
printf("DISPLAY_BASIC: root = %d\n",hostptr->dctl.root);
printf("==================================\n");
}
./wulfware-2.6.0/wulflogger/parsecl.c 0000644 0002471 0002471 00000016512 10645251201 015573 0 ustar rgb rgb /*
*========================================================================
* $Id: parsecl.c 69 2004-12-02 15:57:18Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
#include "wulflogger.h"
/*
* This routine sets certain globals to their default values and permits
* those defaults to be overridden on the command line.
*/
void parsecl(int argc, char **argv)
{
int opt_c,opt_errflg=0;
extern char *optarg;
extern int optind, opterr, optopt;
int localhosts_only = 0;
struct stat statbuf;
char *eptr;
int helpflag = 0;
/*
* Initialize global variables with defaults, then override if
* desired on command line. Read the getopt man page to see how
* to set other variables. Or insert your own parsing code in here --
* Sometimes I use getopts, sometimes I parse myself, sometimes both.
*/
verbose = 0; /* Default is quiet */
update_delay = 5; /* 5 seconds */
connect_delay = 10; /* Reloop hosts every 10 seconds */
numhosts = 0; /* Want to lose this eventually */
count = -1; /* -1 is infinity */
/*
* Select display type and reset associated control variables as
* needed. Some get computed in display_whatever().
*/
display_type = DISPLAY_BASIC; /* default is BASIC */
hostfile[0] = (char) NULL; /* to show it untouched */
while ((opt_c = getopt(argc,argv,"c:d:f:hlt:v:")) != EOF){
switch (opt_c){
case 'c':
count = atoi(optarg);
break;
case 'd':
update_delay = atoi(optarg);
break;
case 'f':
strncpy(hostfile,optarg,1024);
if( (verbose == D_ALL) || (verbose == D_PARSECL) ){
printf("D_PARSECL: Setting hostfile via -f %s\n",hostfile);
}
break;
case 'h':
helpflag = 1;
break;
case 'l':
/* If this is set, UNset any and all values for hostfile */
localhosts_only = 1;
break;
case 't': /* Set display type */
display_type = atoi(optarg);
/* May need to reset display.lines_for_messages here. */
break;
case 'v':
verbose = atoi(optarg);
break;
case '?':
opt_errflg++;
}
}
/*
* If there are no more arguments, we are done. Otherwise print
* Usage and exit.
*/
if(argc-optind != 0 || helpflag){
Usage();
exit(0);
}
/*
* The last thing we have to do is set the hostfile.
*
* We want to get get our hostfile from one of several places (in
* increasing order of significance):
* No hostfile (-l flag) forces localhost only (debugging)
* /etc/wulfhosts
* WULFHOSTS (environment variable)
* ~/.wulfhosts
* ./wulfhosts
* command line -f wulfhosts
* so that one can always specify a wulfhost file explicitly but
* otherwise a modest search will occur.
*
* If it was set by the command line above, it is non-null and
* we return. Whether it "works" will be tested elsewhere.
*/
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: Looking for (-f) hostfile: %s\n",hostfile);
}
/*
* If -l was used we unset hostfile OVERRIDING -f or anything
* else.
*/
if(localhosts_only){
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: localhost only flag set. No hostfile used.\n");
}
sprintf(hostfile,"");
return;
}
/*
* If hostfile was set via -f above AND EXISTS, it is used
*/
if( stat(hostfile,&statbuf) == 0) return;
/*
* Does ./wulfhosts exist? If so, use it.
*/
sprintf(hostfile,"wulfhosts");
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: Looking for ./hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
/*
* How about $HOME/.wulfhosts?
*/
eptr = getenv("HOME");
sprintf(hostfile,"%s/.wulfhosts",eptr);
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: Looking for ~/.hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
/*
* How about $WULFHOSTS
*/
eptr = getenv("WULFHOSTS");
if(eptr == NULL) {
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: No $WULFHOSTS hostfile defined.\n");
}
} else {
sprintf(hostfile,"%s",eptr);
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: Looking for $WULFHOSTS hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
}
/*
* Goodness. Not much there. How about /etc/wulfhosts.
*/
sprintf(hostfile,"/etc/wulfhosts");
if((verbose == D_ALL) || (verbose == D_PARSECL)){
printf("D_PARSECL: Looking for system hostfile: %s\n",hostfile);
}
if( stat(hostfile,&statbuf) == 0) return;
}
void Usage()
{
fprintf(stdout, "\n");
fprintf(stdout, "Usage: \n");
fprintf(stdout, " wulflogger [-h] [-v #] [-t display_type] [-d delay]\n");
fprintf(stdout, " [-c count] [-f /path/to/wulfhosts] [-l]\n");
fprintf(stdout, "\n");
fprintf(stdout, " -v number selects \"verbose\" operation for debugging, very noisy\n");
fprintf(stdout, " (-h -v displays numbers options for verbosity).\n");
fprintf(stdout, " -h prints usage statement (this message) and exits.\n");
fprintf(stdout, " -t display_type selects display type from list below.\n");
fprintf(stdout, " -d delay (in seconds) selects update loop delay (5 seconds).\n");
fprintf(stdout, " -c count loops only count times (default loops forever).\n");
fprintf(stdout, " -f /path/to/wulfhosts to use a particular wulfhosts file.\n");
fprintf(stdout, " -l show localhost only (use no wulfhosts file from any location).\n");
fprintf(stdout, "\n");
fprintf(stdout, " Display types (enter integer or character):\n");
fprintf(stdout, " b(asic): %d (default)\n",DISPLAY_BASIC);
fprintf(stdout, " l(oad): %d\n",DISPLAY_LOAD);
fprintf(stdout, " m(emory): %d\n",DISPLAY_MEMORY);
fprintf(stdout, " n(et): %d\n",DISPLAY_NET);
fprintf(stdout, " t(imes): %d\n",DISPLAY_TIMES);
fprintf(stdout, " p(ids): %d\n",DISPLAY_PIDS);
fprintf(stdout, " c(mdline): %d\n",DISPLAY_PIDS_CMDLINE);
fprintf(stdout, "\n");
if(verbose) Usagemap();
exit(0);
}
void Usagemap()
{
fprintf(stdout,"For verbose debugging output, enter:\n");
fprintf(stdout," -v %d (quiet/default)\n",D_QUIET);
fprintf(stdout," -v %d (to see almost everything)\n",D_ALL);
fprintf(stdout," -v %d main()\n",D_MAIN);
fprintf(stdout," -v %d parsecl()\n",D_PARSECL);
fprintf(stdout," -v %d startup()\n",D_STARTUP);
fprintf(stdout," -v %d work()\n",D_WORK);
fprintf(stdout," -v %d parse()\n",D_PARSE);
fprintf(stdout," -v %d connect()\n",D_CONNECT);
fprintf(stdout," -v %d init_host()\n",D_INIT_HOST);
fprintf(stdout," -v %d connect_hosts()\n",D_CONNECT_HOSTS);
fprintf(stdout," -v %d readhost()\n",D_READHOST);
fprintf(stdout," -v %d sendcmd()\n",D_SENDCMD);
fprintf(stdout," -v %d select_option()\n",D_SELECT_OPTION);
fprintf(stdout," -v %d extract_values()\n",D_EXTRACT_VALUES);
fprintf(stdout," -v %d init_values()\n",D_INIT_VALUES);
fprintf(stdout," -v %d update_values()\n",D_UPDATE_VALUES);
fprintf(stdout," -v %d values()\n",D_VALUES);
fprintf(stdout," -v %d display_values()\n",D_DISPLAY_VALUES);
fprintf(stdout," -v %d display_debug()\n",D_DISPLAY_DEBUG);
fprintf(stdout," -v %d screen()\n",D_SCREEN);
fprintf(stdout," -v %d quit()\n",D_QUIT);
fprintf(stdout,"(Some of the values above are obsolete.)\n");
}
./wulfware-2.6.0/wulflogger/values.h 0000644 0002471 0002471 00000022025 10645251201 015442 0 ustar rgb rgb /*
*========================================================================
* $Id: values.h 31 2004-02-12 18:04:42Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/* We use these for certain buffer sizes */
#define K 1024
#define K4 4096
#define K64 65536
/*
* structs and enums to hold value(s) vector(s).
*/
typedef struct {
/*
* These are the raw values, and will also serve as the
* last values in the evaluation of the rates below.
*/
long int user;
long int nice;
long int sys;
long int idle;
long int tot;
/*
* These are the rates that we actually display.
*/
double user_rate;
double nice_rate;
double sys_rate;
double idle_rate;
double tot_rate;
} Cpu;
typedef struct {
/*
* Interface identifiers
*/
char devtype[K];
char devid[K];
char name[K];
char host[K];
char ip[K];
/*
* Receive numbers. Note all these are UNSIGNED long ints...
*/
unsigned long int rx_bytes;
unsigned long int rx_packets;
unsigned long int rx_errs;
unsigned long int rx_drop;
unsigned long int rx_fifo;
unsigned long int rx_frame;
unsigned long int rx_compressed;
unsigned long int rx_multicast;
/*
* Transmit numbers
*/
unsigned long int tx_bytes;
unsigned long int tx_packets;
unsigned long int tx_errs;
unsigned long int tx_drop;
unsigned long int tx_fifo;
unsigned long int tx_collisions;
unsigned long int tx_compressed;
/*
* These are the rates that we actually display. We can add the rest
* if we ever want to build a display to show them.
*/
double rx_bytes_rate;
double rx_packets_rate;
double rx_errs_rate;
double tx_bytes_rate;
double tx_packets_rate;
double tx_errs_rate;
} Interface;
/*
* May not ever use this. Eliminate if/when cruft.
*/
typedef enum {
COUNT, /* just count them, ignore the type */
STRING,
CHAR,
INT,
LONG,
UNSIGNED_LONG,
FLOAT,
DOUBLE,
N_TYPES
} Types;
/*
* I don't think there is a "good" way to do this. Every way I can
* think of has elements that won't scale well, in part because like
* it or not, much of what we wish to present is made by a "recipe"
* from ingredients in /proc or elsewhere. Sure, some values are
* presentable raw, others are static and don't need to be re-extracted
* after the init, but we pretty much need individual, per-host indexed
* storage for field we plan to use in a recipe (or at least for the
* result of applying the recipe itself to fields directly extracted from
* the xml document(s)).
*
* SO, we're going to at least start by creating a massive "values" struct
* some of the elements of which (e.g. cpu, eth) are themselves structs
* or struct vectors. We can then allocate the whole damned thing at
* once in startup().
*
* Note that there is considerable redundancy in the values below. For
* example, hostname is defined in the parent host struct (used to contact
* the host), again in , and yet again in a .
* This is really unavoidable. Memory is cheap, and even the CPU required
* to fill it isn't that costly. We'll start this way, at any rate.
*
* Perhaps the experience of doing this will help us learn a more portable
* and scalable way of doing this for a future revision.
*
* In the meantime, we may as well start at the top xmlsysd and work down.
* We'll triply echo the tag structure -- Value, enum and path,
* plus we'll add attributes and auxiliary variables to Value as required.
*
* All strings MUST be of K length so we have an idea of how long to make
* the returns...
*/
typedef struct {
/* tags under */
/* */
unsigned long int identity_tv_sec;
unsigned long int identity_tv_usec;
char hostname[K];
char hostip[K];
/* */
unsigned long int time_tv_sec;
unsigned long int time_tv_usec;
char time[K];
/* cpuinfo */
unsigned long int cpuinfo_tv_sec;
unsigned long int cpuinfo_tv_usec;
char cpuinfo_model_name[K];
double cpuinfo_clock;
long int cpuinfo_cachesize;
/* */
unsigned long int users_tv_sec;
unsigned long int users_tv_usec;
long int users;
/* tags under */
/* */
unsigned long int stat_tv_sec;
unsigned long int stat_tv_usec;
/*
* We count the number of cpus and save it for this host, then
* allocate just the right about of space for the cpu struct vector.
* Note that there are always at least TWO entries, one for cpu_tot
* and one for cpu0. cpu_tot goes at cpu[-1] in the vector below.
* num_cpus, however is the true number of cpus in /proc/stat.
*/
long int num_cpus;
Cpu *cpu;
/* page: two raw values, two float rates */
long int page_in;
long int page_out;
double page_in_rate;
double page_out_rate;
/* swap: two raw values, two float rates */
long int swap_in;
long int swap_out;
double swap_in_rate;
double swap_out_rate;
/* intr: we only present total, one raw, one float rate */
long int intr;
double intr_rate;
/* ctxt: we only present total, one raw, one float rate */
long int ctxt;
double ctxt_rate;
/* processes: one raw, one float rate */
long int processes;
double processes_rate;
/* */
unsigned long int loadavg_tv_sec;
unsigned long int loadavg_tv_usec;
double load1;
double load5;
double load15;
/* */
unsigned long int meminfo_tv_sec;
unsigned long int meminfo_tv_usec;
unsigned long int mem_total;
unsigned long int mem_used;
unsigned long int mem_free;
unsigned long int mem_shared;
unsigned long int mem_buffers;
unsigned long int mem_cached;
unsigned long int swap_total;
unsigned long int swap_used;
unsigned long int swap_free;
/* */
unsigned long int netdev_tv_sec;
unsigned long int netdev_tv_usec;
/*
* interfaces are the contents of
*/
long int num_interfaces;
Interface *interface;
/* tcp sockets in use */
long int tcp_inuse;
/* */
unsigned long int sysvipc_tv_sec;
unsigned long int sysvipc_tv_usec;
/* uptime */
unsigned long int uptime_tv_sec;
unsigned long int uptime_tv_usec;
double uptime_up;
double uptime_idle;
double duty_cycle;
char uptime[K];
/* version */
unsigned long int version_tv_sec;
unsigned long int version_tv_usec;
char version[K];
/* */
long int pids_tv_sec;
long int pids_tv_usec;
} Value;
typedef enum {
IDENTITY,
HOSTNAME,
HOSTIP,
TIME,
USERS,
STAT,
CPU,
CPU_ID,
CPU_USER,
CPU_NICE,
CPU_SYS,
CPU_TOT,
PAGE_IN,
PAGE_OUT,
SWAP_IN,
SWAP_OUT,
INTR,
CTXT,
PROCESSES,
LOADAVG,
LOAD1,
LOAD5,
LOAD15,
MEMINFO,
MEM_TOTAL,
MEM_USED,
MEM_FREE,
MEM_SHARED,
MEM_BUFFERS,
MEM_CACHED,
SWAP_TOTAL,
SWAP_USED,
SWAP_FREE,
NETDEV,
INTERFACE,
TCP_INUSE,
CPUINFO,
CPUINFO_MODEL_NAME,
CPUINFO_CLOCK,
CPUINFO_CACHESIZE,
SYSVIPC,
SYSVIPC_MSGBUFS,
SYSVIPC_MSGTOT,
SYSVIPC_SEMBUFS,
SYSVIPC_SEMTOT,
SYSVIPC_SHMBUFS,
SYSVIPC_SHMTOT,
UPTIME,
UPTIME_UP,
UPTIME_IDLE,
VERSION,
PIDS,
} Values;
static char *value_xpath[] = {
"/xmlsysd/system/identity",
"/xmlsysd/system/identity/hostname",
"/xmlsysd/system/identity/hostip",
"/xmlsysd/system/time",
"/xmlsysd/system/users",
"/xmlsysd/proc/stat",
"/xmlsysd/proc/stat/cpu",
"/xmlsysd/proc/stat/cpu/cpuid",
"/xmlsysd/proc/stat/cpu/user",
"/xmlsysd/proc/stat/cpu/nice",
"/xmlsysd/proc/stat/cpu/sys",
"/xmlsysd/proc/stat/cpu/tot",
"/xmlsysd/proc/stat/page/in",
"/xmlsysd/proc/stat/page/out",
"/xmlsysd/proc/stat/swap/in",
"/xmlsysd/proc/stat/swap/out",
"/xmlsysd/proc/stat/intr",
"/xmlsysd/proc/stat/ctxt",
"/xmlsysd/proc/stat/processes",
"/xmlsysd/proc/loadavg",
"/xmlsysd/proc/loadavg/load1",
"/xmlsysd/proc/loadavg/load5",
"/xmlsysd/proc/loadavg/load15",
"/xmlsysd/proc/meminfo",
"/xmlsysd/proc/meminfo/memory/total",
"/xmlsysd/proc/meminfo/memory/used",
"/xmlsysd/proc/meminfo/memory/free",
"/xmlsysd/proc/meminfo/memory/shared",
"/xmlsysd/proc/meminfo/memory/buffers",
"/xmlsysd/proc/meminfo/memory/cached",
"/xmlsysd/proc/meminfo/swap/total",
"/xmlsysd/proc/meminfo/swap/used",
"/xmlsysd/proc/meminfo/swap/free",
"/xmlsysd/proc/net/dev",
"/xmlsysd/proc/net/dev/interface",
"/xmlsysd/proc/net/sockstat/tcp/inuse",
"/xmlsysd/proc/cpuinfo",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/model_name",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/clock",
"/xmlsysd/proc/cpuinfo/processor[@id='0']/cachesize",
"/xmlsysd/proc/sysvipc",
"/xmlsysd/proc/sysvipc/msgbufs",
"/xmlsysd/proc/sysvipc/msgtot",
"/xmlsysd/proc/sysvipc/sembufs",
"/xmlsysd/proc/sysvipc/semtot",
"/xmlsysd/proc/sysvipc/shmbufs",
"/xmlsysd/proc/sysvipc/shmtot",
"/xmlsysd/proc/uptime",
"/xmlsysd/proc/uptime/up",
"/xmlsysd/proc/uptime/idle",
"/xmlsysd/proc/version",
"/xmlsysd/pids",
"n_values"
};
./wulfware-2.6.0/wulflogger/llist.h 0000644 0002471 0002471 00000002452 10645251201 015274 0 ustar rgb rgb /*
*========================================================================
* $Id: llist.h 31 2004-02-12 18:04:42Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
* (Doubly) Linked list interface. We double link it to make it
* easier to remove an element -- walk until we find it, free the
* data pointer, put its next pointer into the next pointer of its
* previous pointer, and free the element.
*
* We need to define an element in the list
*/
#include
typedef struct ListElement {
void *data; /* Contents of THIS list element */
struct ListElement *prev; /* Pointer to the PREVIOUS list element */
struct ListElement *next; /* Pointer to the NEXT list element */
} ListElement;
/*
* Then we need to define the list itself -- basically a wrapper
* struct that contains pointers to the head and tail of the (doubly
* linked) list.
*/
typedef struct List_ {
int size; /* Number of elements */
struct ListElement *head; /* starting point for a walkthrough */
struct ListElement *tail; /* endpoint of a walkthrough */
} List;
List *newlist();
void add_list(List *list,void *data,int size);
void rm_list(List *list,void *data,int size);
void delete_list(List *list);
./wulfware-2.6.0/wulflogger/commands.h 0000644 0002471 0002471 00000006565 10645251201 015757 0 ustar rgb rgb /*
*========================================================================
* $Id: commands.h 31 2004-02-12 18:04:42Z rgb $
*
* See copyright in copyright.h and the accompanying file COPYING
*========================================================================
*/
/*
* Needed to define List below (linked list interface).
*/
#include "llist.h"
/*
* The following enumerates and defines all the base
* commands recognized by xmlsysd.
*
* init - opens all /proc files and does a sendall. Note that
* toggling a proc-derived field group does NOT cause the
* files to be closed -- they just aren't rewound and
* processed and sent on a "send" command. This command
* should therefore be the first thing sent to the daemon.
* sendall - sends all non-PID fields, regardless of the state of their
* toggle controls. PID fields are sent according to their
* controls, which may be in their default (running, no root)
* state.
* send - sends an update of all fields according to the state of
* their controls.
* on fgrp1 [fgrp2 fgrp3...]
* - turns the control toggle for a given list of field groups
* "on" (send if available).
* off fgrp1 [fgrp2 fgpr3...]
* - turns the control toggle for a given list of field groups
* "off" (do NOT send).
* adduser X - causes user X to be added to the user list. If this list
* is not empty, only processes belonging to users on this
* list are monitored.
* rmuser X - removes user X from the user list, if they are there to
* begin with.
* clrusers - clears user list.
* addtask X - causes task X to be added to the task list. If this list
* is not empty, only processes whose name matches an entry on
* this list are monitored.
* rmtask X - removes task X from the task list, if it is there to be
* removed.
* clrtask - clears task list.
*
* Note that user/task controls are combined with an "and"
* operator to facilitate task exclusion over inclusion.
* If both lists are non-empty, only tasks matching one of
* the task names belonging to users matching one of the
* user names are monitored. However, if either list is
* empty, only the other list is used -- a null list is
* is promiscuous.
*
* compress - short for off whitespace;on compress (minimum packet size).
* expand - short for on whitespace;off compress (easiest to read).
*
* verbose N - controls verbosity (for debugging only).
* quit - causes this instance of xmlsysd to exit.
*/
typedef enum {
INIT,
SENDALL,
SEND,
ON,
OFF,
ADDUSER,
RMUSER,
CLRUSER,
ADDTASK,
RMTASK,
CLRTASK,
COMPRESS,
EXPAND,
VERBOSE,
QUIT,
N_COMMANDS
} Commands;
/*
* if you add new commands that share leading characters (like sendall and
* send) be sure the LONGEST one is first or the shorter one will match
* accidentally in the parsing loop.
*/
static char *commands[] = {
"init",
"sendall",
"send",
"on",
"off",
"adduser",
"rmuser",
"clruser",
"addtask",
"rmtask",
"clrtask",
"compress",
"expand",
"verbose",
"quit",
"n_commands"
};
./wulfware-2.6.0/wulflogger/copyright.h 0000644 0002471 0002471 00000001261 10645251201 016152 0 ustar rgb rgb /*
*
* Copyright (c) 2001 by Robert G. Brown, rgb@phy.duke.edu
*
* GPL version 2b (b for beverage) granted as given
* in the file COPYING in the parent wulfware source tree
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
*/
./wulfware-2.6.0/Copyright 0000644 0002471 0002471 00000001422 10645251201 013506 0 ustar rgb rgb /*
* wulfware
*
* includes: libwulf, xmlsysd, wulfstat, wulflogger, wulf2html packages
*
* Copyright (c) 2007 by Robert G. Brown, rgb@phy.duke.edu
* GPL version 2b (b for beverage) granted as given
* in the file COPYING in this distribution.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*
*/
./wulfware-2.6.0/configure 0000755 0002471 0002471 00001335363 10645251201 013541 0 ustar rgb rgb #! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for wulfware 2.6.0.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
## M4sh Initialization. ##
## --------------------- ##
# Be Bourne compatible
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
emulate sh
NULLCMD=:
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
# is contrary to our usage. Disable this feature.
alias -g '${1+"$@"}'='"$@"'
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
DUALCASE=1; export DUALCASE # for MKS sh
# Support unset when possible.
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
PS2='> '
PS4='+ '
# NLS nuisances.
for as_var in \
LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
LC_TELEPHONE LC_TIME
do
if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
fi
done
# Required to use basename.
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
as_basename=basename
else
as_basename=false
fi
# Name of the executable.
as_me=`$as_basename "$0" ||
$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)$' \| \
. : '\(.\)' 2>/dev/null ||
echo X/"$0" |
sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
/^X\/\(\/\/\)$/{ s//\1/; q; }
/^X\/\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
# PATH needs CR, and LINENO needs CR and PATH.
# Avoid depending upon Character Ranges.
as_cr_letters='abcdefghijklmnopqrstuvwxyz'
as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
as_cr_Letters=$as_cr_letters$as_cr_LETTERS
as_cr_digits='0123456789'
as_cr_alnum=$as_cr_Letters$as_cr_digits
# The user is always right.
if test "${PATH_SEPARATOR+set}" != set; then
echo "#! /bin/sh" >conf$$.sh
echo "exit 0" >>conf$$.sh
chmod +x conf$$.sh
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
PATH_SEPARATOR=';'
else
PATH_SEPARATOR=:
fi
rm -f conf$$.sh
fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" || {
# Find who we are. Look in the path if we contain no path at all
# relative or not.
case $0 in
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
done
;;
esac
# We did not find ourselves, most probably we were run as `sh COMMAND'
# in which case we are not to be found in the path.
if test "x$as_myself" = x; then
as_myself=$0
fi
if test ! -f "$as_myself"; then
{ echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
{ (exit 1); exit 1; }; }
fi
case $CONFIG_SHELL in
'')
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for as_base in sh bash ksh sh5; do
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
$as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
$as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$0" ${1+"$@"}
fi;;
esac
done
done
;;
esac
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
# line-number line before each line; the second 'sed' does the real
# work. The second script uses 'N' to pair each line-number line
# with the numbered line, and appends trailing '-' during
# substitution so that $LINENO is not a special case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
# second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
sed '=' <$as_myself |
sed '
N
s,$,-,
: loop
s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
t loop
s,-$,,
s,^['$as_cr_digits']*\n,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
{ (exit 1); exit 1; }; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensible to this).
. ./$as_me.lineno
# Exit status is that of the last command.
exit
}
case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
*c*,-n*) ECHO_N= ECHO_C='
' ECHO_T=' ' ;;
*c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
*) ECHO_N= ECHO_C='\c' ECHO_T= ;;
esac
if expr a : '\(a\)' >/dev/null 2>&1; then
as_expr=expr
else
as_expr=false
fi
rm -f conf$$ conf$$.exe conf$$.file
echo >conf$$.file
if ln -s conf$$.file conf$$ 2>/dev/null; then
# We could just check for DJGPP; but this test a) works b) is more generic
# and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
if test -f conf$$.exe; then
# Don't use ln at all; we don't have any links
as_ln_s='cp -p'
else
as_ln_s='ln -s'
fi
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
# Sed expression to map a string onto a valid variable name.
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
# We need space, tab and new line, in precisely that order.
as_nl='
'
IFS=" $as_nl"
# CDPATH.
$as_unset CDPATH
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
case X$ECHO in
X*--fallback-echo)
# Remove one level of quotation (which was required for Make).
ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
;;
esac
echo=${ECHO-echo}
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
# Yippee, $echo works!
:
else
# Restart under the correct shell.
exec $SHELL "$0" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat </dev/null 2>&1 && unset CDPATH
if test -z "$ECHO"; then
if test "X${echo_test_string+set}" != Xset; then
# find a string as large as possible, as long as the shell can cope with it
for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
# expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
if (echo_test_string=`eval $cmd`) 2>/dev/null &&
echo_test_string=`eval $cmd` &&
(test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
then
break
fi
done
fi
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
:
else
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
#
# So, first we look for a working echo in the user's PATH.
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
IFS="$lt_save_ifs"
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$dir/echo"
break
fi
done
IFS="$lt_save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
test "X$CONFIG_SHELL" != X/bin/ksh; then
# If we have ksh, try running configure again with it.
ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
export ORIGINAL_CONFIG_SHELL
CONFIG_SHELL=/bin/ksh
export CONFIG_SHELL
exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
else
# Try using printf.
echo='printf %s\n'
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
# Cool, printf works
:
elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
export CONFIG_SHELL
SHELL="$CONFIG_SHELL"
export SHELL
echo="$CONFIG_SHELL $0 --fallback-echo"
elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
test "X$echo_testing_string" = 'X\t' &&
echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
test "X$echo_testing_string" = "X$echo_test_string"; then
echo="$CONFIG_SHELL $0 --fallback-echo"
else
# maybe with a smaller string...
prev=:
for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
then
break
fi
prev="$cmd"
done
if test "$prev" != 'sed 50q "$0"'; then
echo_test_string=`eval $prev`
export echo_test_string
exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
else
# Oops. We lost completely, so just stick with echo.
echo=echo
fi
fi
fi
fi
fi
fi
# Copy echo and quote the copy suitably for passing to libtool from
# the Makefile, instead of quoting the original, which is used later.
ECHO=$echo
if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
fi
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
exec 6>&1
#
# Initializations.
#
ac_default_prefix=/usr/local
ac_config_libobj_dir=.
cross_compiling=no
subdirs=
MFLAGS=
MAKEFLAGS=
SHELL=${CONFIG_SHELL-/bin/sh}
# Maximum number of lines to put in a shell here document.
# This variable seems obsolete. It should probably be removed, and
# only ac_max_sed_lines should be used.
: ${ac_max_here_lines=38}
# Identity of this package.
PACKAGE_NAME='wulfware'
PACKAGE_TARNAME='wulfware'
PACKAGE_VERSION='2.6.0'
PACKAGE_STRING='wulfware 2.6.0'
PACKAGE_BUGREPORT=''
ac_unique_file="Copyright"
# Factoring default headers for most tests.
ac_includes_default="\
#include
#if HAVE_SYS_TYPES_H
# include
#endif
#if HAVE_SYS_STAT_H
# include
#endif
#if STDC_HEADERS
# include
# include
#else
# if HAVE_STDLIB_H
# include
# endif
#endif
#if HAVE_STRING_H
# if !STDC_HEADERS && HAVE_MEMORY_H
# include
# endif
# include
#endif
#if HAVE_STRINGS_H
# include
#endif
#if HAVE_INTTYPES_H
# include
#else
# if HAVE_STDINT_H
# include
# endif
#endif
#if HAVE_UNISTD_H
# include
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS RELEASE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT WULFWARE_LT_VERSION RELEASED build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE RANLIB ac_ct_RANLIB SED EGREP LN_S ECHO AR ac_ct_AR CPP LIBTOOL WULFWARE_CFLAGS WULFWARE_LIBS LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
ac_init_help=
ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
cache_file=/dev/null
exec_prefix=NONE
no_create=
no_recursion=
prefix=NONE
program_prefix=NONE
program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
srcdir=
verbose=
x_includes=NONE
x_libraries=NONE
# Installation directory options.
# These are left unexpanded so users can "make install exec_prefix=/foo"
# and all the variables that are supposed to be based on exec_prefix
# by default will actually change.
# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
datadir='${prefix}/share'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
libdir='${exec_prefix}/lib'
includedir='${prefix}/include'
oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
ac_prev=
for ac_option
do
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
ac_prev=
continue
fi
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
cache_file=$ac_optarg ;;
--config-cache | -C)
cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
datadir=$ac_optarg ;;
-disable-* | --disable-*)
ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid feature name: $ac_feature" >&2
{ (exit 1); exit 1; }; }
ac_feature=`echo $ac_feature | sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
| --exec | --exe | --ex)
ac_prev=exec_prefix ;;
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
-help | --help | --hel | --he | -h)
ac_init_help=long ;;
-help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
ac_init_help=recursive ;;
-help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
ac_init_help=short ;;
-host | --host | --hos | --ho)
ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
| --locals | --local | --loca | --loc | --lo)
ac_prev=localstatedir ;;
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
| --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
| --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
no_recursion=yes ;;
-oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
| --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
| --oldin | --oldi | --old | --ol | --o)
ac_prev=oldincludedir ;;
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
| --program-transform-n | --program-transform- \
| --program-transform | --program-transfor \
| --program-transfo | --program-transf \
| --program-trans | --program-tran \
| --progr-tra | --program-tr | --program-t)
ac_prev=program_transform_name ;;
-program-transform-name=* | --program-transform-name=* \
| --program-transform-nam=* | --program-transform-na=* \
| --program-transform-n=* | --program-transform-=* \
| --program-transform=* | --program-transfor=* \
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
| --sharedst | --shareds | --shared | --share | --shar \
| --sha | --sh)
ac_prev=sharedstatedir ;;
-sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
-version | --version | --versio | --versi | --vers | -V)
ac_init_version=: ;;
-with-* | --with-*)
ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
case $ac_option in
*=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid package name: $ac_package" >&2
{ (exit 1); exit 1; }; }
ac_package=`echo $ac_package | sed 's/-/_/g'`
eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
with_x=yes ;;
-x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
| --x-incl | --x-inc | --x-in | --x-i)
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
-*) { echo "$as_me: error: unrecognized option: $ac_option
Try \`$0 --help' for more information." >&2
{ (exit 1); exit 1; }; }
;;
*=*)
ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
# Reject names that are not valid shell variable names.
expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
{ echo "$as_me: error: invalid variable name: $ac_envvar" >&2
{ (exit 1); exit 1; }; }
ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
eval "$ac_envvar='$ac_optarg'"
export $ac_envvar ;;
*)
# FIXME: should be removed in autoconf 3.0.
echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
echo "$as_me: WARNING: invalid host type: $ac_option" >&2
: ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
{ echo "$as_me: error: missing argument to $ac_option" >&2
{ (exit 1); exit 1; }; }
fi
# Be sure to have absolute paths.
for ac_var in exec_prefix prefix
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* | NONE | '' ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
[\\/$]* | ?:[\\/]* ) ;;
*) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
{ (exit 1); exit 1; }; };;
esac
done
# There might be people who depend on the old broken behavior: `$host'
# used to hold the argument of --host etc.
# FIXME: To remove some day.
build=$build_alias
host=$host_alias
target=$target_alias
# FIXME: To remove some day.
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
If a cross compiler is detected then cross compile mode will be used." >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
fi
ac_tool_prefix=
test -n "$host_alias" && ac_tool_prefix=$host_alias-
test "$silent" = yes && exec 6>/dev/null
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$0" : 'X\(//\)[^/]' \| \
X"$0" : 'X\(//\)$' \| \
X"$0" : 'X\(/\)' \| \
. : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
/^X\(\/\/\)$/{ s//\1/; q; }
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
fi
else
ac_srcdir_defaulted=no
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
{ (exit 1); exit 1; }; }
else
{ echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
{ (exit 1); exit 1; }; }
fi
fi
(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
{ echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
{ (exit 1); exit 1; }; }
srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
ac_env_build_alias_set=${build_alias+set}
ac_env_build_alias_value=$build_alias
ac_cv_env_build_alias_set=${build_alias+set}
ac_cv_env_build_alias_value=$build_alias
ac_env_host_alias_set=${host_alias+set}
ac_env_host_alias_value=$host_alias
ac_cv_env_host_alias_set=${host_alias+set}
ac_cv_env_host_alias_value=$host_alias
ac_env_target_alias_set=${target_alias+set}
ac_env_target_alias_value=$target_alias
ac_cv_env_target_alias_set=${target_alias+set}
ac_cv_env_target_alias_value=$target_alias
ac_env_CC_set=${CC+set}
ac_env_CC_value=$CC
ac_cv_env_CC_set=${CC+set}
ac_cv_env_CC_value=$CC
ac_env_CFLAGS_set=${CFLAGS+set}
ac_env_CFLAGS_value=$CFLAGS
ac_cv_env_CFLAGS_set=${CFLAGS+set}
ac_cv_env_CFLAGS_value=$CFLAGS
ac_env_LDFLAGS_set=${LDFLAGS+set}
ac_env_LDFLAGS_value=$LDFLAGS
ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
ac_cv_env_LDFLAGS_value=$LDFLAGS
ac_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_env_CPPFLAGS_value=$CPPFLAGS
ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
ac_cv_env_CPPFLAGS_value=$CPPFLAGS
ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
#
# Report the --help message.
#
if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures wulfware 2.6.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print \`checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or \`..']
_ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
an installation prefix other than \`$ac_default_prefix' using \`--prefix',
for instance \`--prefix=\$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--datadir=DIR read-only architecture-independent data [PREFIX/share]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--infodir=DIR info documentation [PREFIX/info]
--mandir=DIR man documentation [PREFIX/man]
_ACEOF
cat <<\_ACEOF
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
_ACEOF
fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of wulfware 2.6.0:";;
esac
cat <<\_ACEOF
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-maintainer-mode enable make rules and dependencies not useful
(and sometimes confusing) to the casual installer
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--enable-shared[=PKGS]
build shared libraries [default=yes]
--enable-static[=PKGS]
build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-tags[=TAGS]
include additional configurations [automatic]
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L if you have libraries in a
nonstandard directory
CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have
headers in a nonstandard directory
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
_ACEOF
fi
if test "$ac_init_help" = "recursive"; then
# If there are subdirs, report their specific --help.
ac_popdir=`pwd`
for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
test -d $ac_dir || continue
ac_builddir=.
if test "$ac_dir" != .; then
ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
# A "../" for each directory in $ac_dir_suffix.
ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
else
ac_dir_suffix= ac_top_builddir=
fi
case $srcdir in
.) # No --srcdir option. We are building in place.
ac_srcdir=.
if test -z "$ac_top_builddir"; then
ac_top_srcdir=.
else
ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
fi ;;
[\\/]* | ?:[\\/]* ) # Absolute path.
ac_srcdir=$srcdir$ac_dir_suffix;
ac_top_srcdir=$srcdir ;;
*) # Relative path.
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
# Do not use `cd foo && pwd` to compute absolute paths, because
# the directories may not exist.
case `pwd` in
.) ac_abs_builddir="$ac_dir";;
*)
case "$ac_dir" in
.) ac_abs_builddir=`pwd`;;
[\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
*) ac_abs_builddir=`pwd`/"$ac_dir";;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_builddir=${ac_top_builddir}.;;
*)
case ${ac_top_builddir}. in
.) ac_abs_top_builddir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
*) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_srcdir=$ac_srcdir;;
*)
case $ac_srcdir in
.) ac_abs_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
*) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
esac;;
esac
case $ac_abs_builddir in
.) ac_abs_top_srcdir=$ac_top_srcdir;;
*)
case $ac_top_srcdir in
.) ac_abs_top_srcdir=$ac_abs_builddir;;
[\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
*) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
esac;;
esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
if test -f $ac_srcdir/configure.gnu; then
echo
$SHELL $ac_srcdir/configure.gnu --help=recursive
elif test -f $ac_srcdir/configure; then
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
fi
cd $ac_popdir
done
fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
wulfware configure 2.6.0
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
exit 0
fi
exec 5>config.log
cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by wulfware $as_me 2.6.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
_ACEOF
{
cat <<_ASUNAME
## --------- ##
## Platform. ##
## --------- ##
hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
_ASUNAME
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
echo "PATH: $as_dir"
done
} >&5
cat >&5 <<_ACEOF
## ----------- ##
## Core tests. ##
## ----------- ##
_ACEOF
# Keep a trace of the command line.
# Strip out --no-create and --no-recursion so they do not pile up.
# Strip out --silent because we don't want to record it for future runs.
# Also quote any args containing shell meta-characters.
# Make two passes to allow for proper duplicate-argument suppression.
ac_configure_args=
ac_configure_args0=
ac_configure_args1=
ac_sep=
ac_must_keep_next=false
for ac_pass in 1 2
do
for ac_arg
do
case $ac_arg in
-no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
continue ;;
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
esac
case $ac_pass in
1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
2)
ac_configure_args1="$ac_configure_args1 '$ac_arg'"
if test $ac_must_keep_next = true; then
ac_must_keep_next=false # Got value, back to normal.
else
case $ac_arg in
*=* | --config-cache | -C | -disable-* | --disable-* \
| -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
| -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
| -with-* | --with-* | -without-* | --without-* | --x)
case "$ac_configure_args0 " in
"$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
esac
;;
-* ) ac_must_keep_next=true ;;
esac
fi
ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
# Get rid of the leading space.
ac_sep=" "
;;
esac
done
done
$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
# would cause problems or look ugly.
# WARNING: Be sure not to use single quotes in there, as some shells,
# such as our DU 5.0 friend, will then `close' the trap.
trap 'exit_status=$?
# Save into config.log some information that might help in debugging.
{
echo
cat <<\_ASBOX
## ---------------- ##
## Cache variables. ##
## ---------------- ##
_ASBOX
echo
# The following way of writing the cache mishandles newlines in values,
{
(set) 2>&1 |
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
echo
cat <<\_ASBOX
## ----------------- ##
## Output variables. ##
## ----------------- ##
_ASBOX
echo
for ac_var in $ac_subst_vars
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
if test -n "$ac_subst_files"; then
cat <<\_ASBOX
## ------------- ##
## Output files. ##
## ------------- ##
_ASBOX
echo
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
if test -s confdefs.h; then
cat <<\_ASBOX
## ----------- ##
## confdefs.h. ##
## ----------- ##
_ASBOX
echo
sed "/^$/d" confdefs.h | sort
echo
fi
test "$ac_signal" != 0 &&
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
rm -f core *.core &&
rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo >confdefs.h
# Predefined preprocessor variables.
cat >>confdefs.h <<_ACEOF
#define PACKAGE_NAME "$PACKAGE_NAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION "$PACKAGE_VERSION"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_STRING "$PACKAGE_STRING"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
_ACEOF
# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
else
CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
fi
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
{ echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
# Some versions of bash will fail to source /dev/null (special
# files actually), so we avoid doing that.
if test -f "$cache_file"; then
{ echo "$as_me:$LINENO: loading cache $cache_file" >&5
echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
[\\/]* | ?:[\\/]* ) . $cache_file;;
*) . ./$cache_file;;
esac
fi
else
{ echo "$as_me:$LINENO: creating cache $cache_file" >&5
echo "$as_me: creating cache $cache_file" >&6;}
>$cache_file
fi
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
eval ac_old_set=\$ac_cv_env_${ac_var}_set
eval ac_new_set=\$ac_env_${ac_var}_set
eval ac_old_val="\$ac_cv_env_${ac_var}_value"
eval ac_new_val="\$ac_env_${ac_var}_value"
case $ac_old_set,$ac_new_set in
set,)
{ echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
ac_cache_corrupted=: ;;
,set)
{ echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
ac_cache_corrupted=: ;;
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
{ echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
{ echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
if test "$ac_new_set" = set; then
case $ac_new_val in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
*) ac_arg=$ac_var=$ac_new_val ;;
esac
case " $ac_configure_args " in
*" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
*) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
esac
fi
done
if $ac_cache_corrupted; then
{ echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
echo "$as_me: error: changes in the environment can compromise the build" >&2;}
{ { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
RELEASE=0
am__api_version="1.9"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
break
elif test -f $ac_dir/install.sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install.sh -c"
break
elif test -f $ac_dir/shtool; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/shtool install -c"
break
fi
done
if test -z "$ac_aux_dir"; then
{ { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_config_guess="$SHELL $ac_aux_dir/config.guess"
ac_config_sub="$SHELL $ac_aux_dir/config.sub"
ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
done
done
;;
esac
done
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL=$ac_install_sh
fi
fi
echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether build environment is sane" >&5
echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
# Just in case
sleep 1
echo timestamp > conftest.file
# Do `set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t $srcdir/configure conftest.file`
fi
rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
{ { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&5
echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment" >&2;}
{ (exit 1); exit 1; }; }
fi
test "$2" = conftest.file
)
then
# Ok.
:
else
{ { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
Check your system clock" >&5
echo "$as_me: error: newly created file is older than distributed files!
Check your system clock" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
test "$program_prefix" != NONE &&
program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $. echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
{ echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
fi
if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
# We used to keeping the `.' as first argument, in order to
# allow $(mkdir_p) to be used without argument. As in
# $(mkdir_p) $(somedir)
# where $(somedir) is conditionally defined. However this is wrong
# for two reasons:
# 1. if the package is installed by a user who cannot write `.'
# make install will fail,
# 2. the above comment should most certainly read
# $(mkdir_p) $(DESTDIR)$(somedir)
# so it does not work when $(somedir) is undefined and
# $(DESTDIR) is not.
# To support the latter case, we have to write
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
# so the `.' trick is pointless.
mkdir_p='mkdir -p --'
else
# On NextStep and OpenStep, the `mkdir' command does not
# recognize any option. It will interpret all options as
# directories to create, and then abort because `.' already
# exists.
for d in ./-p ./--version;
do
test -d $d && rmdir $d
done
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
if test -f "$ac_aux_dir/mkinstalldirs"; then
mkdir_p='$(mkinstalldirs)'
else
mkdir_p='$(install_sh) -d'
fi
fi
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AWK+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AWK"; then
ac_cv_prog_AWK="$AWK" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
AWK=$ac_cv_prog_AWK
if test -n "$AWK"; then
echo "$as_me:$LINENO: result: $AWK" >&5
echo "${ECHO_T}$AWK" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$AWK" && break
done
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
# test to see if srcdir already configured
if test "`cd $srcdir && pwd`" != "`pwd`" &&
test -f $srcdir/config.status; then
{ { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
{ (exit 1); exit 1; }; }
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
# Define the identity of the package.
PACKAGE='wulfware'
VERSION='2.6.0'
cat >>confdefs.h <<_ACEOF
#define PACKAGE "$PACKAGE"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define VERSION "$VERSION"
_ACEOF
# Some tools Automake needs.
ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
install_sh=${install_sh-"$am_aux_dir/install-sh"}
# Installed binaries are usually stripped using `strip' when the user
# run `make install-strip'. However `strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the `STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
echo "$as_me:$LINENO: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
echo "${ECHO_T}$ac_ct_STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
STRIP=$ac_ct_STRIP
else
STRIP="$ac_cv_prog_STRIP"
fi
fi
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
# Always define AMTAR for backward compatibility.
AMTAR=${AMTAR-"${am_missing_run}tar"}
am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
ac_config_headers="$ac_config_headers config.h"
echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode"
USE_MAINTAINER_MODE=$enableval
else
USE_MAINTAINER_MODE=no
fi;
echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
if test $USE_MAINTAINER_MODE = yes; then
MAINTAINER_MODE_TRUE=
MAINTAINER_MODE_FALSE='#'
else
MAINTAINER_MODE_TRUE='#'
MAINTAINER_MODE_FALSE=
fi
MAINT=$MAINTAINER_MODE_TRUE
cat >>confdefs.h <<\_ACEOF
#define RELEASED
_ACEOF
WULFWARE_LT_VERSION="0:0:0"
case "$VERSION" in
*+)
cat >>confdefs.h <<\_ACEOF
#define RELEASED 0
_ACEOF
;;
*)
cat >>confdefs.h <<\_ACEOF
#define RELEASED 1
_ACEOF
;;
esac
# Check for which system.
# Make sure we can run config.sub.
$ac_config_sub sun4 >/dev/null 2>&1 ||
{ { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
echo "$as_me: error: cannot run $ac_config_sub" >&2;}
{ (exit 1); exit 1; }; }
echo "$as_me:$LINENO: checking build system type" >&5
echo $ECHO_N "checking build system type... $ECHO_C" >&6
if test "${ac_cv_build+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_build_alias=$build_alias
test -z "$ac_cv_build_alias" &&
ac_cv_build_alias=`$ac_config_guess`
test -z "$ac_cv_build_alias" &&
{ { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
{ (exit 1); exit 1; }; }
ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
{ { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: $ac_cv_build" >&5
echo "${ECHO_T}$ac_cv_build" >&6
build=$ac_cv_build
build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$as_me:$LINENO: checking host system type" >&5
echo $ECHO_N "checking host system type... $ECHO_C" >&6
if test "${ac_cv_host+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_host_alias=$host_alias
test -z "$ac_cv_host_alias" &&
ac_cv_host_alias=$ac_cv_build_alias
ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
{ { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
{ (exit 1); exit 1; }; }
fi
echo "$as_me:$LINENO: result: $ac_cv_host" >&5
echo "${ECHO_T}$ac_cv_host" >&6
host=$ac_cv_host
host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Checks for programs.
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
set dummy ${ac_tool_prefix}cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_CC"; then
ac_ct_CC=$CC
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
CC=$ac_ct_CC
else
CC="$ac_cv_prog_CC"
fi
fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
ac_prog_rejected=no
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
fi
ac_cv_prog_CC="cc"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
fi
fi
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$CC"; then
if test -n "$ac_tool_prefix"; then
for ac_prog in cl
do
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
CC=$ac_cv_prog_CC
if test -n "$CC"; then
echo "$as_me:$LINENO: result: $CC" >&5
echo "${ECHO_T}$CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$CC" && break
done
fi
if test -z "$CC"; then
ac_ct_CC=$CC
for ac_prog in cl
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_CC"; then
ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
ac_ct_CC=$ac_cv_prog_ac_ct_CC
if test -n "$ac_ct_CC"; then
echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
echo "${ECHO_T}$ac_ct_CC" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -n "$ac_ct_CC" && break
done
CC=$ac_ct_CC
fi
fi
test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&5
echo "$as_me: error: no acceptable C compiler found in \$PATH
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
echo "$as_me:$LINENO:" \
"checking for C compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5
(eval $ac_compiler --version &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5
(eval $ac_compiler -v &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5
(eval $ac_compiler -V &5) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files a.out a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Find the output, starting from the most likely. This scheme is
# not robust to junk in `.', hence go to wildcards (a.*) only as a last
# resort.
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
# b.out is created by i960 compilers.
for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
;;
conftest.$ac_ext )
# This is the source file.
;;
[ab].out )
# We found the default executable, but exeext='' is most
# certainly right.
break;;
*.* )
ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
# FIXME: I believe we export ac_cv_exeext for Libtool,
# but it would be cool to find out if it's true. Does anybody
# maintain Libtool? --akim.
export ac_cv_exeext
break;;
* )
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
ac_exeext=$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_file" >&5
echo "${ECHO_T}$ac_file" >&6
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether the C compiler works" >&5
echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
# If not cross compiling, check that we can run a simple program.
if test "$cross_compiling" != yes; then
if { ac_try='./$ac_file'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
cross_compiling=no
else
if test "$cross_compiling" = maybe; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $cross_compiling" >&5
echo "${ECHO_T}$cross_compiling" >&6
echo "$as_me:$LINENO: checking for suffix of executables" >&5
echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# If both `conftest.exe' and `conftest' are `present' (well, observable)
# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
# work properly (i.e., refer to `conftest.exe'), while it won't with
# `rm'.
for ac_file in conftest.exe conftest conftest.*; do
test -f "$ac_file" || continue
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
export ac_cv_exeext
break;;
* ) break;;
esac
done
else
{ { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest$ac_cv_exeext
echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
echo "${ECHO_T}$ac_cv_exeext" >&6
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
echo "$as_me:$LINENO: checking for suffix of object files" >&5
echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.o conftest.obj
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
*) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
break;;
esac
done
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&5
echo "$as_me: error: cannot compute suffix of object files: cannot compile
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
echo "${ECHO_T}$ac_cv_objext" >&6
OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
#ifndef __GNUC__
choke me
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_compiler_gnu=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
GCC=`test $ac_compiler_gnu = yes && echo yes`
ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
CFLAGS="-g"
echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_prog_cc_g=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
else
CFLAGS="-g"
fi
else
if test "$GCC" = yes; then
CFLAGS="-O2"
else
CFLAGS=
fi
fi
echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
if test "${ac_cv_prog_cc_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
static char *e (p, i)
char **p;
int i;
{
return p[i];
}
static char *f (char * (*g) (char **, int), char **p, ...)
{
char *s;
va_list v;
va_start (v,p);
s = g (p, va_arg (v,int));
va_end (v);
return s;
}
/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
function prototypes and stuff, but not '\xHH' hex character constants.
These don't provoke an error unfortunately, instead are silently treated
as 'x'. The following induces an error, until -std1 is added to get
proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
array size at least. It's necessary to write '\x00'==0 to get something
that's true only with -std1. */
int osf4_cc_array ['\x00' == 0 ? 1 : -1];
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
int argc;
char **argv;
int
main ()
{
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
;
return 0;
}
_ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
# Ultrix and OSF/1 -std1
# HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_prog_cc_stdc=$ac_arg
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
fi
case "x$ac_cv_prog_cc_stdc" in
x|xno)
echo "$as_me:$LINENO: result: none needed" >&5
echo "${ECHO_T}none needed" >&6 ;;
*)
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
CC="$CC $ac_cv_prog_cc_stdc" ;;
esac
# Some people use a C++ compiler to compile C. Since we use `exit',
# in C++ we need to declare it. In case someone uses the same compiler
# for both compiling C and C++ we need to have the C++ compiler decide
# the declaration of exit, since it's the most demanding environment.
cat >conftest.$ac_ext <<_ACEOF
#ifndef __cplusplus
choke me
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
'' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
'extern "C" void exit (int);' \
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
#include
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
continue
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_declaration
int
main ()
{
exit (42);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
echo '#ifdef __cplusplus' >>confdefs.h
echo $ac_declaration >>confdefs.h
echo '#endif' >>confdefs.h
fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo done
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# We grep out `Entering directory' and `Leaving directory'
# messages which can occur if `w' ends up in MAKEFLAGS.
# In particular we don't look at `^make:' because GNU make might
# be invoked under some other name (usually "gmake"), in which
# case it prints its new name instead of `make'.
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
am__include=include
am__quote=
_am_result=GNU
fi
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
am__include=.include
am__quote="\""
_am_result=BSD
fi
fi
echo "$as_me:$LINENO: result: $_am_result" >&5
echo "${ECHO_T}$_am_result" >&6
rm -f confinc confmf
# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
if test "${enable_dependency_tracking+set}" = set; then
enableval="$enable_dependency_tracking"
fi;
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
AMDEP_FALSE='#'
else
AMDEP_TRUE='#'
AMDEP_FALSE=
fi
depcc="$CC" am_compiler_list=
echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_CC_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
fi
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
# Solaris 8's {/usr,}/bin/sh.
touch sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
case $depmode in
nosideeffect)
# after this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
none) break ;;
esac
# We check with `-c' and `-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle `-M -o', and we need to detect this.
if depmode=$depmode \
source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_CC_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_CC_dependencies_compiler_type=none
fi
fi
echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
if
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
am__fastdepCC_TRUE=
am__fastdepCC_FALSE='#'
else
am__fastdepCC_TRUE='#'
am__fastdepCC_FALSE=
fi
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
# incompatible versions:
# SysV /etc/install, /usr/sbin/install
# SunOS /usr/etc/install
# IRIX /sbin/install
# AIX /bin/install
# AmigaOS /C/install, which installs bootblocks on floppy discs
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# OS/2's system install, which has a completely different semantic
# ./install, which can be erroneously created by make from ./install.sh.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
if test -z "$INSTALL"; then
if test "${ac_cv_path_install+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
# Account for people who put trailing slashes in PATH elements.
case $as_dir/ in
./ | .// | /cC/* | \
/etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
/usr/ucb/* ) ;;
*)
# OSF1 and SCO ODT 3.0 have their own names for install.
# Don't use installbsd from OSF since it installs stuff as root
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
:
elif test $ac_prog = install &&
grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# program-specific install script used by HP pwplus--don't use.
:
else
ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
break 3
fi
fi
done
done
;;
esac
done
fi
if test "${ac_cv_path_install+set}" = set; then
INSTALL=$ac_cv_path_install
else
# As a last resort, use the slow shell script. We don't cache a
# path for INSTALL within a source directory, because that will
# break other packages using the cache if that directory is
# removed, or if the path is relative.
INSTALL=$ac_install_sh
fi
fi
echo "$as_me:$LINENO: result: $INSTALL" >&5
echo "${ECHO_T}$INSTALL" >&6
# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
# It thinks the first close brace ends the variable substitution.
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.make <<\_ACEOF
all:
@echo 'ac_maketemp="$(MAKE)"'
_ACEOF
# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
if test -n "$ac_maketemp"; then
eval ac_cv_prog_make_${ac_make}_set=yes
else
eval ac_cv_prog_make_${ac_make}_set=no
fi
rm -f conftest.make
fi
if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
SET_MAKE=
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
SET_MAKE="MAKE=${MAKE-make}"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
RANLIB=$ac_ct_RANLIB
else
RANLIB="$ac_cv_prog_RANLIB"
fi
# Disable unnecessary libtool tests for c++,fortran,java
# Check whether --enable-shared or --disable-shared was given.
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
IFS="$lt_save_ifs"
;;
esac
else
enable_shared=yes
fi;
# Check whether --enable-static or --disable-static was given.
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
IFS="$lt_save_ifs"
;;
esac
else
enable_static=yes
fi;
# Check whether --enable-fast-install or --disable-fast-install was given.
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for pkg in $enableval; do
IFS="$lt_save_ifs"
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
IFS="$lt_save_ifs"
;;
esac
else
enable_fast_install=yes
fi;
echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
if test "${lt_cv_path_SED+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Loop through the user's path and test for sed and gsed.
# Then use that list of sed's as ones to test for truncation.
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
IFS=$as_save_IFS
lt_ac_max=0
lt_ac_count=0
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
# along with /bin/sed that truncates output.
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
test ! -f $lt_ac_sed && continue
cat /dev/null > conftest.in
lt_ac_count=0
echo $ECHO_N "0123456789$ECHO_C" >conftest.in
# Check for GNU sed and select it if it is found.
if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
lt_cv_path_SED=$lt_ac_sed
break
fi
while true; do
cat conftest.in conftest.in >conftest.tmp
mv conftest.tmp conftest.in
cp conftest.in conftest.nl
echo >>conftest.nl
$lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
cmp -s conftest.out conftest.nl || break
# 10000 chars as input seems more than enough
test $lt_ac_count -gt 10 && break
lt_ac_count=`expr $lt_ac_count + 1`
if test $lt_ac_count -gt $lt_ac_max; then
lt_ac_max=$lt_ac_count
lt_cv_path_SED=$lt_ac_sed
fi
done
done
fi
SED=$lt_cv_path_SED
echo "$as_me:$LINENO: result: $SED" >&5
echo "${ECHO_T}$SED" >&6
echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
if test "${ac_cv_prog_egrep+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if echo a | (grep -E '(a|b)') >/dev/null 2>&1
then ac_cv_prog_egrep='grep -E'
else ac_cv_prog_egrep='egrep'
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
echo "${ECHO_T}$ac_cv_prog_egrep" >&6
EGREP=$ac_cv_prog_egrep
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
test "$withval" = no || with_gnu_ld=yes
else
with_gnu_ld=no
fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
echo "$as_me:$LINENO: checking for ld used by $CC" >&5
echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
case $ac_prog in
# Accept absolute paths.
[\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
# Canonicalize the pathname of ld
ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
"")
# If it fails, then pretend we aren't using GCC.
ac_prog=ld
;;
*)
# If it is relative, then search for the first ld in PATH.
with_gnu_ld=unknown
;;
esac
elif test "$with_gnu_ld" = yes; then
echo "$as_me:$LINENO: checking for GNU ld" >&5
echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
else
echo "$as_me:$LINENO: checking for non-GNU ld" >&5
echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
fi
if test "${lt_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 &5
echo "${ECHO_T}$LD" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
{ (exit 1); exit 1; }; }
echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU lds only accept -v.
case `$LD -v 2>&1 &5
echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
with_gnu_ld=$lt_cv_prog_gnu_ld
echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
if test "${lt_cv_ld_reload_flag+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_ld_reload_flag='-r'
fi
echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
reload_flag=$lt_cv_ld_reload_flag
case $reload_flag in
"" | " "*) ;;
*) reload_flag=" $reload_flag" ;;
esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
darwin*)
if test "$GCC" = yes; then
reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
;;
esac
echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
if test "${lt_cv_path_NM+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$NM"; then
# Let the user override the test.
lt_cv_path_NM="$NM"
else
lt_nm_to_check="${ac_tool_prefix}nm"
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
tmp_nm="$ac_dir/$lt_tmp_nm"
if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
# Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
*/dev/null* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
break
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
break
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
;;
esac
;;
esac
fi
done
IFS="$lt_save_ifs"
done
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
echo "${ECHO_T}$lt_cv_path_NM" >&6
NM="$lt_cv_path_NM"
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
LN_S=$as_ln_s
if test "$LN_S" = "ln -s"; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no, using $LN_S" >&5
echo "${ECHO_T}no, using $LN_S" >&6
fi
echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
if test "${lt_cv_deplibs_check_method+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
# `unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
# which responds to the $file_magic_cmd with a given extended regex.
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
case $host_os in
aix4* | aix5*)
lt_cv_deplibs_check_method=pass_all
;;
beos*)
lt_cv_deplibs_check_method=pass_all
;;
bsdi[45]*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
cygwin*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
;;
mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump'.
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
lt_cv_deplibs_check_method=pass_all
;;
freebsd* | kfreebsd*-gnu | dragonfly*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
else
lt_cv_deplibs_check_method=pass_all
fi
;;
gnu*)
lt_cv_deplibs_check_method=pass_all
;;
hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
case $host_cpu in
ia64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
;;
hppa*64*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
esac
;;
interix3*)
# PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
;;
irix5* | irix6* | nonstopux*)
case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
lt_cv_deplibs_check_method=pass_all
;;
# This must be Linux ELF.
linux*)
lt_cv_deplibs_check_method=pass_all
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
newos6*)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
nto-qnx*)
lt_cv_deplibs_check_method=unknown
;;
openbsd*)
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
fi
;;
osf3* | osf4* | osf5*)
lt_cv_deplibs_check_method=pass_all
;;
solaris*)
lt_cv_deplibs_check_method=pass_all
;;
sysv4 | sysv4.3*)
case $host_vendor in
motorola)
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
ncr)
lt_cv_deplibs_check_method=pass_all
;;
sequent)
lt_cv_file_magic_cmd='/bin/file'
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
;;
sni)
lt_cv_file_magic_cmd='/bin/file'
lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
lt_cv_file_magic_test_file=/lib/libc.so
;;
siemens)
lt_cv_deplibs_check_method=pass_all
;;
pc)
lt_cv_deplibs_check_method=pass_all
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
lt_cv_deplibs_check_method=pass_all
;;
esac
fi
echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
test -z "$deplibs_check_method" && deplibs_check_method=unknown
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
fi;
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
HPUX_IA64_MODE="32"
;;
*ELF-64*)
HPUX_IA64_MODE="64"
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3903 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
if test "$lt_cv_prog_gnu_ld" = yes; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
;;
*N32*)
LD="${LD-ld} -melf32bmipn32"
;;
*64-bit*)
LD="${LD-ld} -melf64bmip"
;;
esac
else
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
*N32*)
LD="${LD-ld} -n32"
;;
*64-bit*)
LD="${LD-ld} -64"
;;
esac
fi
fi
rm -rf conftest*
;;
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*32-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_i386"
;;
ppc64-*linux*|powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
LD="${LD-ld} -m elf_s390"
;;
sparc64-*linux*)
LD="${LD-ld} -m elf32_sparc"
;;
esac
;;
*64-bit*)
case $host in
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
ppc*-*linux*|powerpc*-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*)
LD="${LD-ld} -m elf64_s390"
;;
sparc*-*linux*)
LD="${LD-ld} -m elf64_sparc"
;;
esac
;;
esac
fi
rm -rf conftest*
;;
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
if test "${lt_cv_cc_needs_belf+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
lt_cv_cc_needs_belf=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
lt_cv_cc_needs_belf=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
CFLAGS="$SAVE_CFLAGS"
fi
;;
sparc*-*solaris*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.o` in
*64-bit*)
case $lt_cv_prog_gnu_ld in
yes*) LD="${LD-ld} -m elf64_sparc" ;;
*) LD="${LD-ld} -64" ;;
esac
;;
esac
fi
rm -rf conftest*
;;
esac
need_locks="$enable_libtool_lock"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
if test "${ac_cv_prog_CPP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# Double quotes because CPP needs to be expanded
for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
do
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
break
fi
done
ac_cv_prog_CPP=$CPP
fi
CPP=$ac_cv_prog_CPP
else
ac_cv_prog_CPP=$CPP
fi
echo "$as_me:$LINENO: result: $CPP" >&5
echo "${ECHO_T}$CPP" >&6
ac_preproc_ok=false
for ac_c_preproc_warn_flag in '' yes
do
# Use a header file that comes with gcc, so configuring glibc
# with a fresh cross-compiler works.
# Prefer to if __STDC__ is defined, since
# exists even on freestanding compilers.
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. "Syntax error" is here to catch this case.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifdef __STDC__
# include
#else
# include
#endif
Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Broken: fails on valid input.
continue
fi
rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
# Broken: success on invalid input.
continue
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
# Passes both tests.
ac_preproc_ok=:
break
fi
rm -f conftest.err conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
{ { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&5
echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include
#include
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_stdc=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "memchr" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "free" >/dev/null 2>&1; then
:
else
ac_cv_header_stdc=no
fi
rm -f conftest*
fi
if test $ac_cv_header_stdc = yes; then
# /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
if test "$cross_compiling" = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#if ((' ' & 0x0FF) == 0x020)
# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
#else
# define ISLOWER(c) \
(('a' <= (c) && (c) <= 'i') \
|| ('j' <= (c) && (c) <= 'r') \
|| ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
int
main ()
{
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
|| toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
_ACEOF
rm -f conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
:
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ac_cv_header_stdc=no
fi
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
echo "${ECHO_T}$ac_cv_header_stdc" >&6
if test $ac_cv_header_stdc = yes; then
cat >>confdefs.h <<\_ACEOF
#define STDC_HEADERS 1
_ACEOF
fi
# On IRIX 5.3, sys/types and inttypes.h are conflicting.
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
eval "$as_ac_Header=no"
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
for ac_header in dlfcn.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
# Is the header compilable?
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_compiler=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
# Is the header present?
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
else
ac_cpp_err=yes
fi
if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
(
cat <<\_ASBOX
## ----------------------------------- ##
## Report this to the wulfware lists. ##
## ----------------------------------- ##
_ASBOX
) |
sed "s/^/$as_me: WARNING: /" >&2
;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
fi
if test `eval echo '${'$as_ac_Header'}'` = yes; then
cat >>confdefs.h <<_ACEOF
#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
fi
done
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# find the maximum length of command line arguments
echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
if test "${lt_cv_sys_max_cmd_len+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
i=0
teststring="ABCD"
case $build_os in
msdosdjgpp*)
# On DJGPP, this test can blow up pretty badly due to problems in libc
# (any single argument exceeding 2000 bytes causes a buffer overrun
# during glob expansion). Even if it were fixed, the result of this
# check would be larger than it should be.
lt_cv_sys_max_cmd_len=12288; # 12K is about right
;;
gnu*)
# Under GNU Hurd, this test is not required because there is
# no limit to the length of command line arguments.
# Libtool will interpret -1 as no limit whatsoever
lt_cv_sys_max_cmd_len=-1;
;;
cygwin* | mingw*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
# you end up with a "frozen" computer, even though with patience
# the test eventually succeeds (with a max line length of 256k).
# Instead, let's just punt: use the minimum linelength reported by
# all of the supported platforms: 8192 (on NT/2K/XP).
lt_cv_sys_max_cmd_len=8192;
;;
amigaos*)
# On AmigaOS with pdksh, this test takes hours, literally.
# So we just punt and use a minimum line length of 8192.
lt_cv_sys_max_cmd_len=8192;
;;
netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
elif test -x /usr/sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
else
lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
fi
# And add a safety zone
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
;;
interix*)
# We know the value 262144 and hardcode it with a safety zone (like BSD)
lt_cv_sys_max_cmd_len=196608
;;
osf*)
# Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
# due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
# nice to cause kernel panics so lets avoid the loop below.
# First set a reasonable default.
lt_cv_sys_max_cmd_len=16384
#
if test -x /sbin/sysconfig; then
case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
*1*) lt_cv_sys_max_cmd_len=-1 ;;
esac
fi
;;
sco3.2v5*)
lt_cv_sys_max_cmd_len=102400
;;
sysv5* | sco5v6* | sysv4.2uw2*)
kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
if test -n "$kargmax"; then
lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
else
lt_cv_sys_max_cmd_len=32768
fi
;;
*)
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
= "XX$teststring") >/dev/null 2>&1 &&
new_result=`expr "X$teststring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
test $i != 17 # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
done
teststring=
# Add a significant safety factor because C++ compilers can tack on massive
# amounts of additional arguments before passing them to the linker.
# It appears as though 1/2 is a usable value.
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
;;
esac
fi
if test -n $lt_cv_sys_max_cmd_len ; then
echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
else
echo "$as_me:$LINENO: result: none" >&5
echo "${ECHO_T}none" >&6
fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# These are sane defaults that work on at least a few old systems.
# [They come from Ultrix. What could be older than Ultrix?!! ;)]
# Character class describing NM global symbol codes.
symcode='[BCDEGRST]'
# Regexp to match symbols that can be accessed directly from C.
sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
# Transform an extracted symbol line into a proper C declaration
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
# Define system-specific variables.
case $host_os in
aix*)
symcode='[BCDT]'
;;
cygwin* | mingw* | pw32*)
symcode='[ABCDGISTW]'
;;
hpux*) # Its linker distinguishes data from code symbols
if test "$host_cpu" = ia64; then
symcode='[ABCDEGRST]'
fi
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
linux*)
if test "$host_cpu" = ia64; then
symcode='[ABCDGIRSTW]'
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
fi
;;
irix* | nonstopux*)
symcode='[BCDEGRST]'
;;
osf*)
symcode='[BCDEGQRST]'
;;
solaris*)
symcode='[BDRT]'
;;
sco3.2v5*)
symcode='[DT]'
;;
sysv4.2uw2*)
symcode='[DT]'
;;
sysv5* | sco5v6* | unixware* | OpenUNIX*)
symcode='[ABDT]'
;;
sysv4)
symcode='[DFNSTU]'
;;
esac
# Handle CRLF in mingw tool chain
opt_cr=
case $build_os in
mingw*)
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
# If we're using GNU nm, then use its standard symbol codes.
case `$NM -V 2>&1` in
*GNU* | *'with BFD'*)
symcode='[ABCDGIRSTW]' ;;
esac
# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do
# Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
symxfrm="\\1 $ac_symprfx\\2 \\2"
# Write the raw and C identifiers.
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
rm -f conftest*
cat > conftest.$ac_ext <&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
# Now try to grab the symbols.
nlist=conftest.nm
if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
(eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
mv -f "$nlist"T "$nlist"
else
rm -f "$nlist"T
fi
# Make sure that we snagged all the symbols we need.
if grep ' nm_test_var$' "$nlist" >/dev/null; then
if grep ' nm_test_func$' "$nlist" >/dev/null; then
cat < conftest.$ac_ext
#ifdef __cplusplus
extern "C" {
#endif
EOF
# Now generate the symbol file.
eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
cat <> conftest.$ac_ext
#if defined (__STDC__) && __STDC__
# define lt_ptr_t void *
#else
# define lt_ptr_t char *
# define const
#endif
/* The mapping between symbol names and symbols. */
const struct {
const char *name;
lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
EOF
$SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
cat <<\EOF >> conftest.$ac_ext
{0, (lt_ptr_t) 0}
};
#ifdef __cplusplus
}
#endif
EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
lt_save_LIBS="$LIBS"
lt_save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext"
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
LIBS="$lt_save_LIBS"
CFLAGS="$lt_save_CFLAGS"
else
echo "cannot find nm_test_func in $nlist" >&5
fi
else
echo "cannot find nm_test_var in $nlist" >&5
fi
else
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
fi
else
echo "$progname: failed program was:" >&5
cat conftest.$ac_ext >&5
fi
rm -f conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
if test "$pipe_works" = yes; then
break
else
lt_cv_sys_global_symbol_pipe=
fi
done
fi
if test -z "$lt_cv_sys_global_symbol_pipe"; then
lt_cv_sys_global_symbol_to_cdecl=
fi
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6
else
echo "$as_me:$LINENO: result: ok" >&5
echo "${ECHO_T}ok" >&6
fi
echo "$as_me:$LINENO: checking for objdir" >&5
echo $ECHO_N "checking for objdir... $ECHO_C" >&6
if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
rm -f .libs 2>/dev/null
mkdir .libs 2>/dev/null
if test -d .libs; then
lt_cv_objdir=.libs
else
# MS-DOS does not allow filenames that begin with a dot.
lt_cv_objdir=_libs
fi
rmdir .libs 2>/dev/null
fi
echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
echo "${ECHO_T}$lt_cv_objdir" >&6
objdir=$lt_cv_objdir
case $host_os in
aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
;;
esac
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
Xsed='sed -e 1s/^X//'
sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
# Same as above, but do not quote variable references.
double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
# Sed substitution to delay expansion of an escaped shell variable in a
# double_quote_subst'ed string.
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
# Sed substitution to avoid accidental globbing in evaled expressions
no_glob_subst='s/\*/\\\*/g'
# Constants:
rm="rm -f"
# Global variables:
default_ofile=libtool
can_build_shared=yes
# All known linkers require a `.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
ltmain="$ac_aux_dir/ltmain.sh"
ofile="$default_ofile"
with_gnu_ld="$lt_cv_prog_gnu_ld"
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$AR"; then
ac_cv_prog_AR="$AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="${ac_tool_prefix}ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
AR=$ac_cv_prog_AR
if test -n "$AR"; then
echo "$as_me:$LINENO: result: $AR" >&5
echo "${ECHO_T}$AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_AR"; then
ac_ct_AR=$AR
# Extract the first word of "ar", so it can be a program name with args.
set dummy ar; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_AR"; then
ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="ar"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
fi
fi
ac_ct_AR=$ac_cv_prog_ac_ct_AR
if test -n "$ac_ct_AR"; then
echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
echo "${ECHO_T}$ac_ct_AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
AR=$ac_ct_AR
else
AR="$ac_cv_prog_AR"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
RANLIB=$ac_cv_prog_RANLIB
if test -n "$RANLIB"; then
echo "$as_me:$LINENO: result: $RANLIB" >&5
echo "${ECHO_T}$RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_RANLIB"; then
ac_ct_RANLIB=$RANLIB
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_RANLIB"; then
ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
if test -n "$ac_ct_RANLIB"; then
echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
echo "${ECHO_T}$ac_ct_RANLIB" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
RANLIB=$ac_ct_RANLIB
else
RANLIB="$ac_cv_prog_RANLIB"
fi
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$STRIP"; then
ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
fi
fi
STRIP=$ac_cv_prog_STRIP
if test -n "$STRIP"; then
echo "$as_me:$LINENO: result: $STRIP" >&5
echo "${ECHO_T}$STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
fi
if test -z "$ac_cv_prog_STRIP"; then
ac_ct_STRIP=$STRIP
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$ac_ct_STRIP"; then
ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
if test -n "$ac_ct_STRIP"; then
echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
echo "${ECHO_T}$ac_ct_STRIP" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
STRIP=$ac_ct_STRIP
else
STRIP="$ac_cv_prog_STRIP"
fi
old_CC="$CC"
old_CFLAGS="$CFLAGS"
# Set sane defaults for various variables
test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
test -z "$LTCC" && LTCC=$CC
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
test -z "$MAGIC_CMD" && MAGIC_CMD=file
test -z "$NM" && NM=nm
test -z "$SED" && SED=sed
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$RANLIB" && RANLIB=:
test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
# Determine commands to create old-style static archives.
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
old_postinstall_cmds='chmod 644 $oldlib'
old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
;;
*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
;;
esac
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
for cc_temp in $compiler""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
# Only perform the check for file, if the check method requires it
case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
*)
lt_save_MAGIC_CMD="$MAGIC_CMD"
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$lt_save_ifs"
MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
echo "${ECHO_T}$MAGIC_CMD" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo "$as_me:$LINENO: checking for file" >&5
echo $ECHO_N "checking for file... $ECHO_C" >&6
if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
*)
lt_save_MAGIC_CMD="$MAGIC_CMD"
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
else
cat <&2
*** Warning: the command libtool uses to detect shared libraries,
*** $file_magic_cmd, produces output that libtool cannot recognize.
*** The result is that libtool may fail to recognize shared libraries
*** as such. This will affect the creation of libtool libraries that
*** depend on shared libraries, but programs linked with such libtool
*** libraries will work regardless of this problem. Nevertheless, you
*** may want to report the problem to your system manager and/or to
*** bug-libtool@gnu.org
EOF
fi ;;
esac
fi
break
fi
done
IFS="$lt_save_ifs"
MAGIC_CMD="$lt_save_MAGIC_CMD"
;;
esac
fi
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
if test -n "$MAGIC_CMD"; then
echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
echo "${ECHO_T}$MAGIC_CMD" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
else
MAGIC_CMD=:
fi
fi
fi
;;
esac
enable_dlopen=no
enable_win32_dll=no
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then
enableval="$enable_libtool_lock"
fi;
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
# Check whether --with-pic or --without-pic was given.
if test "${with_pic+set}" = set; then
withval="$with_pic"
pic_mode="$withval"
else
pic_mode=default
fi;
test -z "$pic_mode" && pic_mode=default
# Use C for the default configuration in the libtool script
tagname=
lt_save_CC="$CC"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
# Source file extension for C test sources.
ac_ext=c
# Object file extension for compiled C test sources.
objext=o
objext=$objext
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;\n"
# Code to be used in simple link tests
lt_simple_link_test_code='int main(){return(0);}\n'
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
lt_prog_compiler_no_builtin_flag=
if test "$GCC" = yes; then
lt_prog_compiler_no_builtin_flag=' -fno-builtin'
echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-fno-rtti -fno-exceptions"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
# with a dollar sign (not a hyphen), so the echo should work correctly.
# The option is referenced via a variable to avoid confusing sed.
lt_compile=`echo "$ac_compile" | $SED \
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5626: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:5630: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_cv_prog_compiler_rtti_exceptions=yes
fi
fi
$rm conftest*
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
fi
fi
lt_prog_compiler_wl=
lt_prog_compiler_pic=
lt_prog_compiler_static=
echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
if test "$GCC" = yes; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
;;
amigaos*)
# FIXME: we need at least 68020 code to build shared libraries, but
# adding the `-m68020' flag to GCC prevents building anything better,
# like `-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
lt_prog_compiler_pic='-fno-common'
;;
interix3*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
# Instead, we relocate shared libraries at runtime.
;;
msdosdjgpp*)
# Just because we use GCC doesn't mean we suddenly get shared libraries
# on systems that don't support them.
lt_prog_compiler_can_build_shared=no
enable_shared=no
;;
sysv4*MP*)
if test -d /usr/nec; then
lt_prog_compiler_pic=-Kconform_pic
fi
;;
hpux*)
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
*)
lt_prog_compiler_pic='-fPIC'
;;
esac
;;
*)
lt_prog_compiler_pic='-fPIC'
;;
esac
else
# PORTME Check for flag to pass linker flags through the system compiler.
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
darwin*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
case $cc_basename in
xlc*)
lt_prog_compiler_pic='-qnocommon'
lt_prog_compiler_wl='-Wl,'
;;
esac
;;
mingw* | pw32* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
;;
hpux9* | hpux10* | hpux11*)
lt_prog_compiler_wl='-Wl,'
# PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
# not for PA HP-UX.
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
;;
*)
lt_prog_compiler_pic='+Z'
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
lt_prog_compiler_static='${wl}-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
lt_prog_compiler_wl='-Wl,'
# PIC (with -KPIC) is the default.
lt_prog_compiler_static='-non_shared'
;;
newsos6)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
;;
linux*)
case $cc_basename in
icc* | ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-static'
;;
pgcc* | pgf77* | pgf90* | pgf95*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-fpic'
lt_prog_compiler_static='-Bstatic'
;;
ccc*)
lt_prog_compiler_wl='-Wl,'
# All Alpha code is PIC.
lt_prog_compiler_static='-non_shared'
;;
esac
;;
osf3* | osf4* | osf5*)
lt_prog_compiler_wl='-Wl,'
# All OSF/1 code is PIC.
lt_prog_compiler_static='-non_shared'
;;
solaris*)
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
case $cc_basename in
f77* | f90* | f95*)
lt_prog_compiler_wl='-Qoption ld ';;
*)
lt_prog_compiler_wl='-Wl,';;
esac
;;
sunos4*)
lt_prog_compiler_wl='-Qoption ld '
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
sysv4 | sysv4.2uw2* | sysv4.3*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
;;
sysv4*MP*)
if test -d /usr/nec ;then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
;;
sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
lt_prog_compiler_static='-Bstatic'
;;
unicos*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_can_build_shared=no
;;
uts4*)
lt_prog_compiler_pic='-pic'
lt_prog_compiler_static='-Bstatic'
;;
*)
lt_prog_compiler_can_build_shared=no
;;
esac
fi
echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
echo "${ECHO_T}$lt_prog_compiler_pic" >&6
#
# Check to make sure the PIC flag actually works.
#
if test -n "$lt_prog_compiler_pic"; then
echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
if test "${lt_prog_compiler_pic_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
# with a dollar sign (not a hyphen), so the echo should work correctly.
# The option is referenced via a variable to avoid confusing sed.
lt_compile=`echo "$ac_compile" | $SED \
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5894: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:5898: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_pic_works=yes
fi
fi
$rm conftest*
fi
echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
if test x"$lt_prog_compiler_pic_works" = xyes; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
esac
else
lt_prog_compiler_pic=
lt_prog_compiler_can_build_shared=no
fi
fi
case $host_os in
# For platforms which do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
*)
lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
;;
esac
#
# Check to make sure the static flag actually works.
#
wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
if test "${lt_prog_compiler_static_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_prog_compiler_static_works=no
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
printf "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
# The linker can only warn and ignore the option if not recognized
# So say no if there are warnings
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&5
$echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
$SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
if diff conftest.exp conftest.er2 >/dev/null; then
lt_prog_compiler_static_works=yes
fi
else
lt_prog_compiler_static_works=yes
fi
fi
$rm conftest*
LDFLAGS="$save_LDFLAGS"
fi
echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
if test x"$lt_prog_compiler_static_works" = xyes; then
:
else
lt_prog_compiler_static=
fi
echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
if test "${lt_cv_prog_compiler_c_o+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
lt_cv_prog_compiler_c_o=no
$rm -r conftest 2>/dev/null
mkdir conftest
cd conftest
mkdir out
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
lt_compiler_flag="-o out/conftest2.$ac_objext"
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
# with a dollar sign (not a hyphen), so the echo should work correctly.
lt_compile=`echo "$ac_compile" | $SED \
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:5998: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:6002: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
$echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
$SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
lt_cv_prog_compiler_c_o=yes
fi
fi
chmod u+w . 2>&5
$rm conftest*
# SGI C++ compiler will create directory out/ii_files/ for
# template instantiation
test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
$rm out/* && rmdir out
cd ..
rmdir conftest
$rm conftest*
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
hard_links="nottested"
if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
hard_links=yes
$rm conftest*
ln conftest.a conftest.b 2>/dev/null && hard_links=no
touch conftest.a
ln conftest.a conftest.b 2>&5 || hard_links=no
ln conftest.a conftest.b 2>/dev/null && hard_links=no
echo "$as_me:$LINENO: result: $hard_links" >&5
echo "${ECHO_T}$hard_links" >&6
if test "$hard_links" = no; then
{ echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
need_locks=no
fi
echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
runpath_var=
allow_undefined_flag=
enable_shared_with_static_runtimes=no
archive_cmds=
archive_expsym_cmds=
old_archive_From_new_cmds=
old_archive_from_expsyms_cmds=
export_dynamic_flag_spec=
whole_archive_flag_spec=
thread_safe_flag_spec=
hardcode_libdir_flag_spec=
hardcode_libdir_flag_spec_ld=
hardcode_libdir_separator=
hardcode_direct=no
hardcode_minus_L=no
hardcode_shlibpath_var=unsupported
link_all_deplibs=unknown
hardcode_automatic=no
module_cmds=
module_expsym_cmds=
always_export_symbols=no
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
# include_expsyms should be a list of space-separated symbols to be *always*
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
# it will be wrapped by ` (' and `)$', so one must not match beginning or
# end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
# as well as any symbol that contains `d'.
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
# the symbol is explicitly referenced. Since portable code cannot
# rely on this symbol name, it's probably fine to never include it in
# preloaded symbol tables.
extract_expsyms_cmds=
# Just being paranoid about ensuring that cc_basename is set.
for cc_temp in $compiler""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
case $host_os in
cygwin* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
if test "$GCC" != yes; then
with_gnu_ld=no
fi
;;
interix*)
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
openbsd*)
with_gnu_ld=no
;;
esac
ld_shlibs=yes
if test "$with_gnu_ld" = yes; then
# If archive_cmds runs LD, not CC, wlarc should be empty
wlarc='${wl}'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
case `$LD -v 2>/dev/null` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
*\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
*\ 2.11.*) ;; # other 2.11 versions
*) supports_anon_versioning=yes ;;
esac
# See if GNU ld supports shared libraries.
case $host_os in
aix3* | aix4* | aix5*)
# On AIX/PPC, the GNU linker is very broken
if test "$host_cpu" != ia64; then
ld_shlibs=no
cat <&2
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
*** to be unable to reliably create shared libraries on AIX.
*** Therefore, libtool is disabling shared libraries support. If you
*** really care for shared libraries, you may want to modify your PATH
*** so that a non-GNU linker is found, and then restart.
EOF
fi
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# Samuel A. Falvo II reports
# that the semantics of dynamic libraries on AmigaOS, at least up
# to version 4, is to share data among multiple programs linked
# with the same dynamic library. Since this doesn't match the
# behavior of shared libraries on other platforms, we can't use
# them.
ld_shlibs=no
;;
beos*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
allow_undefined_flag=unsupported
# Joseph Beckenbach says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
# _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
# If the export-symbols file already is a .def file (1st line
# is EXPORTS), use it as is; otherwise, prepend...
archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
cp $export_symbols $output_objdir/$soname.def;
else
echo EXPORTS > $output_objdir/$soname.def;
cat $export_symbols >> $output_objdir/$soname.def;
fi~
$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
interix3*)
hardcode_direct=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
export_dynamic_flag_spec='${wl}-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
linux*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
tmp_addflag=
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
tmp_addflag=' -i_dynamic -nofor_main' ;;
ifc* | ifort*) # Intel Fortran compiler
tmp_addflag=' -nofor_main' ;;
esac
archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
if test $supports_anon_versioning = yes; then
archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
$echo "local: *; };" >> $output_objdir/$libname.ver~
$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
fi
else
ld_shlibs=no
fi
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
solaris*)
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
ld_shlibs=no
cat <&2
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
*** create shared libraries on Solaris systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.9.1 or newer. Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
EOF
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
case `$LD -v 2>&1` in
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
ld_shlibs=no
cat <<_LT_EOF 1>&2
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
*** your PATH or compiler configuration so that the native linker is
*** used, and then restart.
_LT_EOF
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
;;
sunos4*)
archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
wlarc=
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
*)
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
if test "$ld_shlibs" = no; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
whole_archive_flag_spec=
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
fi
;;
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
no_entry_flag=""
else
# If we're using GNU nm, then we don't want the "-C" option.
# -C means demangle to AIX nm, but means don't demangle with GNU nm
if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
else
export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
aix_use_runtimelinking=yes
break
fi
done
;;
esac
exp_sym_flag='-bexport'
no_entry_flag='-bnoentry'
fi
# When large executables or shared objects are built, AIX ld can
# have problems creating the table of contents. If linking a library
# or program results in "error TOC overflow" add -mminimal-toc to
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
archive_cmds=''
hardcode_direct=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
if test "$GCC" = yes; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
collect2name=`${CC} -print-prog-name=collect2`
if test -f "$collect2name" && \
strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
hardcode_direct=yes
else
# We have old collect2
hardcode_direct=unsupported
# It fails to find uninstalled libraries when the uninstalled
# path is not listed in the libpath. Setting hardcode_minus_L
# to unsupported forces relinking
hardcode_minus_L=yes
hardcode_libdir_flag_spec='-L$libdir'
hardcode_libdir_separator=
fi
;;
esac
shared_flag='-shared'
if test "$aix_use_runtimelinking" = yes; then
shared_flag="$shared_flag "'${wl}-G'
fi
else
# not using gcc
if test "$host_cpu" = ia64; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
if test "$aix_use_runtimelinking" = yes; then
shared_flag='${wl}-G'
else
shared_flag='${wl}-bM:SRE'
fi
fi
fi
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
if test "$aix_use_runtimelinking" = yes; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`; fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an empty executable.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`
# Check for a 64-bit object if we didn't find anything.
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
}'`; fi
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
no_undefined_flag=' ${wl}-bernotok'
allow_undefined_flag=' ${wl}-berok'
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
archive_cmds_need_lc=yes
# This is similar to how AIX traditionally builds its shared libraries.
archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
bsdi[45]*)
export_dynamic_flag_spec=-rdynamic
;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec=' '
allow_undefined_flag=unsupported
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
shrext_cmds=".dll"
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
old_archive_From_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
fix_srcfile_path='`cygpath -w "$srcfile"`'
enable_shared_with_static_runtimes=yes
;;
darwin* | rhapsody*)
case $host_os in
rhapsody* | darwin1.[012])
allow_undefined_flag='${wl}-undefined ${wl}suppress'
;;
*) # Darwin 1.3 on
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
else
case ${MACOSX_DEPLOYMENT_TARGET} in
10.[012])
allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
;;
10.*)
allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
;;
esac
fi
;;
esac
archive_cmds_need_lc=no
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
whole_archive_flag_spec=''
link_all_deplibs=yes
if test "$GCC" = yes ; then
output_verbose_link_cmd='echo'
archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
else
case $cc_basename in
xlc*)
output_verbose_link_cmd='echo'
archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
# Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
;;
*)
ld_shlibs=no
;;
esac
fi
;;
dgux*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
freebsd1*)
ld_shlibs=no
;;
# FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
# support. Future versions do this automatically, but an explicit c++rt0.o
# does not break anything, and helps significantly (at the cost of a little
# extra space).
freebsd2.2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
freebsd2*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd* | kfreebsd*-gnu | dragonfly*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
hpux9*)
if test "$GCC" = yes; then
archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
else
archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
fi
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
export_dynamic_flag_spec='${wl}-E'
;;
hpux10*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
fi
;;
hpux11*)
if test "$GCC" = yes -a "$with_gnu_ld" = no; then
case $host_cpu in
hppa*64*)
archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
fi
if test "$with_gnu_ld" = no; then
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
case $host_cpu in
hppa*64*|ia64*)
hardcode_libdir_flag_spec_ld='+b $libdir'
hardcode_direct=no
hardcode_shlibpath_var=no
;;
*)
hardcode_direct=yes
export_dynamic_flag_spec='${wl}-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
;;
esac
fi
;;
irix5* | irix6* | nonstopux*)
if test "$GCC" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec_ld='-rpath $libdir'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
link_all_deplibs=yes
;;
netbsd*)
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
;;
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
openbsd*)
hardcode_direct=yes
hardcode_shlibpath_var=no
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
export_dynamic_flag_spec='${wl}-E'
else
case $host_os in
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-R$libdir'
;;
*)
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
;;
esac
fi
;;
os2*)
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
;;
osf3*)
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
if test "$GCC" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
fi
hardcode_libdir_separator=:
;;
solaris*)
no_undefined_flag=' -z text'
if test "$GCC" = yes; then
wlarc='${wl}'
archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
else
wlarc=''
archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine linker options so we
# cannot just pass the convience library names through
# without $wl, iff we do not link with $LD.
# Luckily, gcc supports the same syntax we need for Sun Studio.
# Supported since Solaris 2.6 (maybe 2.5.1?)
case $wlarc in
'')
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
*)
whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
esac ;;
esac
link_all_deplibs=yes
;;
sunos4*)
if test "x$host_vendor" = xsequent; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
hardcode_libdir_flag_spec='-L$libdir'
hardcode_direct=yes
hardcode_minus_L=yes
hardcode_shlibpath_var=no
;;
sysv4)
case $host_vendor in
sni)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes # is this really true???
;;
siemens)
## LD is ld it makes a PLAMLIB
## CC just makes a GrossModule.
archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
reload_cmds='$CC -r -o $output$reload_objs'
hardcode_direct=no
;;
motorola)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=no #Motorola manual says yes, but my tests say they lie
;;
esac
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
sysv4.3*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
export_dynamic_flag_spec='-Bexport'
;;
sysv4*MP*)
if test -d /usr/nec; then
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_shlibpath_var=no
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
ld_shlibs=yes
fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
no_undefined_flag='${wl}-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
if test "$GCC" = yes; then
archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
# Note: We can NOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
no_undefined_flag='${wl}-z,text'
allow_undefined_flag='${wl}-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
hardcode_libdir_separator=':'
link_all_deplibs=yes
export_dynamic_flag_spec='${wl}-Bexport'
runpath_var='LD_RUN_PATH'
if test "$GCC" = yes; then
archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
uts4*)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_libdir_flag_spec='-L$libdir'
hardcode_shlibpath_var=no
;;
*)
ld_shlibs=no
;;
esac
fi
echo "$as_me:$LINENO: result: $ld_shlibs" >&5
echo "${ECHO_T}$ld_shlibs" >&6
test "$ld_shlibs" = no && can_build_shared=no
#
# Do we need to explicitly link libc?
#
case "x$archive_cmds_need_lc" in
x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
if test "$enable_shared" = yes && test "$GCC" = yes; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
;;
'$CC '*)
# Test whether the compiler implicitly links with -lc since on some
# systems, -lgcc has to come before -lc. If gcc already passes -lc
# to ld, don't add -lc before -lgcc.
echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
$rm conftest*
printf "$lt_simple_compile_test_code" > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } 2>conftest.err; then
soname=conftest
lib=conftest
libobjs=conftest.$ac_objext
deplibs=
wl=$lt_prog_compiler_wl
pic_flag=$lt_prog_compiler_pic
compiler_flags=-v
linker_flags=-v
verstring=
output_objdir=.
libname=conftest
lt_save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag=
if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
(eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
then
archive_cmds_need_lc=no
else
archive_cmds_need_lc=yes
fi
allow_undefined_flag=$lt_save_allow_undefined_flag
else
cat conftest.err 1>&5
fi
$rm conftest*
echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
echo "${ECHO_T}$archive_cmds_need_lc" >&6
;;
esac
fi
;;
esac
echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
library_names_spec=
libname_spec='lib$name'
soname_spec=
shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
finish_eval=
shlibpath_var=
shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
# if the path contains ";" then we assume it to be the separator
# otherwise default to the standard path separator (i.e. ":") - it is
# assumed that no part of a normal pathname contains ";" but that should
# okay in the real world where ";" in dirpaths is itself problematic.
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
else
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
else
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
need_lib_prefix=unknown
hardcode_into_libs=no
# when you set need_version to no, make sure it does not cause -set_version
# flags to be left without arguments
need_version=unknown
case $host_os in
aix3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
soname_spec='${libname}${release}${shared_ext}$major'
;;
aix4* | aix5*)
version_type=linux
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
# the line `#! .'. This would cause the generated library to
# depend on `.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
# AIX (on Power*) has no versioning support, so currently we can not hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
if test "$aix_use_runtimelinking" = yes; then
# If using run time linking (on AIX 4.2 or later) use lib.so
# instead of lib.a to let people know that these are not
# typical AIX shared libraries.
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
else
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
library_names_spec='${libname}${release}.a $libname.a'
soname_spec='${libname}${release}${shared_ext}$major'
fi
shlibpath_var=LIBPATH
fi
;;
amigaos*)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
beos*)
library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
bsdi[45]*)
version_type=linux
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
# the default ld.so.conf also contains /usr/contrib/lib and
# /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
# libtool to hard-code these into programs
;;
cygwin* | mingw* | pw32*)
version_type=windows
shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
case $GCC,$host_os in
yes,cygwin* | yes,mingw* | yes,pw32*)
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
chmod a+x \$dldir/$dlname'
postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
dlpath=$dir/\$dldll~
$rm \$dlpath'
shlibpath_overrides_runpath=yes
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
;;
mingw*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH printed by
# mingw gcc, but we are running on Cygwin. Gcc prints its search
# path with ; separators, and with drive letters. We can handle the
# drive letters (cygwin fileutils understands them), so leave them,
# especially as we might pass files found there to a mingw objdump,
# which wouldn't understand a cygwinified path. Ahh.
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
else
sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
fi
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
;;
esac
;;
*)
library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
esac
dynamic_linker='Win32 ld.exe'
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
;;
darwin* | rhapsody*)
dynamic_linker="$host_os dyld"
version_type=darwin
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
soname_spec='${libname}${release}${major}$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
# Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
if test "$GCC" = yes; then
sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
else
sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
fi
sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
;;
dgux*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
freebsd1*)
dynamic_linker=no
;;
kfreebsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='GNU ld.so'
;;
freebsd* | dragonfly*)
# DragonFly does not have aout. When/if they implement a new
# versioning mechanism, adjust this.
if test -x /usr/bin/objformat; then
objformat=`/usr/bin/objformat`
else
case $host_os in
freebsd[123]*) objformat=aout ;;
*) objformat=elf ;;
esac
fi
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[01]* | freebsdelf3.[01]*)
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
freebsd*) # from 4.6 on
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
esac
;;
gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
hardcode_into_libs=yes
;;
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
version_type=sunos
need_lib_prefix=no
need_version=no
case $host_cpu in
ia64*)
shrext_cmds='.so'
hardcode_into_libs=yes
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
if test "X$HPUX_IA64_MODE" = X32; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
fi
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
hardcode_into_libs=yes
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
*)
shrext_cmds='.sl'
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555.
postinstall_cmds='chmod 555 $lib'
;;
interix3*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
if test "$lt_cv_prog_gnu_ld" = yes; then
version_type=linux
else
version_type=irix
fi ;;
esac
need_lib_prefix=no
need_version=no
soname_spec='${libname}${release}${shared_ext}$major'
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in # libtool.m4 will add one of these switches to LD
*-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
libsuff= shlibsuff= libmagic=32-bit;;
*-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
libsuff=32 shlibsuff=N32 libmagic=N32;;
*-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
libsuff=64 shlibsuff=64 libmagic=64-bit;;
*) libsuff= shlibsuff= libmagic=never-match;;
esac
;;
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
hardcode_into_libs=yes
;;
# No shared lib support for Linux oldld, aout, or coff.
linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
# This must be Linux ELF.
linux*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
# This implies no fast_install, which is unacceptable.
# Some rework will be needed to allow for fast_install
# before this can be enabled.
hardcode_into_libs=yes
# find out which ABI we are using
libsuff=
case "$host_cpu" in
x86_64*|s390x*|powerpc64*)
echo '#line 7467 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; then
case `/usr/bin/file conftest.$ac_objext` in
*64-bit*)
libsuff=64
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
;;
esac
fi
rm -rf conftest*
;;
esac
# Append ld.so.conf contents to the search path
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
fi
# We used to test for /lib/ld.so.1 and disable shared libraries on
# powerpc, because MkLinux only supported shared libraries with the
# GNU dynamic linker. Since this was broken with cross compilers,
# most powerpc-linux boxes support dynamic linking these days and
# people can always --disable-shared, the test was removed, and we
# assume the GNU/Linux dynamic linker is in use.
dynamic_linker='GNU/Linux ld.so'
;;
knetbsd*-gnu)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='GNU ld.so'
;;
netbsd*)
version_type=sunos
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
;;
newsos6)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
nto-qnx*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
openbsd*)
version_type=sunos
sys_lib_dlsearch_path_spec="/usr/lib"
need_lib_prefix=no
# Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
case $host_os in
openbsd3.3 | openbsd3.3.*) need_version=yes ;;
*) need_version=no ;;
esac
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
case $host_os in
openbsd2.[89] | openbsd2.[89].*)
shlibpath_overrides_runpath=no
;;
*)
shlibpath_overrides_runpath=yes
;;
esac
else
shlibpath_overrides_runpath=yes
fi
;;
os2*)
libname_spec='$name'
shrext_cmds=".dll"
need_lib_prefix=no
library_names_spec='$libname${shared_ext} $libname.a'
dynamic_linker='OS/2 ld.exe'
shlibpath_var=LIBPATH
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
soname_spec='${libname}${release}${shared_ext}$major'
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
;;
solaris*)
version_type=linux
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
# ldd complains unless libraries are executable
postinstall_cmds='chmod +x $lib'
;;
sunos4*)
version_type=sunos
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
if test "$with_gnu_ld" = yes; then
need_lib_prefix=no
fi
need_version=yes
;;
sysv4 | sysv4.3*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
shlibpath_overrides_runpath=no
need_lib_prefix=no
export_dynamic_flag_spec='${wl}-Blargedynsym'
runpath_var=LD_RUN_PATH
;;
siemens)
need_lib_prefix=no
;;
motorola)
need_lib_prefix=no
need_version=no
shlibpath_overrides_runpath=no
sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
;;
esac
;;
sysv4*MP*)
if test -d /usr/nec ;then
version_type=linux
library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
soname_spec='$libname${shared_ext}.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
version_type=freebsd-elf
need_lib_prefix=no
need_version=no
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
hardcode_into_libs=yes
if test "$with_gnu_ld" = yes; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
shlibpath_overrides_runpath=no
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
shlibpath_overrides_runpath=yes
case $host_os in
sco3.2v5*)
sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
;;
esac
fi
sys_lib_dlsearch_path_spec='/usr/lib'
;;
uts4*)
version_type=linux
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
soname_spec='${libname}${release}${shared_ext}$major'
shlibpath_var=LD_LIBRARY_PATH
;;
*)
dynamic_linker=no
;;
esac
echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
if test "$GCC" = yes; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" || \
test -n "$runpath_var" || \
test "X$hardcode_automatic" = "Xyes" ; then
# We can hardcode non-existant directories.
if test "$hardcode_direct" != no &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
test "$hardcode_minus_L" != no; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
hardcode_action=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
hardcode_action=unsupported
fi
echo "$as_me:$LINENO: result: $hardcode_action" >&5
echo "${ECHO_T}$hardcode_action" >&6
if test "$hardcode_action" = relink; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
test "$enable_shared" = no; then
# Fast installation is not necessary
enable_fast_install=needless
fi
striplib=
old_striplib=
echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
if test -n "$STRIP" ; then
striplib="$STRIP -x"
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
;;
*)
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
;;
esac
fi
if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
else
lt_cv_dlopen=no
lt_cv_dlopen_libs=
case $host_os in
beos*)
lt_cv_dlopen="load_add_on"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32*)
lt_cv_dlopen="LoadLibrary"
lt_cv_dlopen_libs=
;;
cygwin*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;
darwin*)
# if libdl is installed we need to link against it
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
lt_cv_dlopen="dyld"
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
fi
;;
*)
echo "$as_me:$LINENO: checking for shl_load" >&5
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define shl_load to an innocuous variant, in case declares shl_load.
For example, HP-UX 11i declares gettimeofday. */
#define shl_load innocuous_shl_load
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef shl_load
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shl_load ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_shl_load) || defined (__stub___shl_load)
choke me
#else
char (*f) () = shl_load;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != shl_load;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
if test $ac_cv_func_shl_load = yes; then
lt_cv_dlopen="shl_load"
else
echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shl_load ();
int
main ()
{
shl_load ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_shl_load=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
if test $ac_cv_lib_dld_shl_load = yes; then
lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
else
echo "$as_me:$LINENO: checking for dlopen" >&5
echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Define dlopen to an innocuous variant, in case declares dlopen.
For example, HP-UX 11i declares gettimeofday. */
#define dlopen innocuous_dlopen
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen (); below.
Prefer to if __STDC__ is defined, since
exists even on freestanding compilers. */
#ifdef __STDC__
# include
#else
# include
#endif
#undef dlopen
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
#if defined (__stub_dlopen) || defined (__stub___dlopen)
choke me
#else
char (*f) () = dlopen;
#endif
#ifdef __cplusplus
}
#endif
int
main ()
{
return f != dlopen;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_func_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
if test $ac_cv_func_dlopen = yes; then
lt_cv_dlopen="dlopen"
else
echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dl_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
if test $ac_cv_lib_dl_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
else
echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
if test "${ac_cv_lib_svld_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
int
main ()
{
dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_svld_dlopen=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
if test $ac_cv_lib_svld_dlopen = yes; then
lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
else
echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
if test "${ac_cv_lib_dld_dld_link+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dld_link ();
int
main ()
{
dld_link ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_dld_dld_link=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
if test $ac_cv_lib_dld_dld_link = yes; then
lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
fi
fi
fi
fi
fi
fi
;;
esac
if test "x$lt_cv_dlopen" != xno; then
enable_dlopen=yes
else
enable_dlopen=no
fi
case $lt_cv_dlopen in
dlopen)
save_CPPFLAGS="$CPPFLAGS"
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
save_LIBS="$LIBS"
LIBS="$lt_cv_dlopen_libs $LIBS"
echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
if test "${lt_cv_dlopen_self+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <
#endif
#include
#ifdef RTLD_GLOBAL
# define LT_DLGLOBAL RTLD_GLOBAL
#else
# ifdef DL_GLOBAL
# define LT_DLGLOBAL DL_GLOBAL
# else
# define LT_DLGLOBAL 0
# endif
#endif
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
# ifdef RTLD_LAZY
# define LT_DLLAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LT_DLLAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LT_DLLAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LT_DLLAZY_OR_NOW DL_NOW
# else
# define LT_DLLAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
#ifdef __cplusplus
extern "C" void exit (int);
#endif
void fnord() { int i=42;}
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
else
puts (dlerror ());
exit (status);
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
esac
else :
# compilation failed
lt_cv_dlopen_self=no
fi
fi
rm -fr conftest*
fi
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
echo "${ECHO_T}$lt_cv_dlopen_self" >&6
if test "x$lt_cv_dlopen_self" = xyes; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
if test "${lt_cv_dlopen_self_static+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$cross_compiling" = yes; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <
#endif
#include
#ifdef RTLD_GLOBAL
# define LT_DLGLOBAL RTLD_GLOBAL
#else
# ifdef DL_GLOBAL
# define LT_DLGLOBAL DL_GLOBAL
# else
# define LT_DLGLOBAL 0
# endif
#endif
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
find out it does not work in some platform. */
#ifndef LT_DLLAZY_OR_NOW
# ifdef RTLD_LAZY
# define LT_DLLAZY_OR_NOW RTLD_LAZY
# else
# ifdef DL_LAZY
# define LT_DLLAZY_OR_NOW DL_LAZY
# else
# ifdef RTLD_NOW
# define LT_DLLAZY_OR_NOW RTLD_NOW
# else
# ifdef DL_NOW
# define LT_DLLAZY_OR_NOW DL_NOW
# else
# define LT_DLLAZY_OR_NOW 0
# endif
# endif
# endif
# endif
#endif
#ifdef __cplusplus
extern "C" void exit (int);
#endif
void fnord() { int i=42;}
int main ()
{
void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
int status = $lt_dlunknown;
if (self)
{
if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
/* dlclose (self); */
}
else
puts (dlerror ());
exit (status);
}
EOF
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
esac
else :
# compilation failed
lt_cv_dlopen_self_static=no
fi
fi
rm -fr conftest*
fi
echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
;;
esac
case $lt_cv_dlopen_self in
yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
*) enable_dlopen_self=unknown ;;
esac
case $lt_cv_dlopen_self_static in
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
*) enable_dlopen_self_static=unknown ;;
esac
fi
# Report which library types will actually be built
echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
echo "$as_me:$LINENO: result: $can_build_shared" >&5
echo "${ECHO_T}$can_build_shared" >&6
echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
test "$can_build_shared" = "no" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
fi
;;
aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
;;
esac
echo "$as_me:$LINENO: result: $enable_shared" >&5
echo "${ECHO_T}$enable_shared" >&6
echo "$as_me:$LINENO: checking whether to build static libraries" >&5
echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
# Make sure either enable_shared or enable_static is yes.
test "$enable_shared" = yes || enable_static=yes
echo "$as_me:$LINENO: result: $enable_static" >&5
echo "${ECHO_T}$enable_static" >&6
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
# no rules to generate ltmain.sh.
if test -f "$ltmain"; then
# See if we are running on zsh, and set the options which allow our commands through
# without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
deplibs_check_method reload_flag reload_cmds need_locks \
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
old_postinstall_cmds old_postuninstall_cmds \
compiler \
CC \
LD \
lt_prog_compiler_wl \
lt_prog_compiler_pic \
lt_prog_compiler_static \
lt_prog_compiler_no_builtin_flag \
export_dynamic_flag_spec \
thread_safe_flag_spec \
whole_archive_flag_spec \
enable_shared_with_static_runtimes \
old_archive_cmds \
old_archive_from_new_cmds \
predep_objects \
postdep_objects \
predeps \
postdeps \
compiler_lib_search_path \
archive_cmds \
archive_expsym_cmds \
postinstall_cmds \
postuninstall_cmds \
old_archive_from_expsyms_cmds \
allow_undefined_flag \
no_undefined_flag \
export_symbols_cmds \
hardcode_libdir_flag_spec \
hardcode_libdir_flag_spec_ld \
hardcode_libdir_separator \
hardcode_automatic \
module_cmds \
module_expsym_cmds \
lt_cv_prog_compiler_c_o \
exclude_expsyms \
include_expsyms; do
case $var in
old_archive_cmds | \
old_archive_from_new_cmds | \
archive_cmds | \
archive_expsym_cmds | \
module_cmds | \
module_expsym_cmds | \
old_archive_from_expsyms_cmds | \
export_symbols_cmds | \
extract_expsyms_cmds | reload_cmds | finish_cmds | \
postinstall_cmds | postuninstall_cmds | \
old_postinstall_cmds | old_postuninstall_cmds | \
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
*)
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
;;
esac
done
case $lt_echo in
*'\$0 --fallback-echo"')
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
cfgfile="${ofile}T"
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
$rm -f "$cfgfile"
{ echo "$as_me:$LINENO: creating $ofile" >&5
echo "$as_me: creating $ofile" >&6;}
cat <<__EOF__ >> "$cfgfile"
#! $SHELL
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
#
# This file is part of GNU Libtool:
# Originally by Gordon Matzigkeit , 1996
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# A sed program that does not truncate output.
SED=$lt_SED
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
Xsed="$SED -e 1s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
# The names of the tagged configurations supported by this script.
available_tags=
# ### BEGIN LIBTOOL CONFIG
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
# Whether or not to build static libraries.
build_old_libs=$enable_static
# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$archive_cmds_need_lc
# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
host_os=$host_os
# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
# The archiver.
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
# LTCC compiler flags.
LTCFLAGS=$lt_LTCFLAGS
# A language-specific compiler.
CC=$lt_compiler
# Is the compiler the GNU C compiler?
with_gcc=$GCC
gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
gcc_ver=\`gcc -dumpversion\`
# An ERE matcher.
EGREP=$lt_EGREP
# The linker used to build libraries.
LD=$lt_LD
# Whether we need hard or soft links.
LN_S=$lt_LN_S
# A BSD-compatible nm program.
NM=$lt_NM
# A symbol stripping program
STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
AS="$AS"
# The name of the directory that contains temporary libtool files.
objdir=$objdir
# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl
# Object file suffix (normally "o").
objext="$ac_objext"
# Old archive suffix (normally "a").
libext="$libext"
# Shared library suffix (normally ".so").
shrext_cmds='$shrext_cmds'
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic
pic_mode=$pic_mode
# What is the maximum length of a command?
max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
need_lib_prefix=$need_lib_prefix
# Do we need a version for libraries?
need_version=$need_version
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self
# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$lt_whole_archive_flag_spec
# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=$lt_thread_safe_flag_spec
# Library versioning type.
version_type=$version_type
# Format of library name prefix.
libname_spec=$lt_libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec=$lt_library_names_spec
# The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
old_archive_cmds=$lt_old_archive_cmds
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
# Commands used to build and install a shared archive.
archive_cmds=$lt_archive_cmds
archive_expsym_cmds=$lt_archive_expsym_cmds
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds
# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=$lt_module_cmds
module_expsym_cmds=$lt_module_expsym_cmds
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
predeps=$lt_predeps
# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=$lt_postdeps
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
# Command to use when deplibs_check_method == file_magic.
file_magic_cmd=$lt_file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$lt_allow_undefined_flag
# Flag that forces no undefined symbols.
no_undefined_flag=$lt_no_undefined_flag
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=$lt_finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# This is the shared library runtime path variable.
runpath_var=$runpath_var
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# If ld is used when linking, flag to hardcode \$libdir into
# a binary during linking. This must work even if \$libdir does
# not exist.
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=$hardcode_direct
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=$hardcode_minus_L
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var
# Set to yes if building a shared library automatically hardcodes DIR into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=$hardcode_automatic
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs
# Compile-time system search path for libraries
sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path"
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols
# The commands to list exported symbols.
export_symbols_cmds=$lt_export_symbols_cmds
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$lt_exclude_expsyms
# Symbols that must always be exported.
include_expsyms=$lt_include_expsyms
# ### END LIBTOOL CONFIG
__EOF__
case $host_os in
aix3*)
cat <<\EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
if test "X${COLLECT_NAMES+set}" != Xset; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
EOF
;;
esac
# We use sed instead of cat because bash on DJGPP gets confused if
# if finds mixed CR/LF and LF-only lines. Since sed operates in
# text mode, it properly converts lines to CR/LF. This bash problem
# is reportedly fixed, but why not run on old versions too?
sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
mv -f "$cfgfile" "$ofile" || \
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
else
# If there is no Makefile yet, we rely on a make rule to execute
# `config.status --recheck' to rerun these tests and create the
# libtool script then.
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
if test -f "$ltmain_in"; then
test -f Makefile && make "$ltmain"
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
# Check whether --with-tags or --without-tags was given.
if test "${with_tags+set}" = set; then
withval="$with_tags"
tagnames="$withval"
fi;
if test -f "$ltmain" && test -n "$tagnames"; then
if test ! -f "${ofile}"; then
{ echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
{ echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
else
{ echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
fi
fi
if test -z "$LTCFLAGS"; then
eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
fi
# Extract list of available tagged configurations in $ofile.
# Note that this assumes the entire list is on one line.
available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
for tagname in $tagnames; do
IFS="$lt_save_ifs"
# Check whether tagname contains only valid characters
case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
"") ;;
*) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
echo "$as_me: error: invalid tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
then
{ { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
{ (exit 1); exit 1; }; }
fi
# Update the list of available tags.
if test -n "$tagname"; then
echo appending configuration tag \"$tagname\" to $ofile
case $tagname in
CXX)
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
(test "X$CXX" != "Xg++"))) ; then
:
else
tagname=""
fi
;;
F77)
if test -n "$F77" && test "X$F77" != "Xno"; then
:
else
tagname=""
fi
;;
GCJ)
if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
:
else
tagname=""
fi
;;
RC)
# Source file extension for RC test sources.
ac_ext=rc
# Object file extension for compiled RC test sources.
objext=o
objext_RC=$objext
# Code to be used in simple compile tests
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
# Code to be used in simple link tests
lt_simple_link_test_code="$lt_simple_compile_test_code"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
# If no C compiler was specified, use CC.
LTCC=${LTCC-"$CC"}
# If no C compiler flags were specified, use CFLAGS.
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
# Allow CC to be a program name with arguments.
compiler=$CC
# save warnings/boilerplate of simple test code
ac_outfile=conftest.$ac_objext
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_compiler_boilerplate=`cat conftest.err`
$rm conftest*
ac_outfile=conftest.$ac_objext
printf "$lt_simple_link_test_code" >conftest.$ac_ext
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
_lt_linker_boilerplate=`cat conftest.err`
$rm conftest*
# Allow CC to be a program name with arguments.
lt_save_CC="$CC"
CC=${RC-"windres"}
compiler=$CC
compiler_RC=$CC
for cc_temp in $compiler""; do
case $cc_temp in
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
\-*) ;;
*) break;;
esac
done
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
lt_cv_prog_compiler_c_o_RC=yes
# The else clause should only fire when bootstrapping the
# libtool distribution, otherwise you forgot to ship ltmain.sh
# with your package, and you will get complaints that there are
# no rules to generate ltmain.sh.
if test -f "$ltmain"; then
# See if we are running on zsh, and set the options which allow our commands through
# without removal of \ escapes.
if test -n "${ZSH_VERSION+set}" ; then
setopt NO_GLOB_SUBST
fi
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
SED SHELL STRIP \
libname_spec library_names_spec soname_spec extract_expsyms_cmds \
old_striplib striplib file_magic_cmd finish_cmds finish_eval \
deplibs_check_method reload_flag reload_cmds need_locks \
lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
lt_cv_sys_global_symbol_to_c_name_address \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
old_postinstall_cmds old_postuninstall_cmds \
compiler_RC \
CC_RC \
LD_RC \
lt_prog_compiler_wl_RC \
lt_prog_compiler_pic_RC \
lt_prog_compiler_static_RC \
lt_prog_compiler_no_builtin_flag_RC \
export_dynamic_flag_spec_RC \
thread_safe_flag_spec_RC \
whole_archive_flag_spec_RC \
enable_shared_with_static_runtimes_RC \
old_archive_cmds_RC \
old_archive_from_new_cmds_RC \
predep_objects_RC \
postdep_objects_RC \
predeps_RC \
postdeps_RC \
compiler_lib_search_path_RC \
archive_cmds_RC \
archive_expsym_cmds_RC \
postinstall_cmds_RC \
postuninstall_cmds_RC \
old_archive_from_expsyms_cmds_RC \
allow_undefined_flag_RC \
no_undefined_flag_RC \
export_symbols_cmds_RC \
hardcode_libdir_flag_spec_RC \
hardcode_libdir_flag_spec_ld_RC \
hardcode_libdir_separator_RC \
hardcode_automatic_RC \
module_cmds_RC \
module_expsym_cmds_RC \
lt_cv_prog_compiler_c_o_RC \
exclude_expsyms_RC \
include_expsyms_RC; do
case $var in
old_archive_cmds_RC | \
old_archive_from_new_cmds_RC | \
archive_cmds_RC | \
archive_expsym_cmds_RC | \
module_cmds_RC | \
module_expsym_cmds_RC | \
old_archive_from_expsyms_cmds_RC | \
export_symbols_cmds_RC | \
extract_expsyms_cmds | reload_cmds | finish_cmds | \
postinstall_cmds | postuninstall_cmds | \
old_postinstall_cmds | old_postuninstall_cmds | \
sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
*)
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
;;
esac
done
case $lt_echo in
*'\$0 --fallback-echo"')
lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
cfgfile="$ofile"
cat <<__EOF__ >> "$cfgfile"
# ### BEGIN LIBTOOL TAG CONFIG: $tagname
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
# Whether or not to build shared libraries.
build_libtool_libs=$enable_shared
# Whether or not to build static libraries.
build_old_libs=$enable_static
# Whether or not to add -lc for building shared libraries.
build_libtool_need_lc=$archive_cmds_need_lc_RC
# Whether or not to disallow shared libs when runtime libs are static
allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
# The host system.
host_alias=$host_alias
host=$host
host_os=$host_os
# The build system.
build_alias=$build_alias
build=$build
build_os=$build_os
# An echo program that does not interpret backslashes.
echo=$lt_echo
# The archiver.
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS
# A C compiler.
LTCC=$lt_LTCC
# LTCC compiler flags.
LTCFLAGS=$lt_LTCFLAGS
# A language-specific compiler.
CC=$lt_compiler_RC
# Is the compiler the GNU C compiler?
with_gcc=$GCC_RC
gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
gcc_ver=\`gcc -dumpversion\`
# An ERE matcher.
EGREP=$lt_EGREP
# The linker used to build libraries.
LD=$lt_LD_RC
# Whether we need hard or soft links.
LN_S=$lt_LN_S
# A BSD-compatible nm program.
NM=$lt_NM
# A symbol stripping program
STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
# Used on cygwin: DLL creation program.
DLLTOOL="$DLLTOOL"
# Used on cygwin: object dumper.
OBJDUMP="$OBJDUMP"
# Used on cygwin: assembler.
AS="$AS"
# The name of the directory that contains temporary libtool files.
objdir=$objdir
# How to create reloadable object files.
reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# How to pass a linker flag through the compiler.
wl=$lt_lt_prog_compiler_wl_RC
# Object file suffix (normally "o").
objext="$ac_objext"
# Old archive suffix (normally "a").
libext="$libext"
# Shared library suffix (normally ".so").
shrext_cmds='$shrext_cmds'
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
pic_flag=$lt_lt_prog_compiler_pic_RC
pic_mode=$pic_mode
# What is the maximum length of a command?
max_cmd_len=$lt_cv_sys_max_cmd_len
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
# Must we lock files when doing compilation?
need_locks=$lt_need_locks
# Do we need the lib prefix for modules?
need_lib_prefix=$need_lib_prefix
# Do we need a version for libraries?
need_version=$need_version
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
# Whether dlopen of programs is supported.
dlopen_self=$enable_dlopen_self
# Whether dlopen of statically linked programs is supported.
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
link_static_flag=$lt_lt_prog_compiler_static_RC
# Compiler flag to turn off builtin functions.
no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
# Compiler flag to generate shared objects directly from archives.
whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
# Compiler flag to generate thread-safe objects.
thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
# Library versioning type.
version_type=$version_type
# Format of library name prefix.
libname_spec=$lt_libname_spec
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec=$lt_library_names_spec
# The coded name of the library, if different from the real name.
soname_spec=$lt_soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
old_archive_cmds=$lt_old_archive_cmds_RC
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Create an old-style archive from a shared archive.
old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
# Create a temporary old-style archive to link instead of a shared archive.
old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
# Commands used to build and install a shared archive.
archive_cmds=$lt_archive_cmds_RC
archive_expsym_cmds=$lt_archive_expsym_cmds_RC
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds
# Commands used to build a loadable module (assumed same as above if empty)
module_cmds=$lt_module_cmds_RC
module_expsym_cmds=$lt_module_expsym_cmds_RC
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
# Dependencies to place before the objects being linked to create a
# shared library.
predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place after the objects being linked to create a
# shared library.
postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Dependencies to place before the objects being linked to create a
# shared library.
predeps=$lt_predeps_RC
# Dependencies to place after the objects being linked to create a
# shared library.
postdeps=$lt_postdeps_RC
# The library search path used internally by the compiler when linking
# a shared library.
compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
# Command to use when deplibs_check_method == file_magic.
file_magic_cmd=$lt_file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
allow_undefined_flag=$lt_allow_undefined_flag_RC
# Flag that forces no undefined symbols.
no_undefined_flag=$lt_no_undefined_flag_RC
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
# Same as above, but a single script fragment to be evaled but not shown.
finish_eval=$lt_finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
# Transform the output of nm in a C name address pair
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# This is the shared library runtime path variable.
runpath_var=$runpath_var
# This is the shared library path variable.
shlibpath_var=$shlibpath_var
# Is shlibpath searched before the hard-coded library search path?
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
hardcode_action=$hardcode_action_RC
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# Flag to hardcode \$libdir into a binary during linking.
# This must work even if \$libdir does not exist.
hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
# If ld is used when linking, flag to hardcode \$libdir into
# a binary during linking. This must work even if \$libdir does
# not exist.
hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
# Whether we need a single -rpath flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
hardcode_direct=$hardcode_direct_RC
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
hardcode_minus_L=$hardcode_minus_L_RC
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
# Set to yes if building a shared library automatically hardcodes DIR into the library
# and all subsequent libraries and executables linked against it.
hardcode_automatic=$hardcode_automatic_RC
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
# Run-time system search path for libraries
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
fix_srcfile_path="$fix_srcfile_path_RC"
# Set to yes if exported symbols are required.
always_export_symbols=$always_export_symbols_RC
# The commands to list exported symbols.
export_symbols_cmds=$lt_export_symbols_cmds_RC
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
exclude_expsyms=$lt_exclude_expsyms_RC
# Symbols that must always be exported.
include_expsyms=$lt_include_expsyms_RC
# ### END LIBTOOL TAG CONFIG: $tagname
__EOF__
else
# If there is no Makefile yet, we rely on a make rule to execute
# `config.status --recheck' to rerun these tests and create the
# libtool script then.
ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
if test -f "$ltmain_in"; then
test -f Makefile && make "$ltmain"
fi
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
CC="$lt_save_CC"
;;
*)
{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
{ (exit 1); exit 1; }; }
;;
esac
# Append the new tag name to the list of available tags.
if test -n "$tagname" ; then
available_tags="$available_tags $tagname"
fi
fi
done
IFS="$lt_save_ifs"
# Now substitute the updated list of available tags.
if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
mv "${ofile}T" "$ofile"
chmod +x "$ofile"
else
rm -f "${ofile}T"
{ { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# Prevent multiple expansion
# Check compiler features
echo "$as_me:$LINENO: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
return 0;
if (sizeof (size_t))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
:
else
cat >>confdefs.h <<_ACEOF
#define size_t unsigned
_ACEOF
fi
# AC_C_CONST
echo "$as_me:$LINENO: checking for working volatile" >&5
echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
if test "${ac_cv_c_volatile+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
volatile int x;
int * volatile y;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_volatile=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_volatile=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
echo "${ECHO_T}$ac_cv_c_volatile" >&6
if test $ac_cv_c_volatile = no; then
cat >>confdefs.h <<\_ACEOF
#define volatile
_ACEOF
fi
echo "$as_me:$LINENO: checking for inline" >&5
echo $ECHO_N "checking for inline... $ECHO_C" >&6
if test "${ac_cv_c_inline+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_c_inline=no
for ac_kw in inline __inline__ __inline; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#ifndef __cplusplus
typedef int foo_t;
static $ac_kw foo_t static_foo () {return 0; }
$ac_kw foo_t foo () {return 0; }
#endif
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_inline=$ac_kw; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
fi
echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
echo "${ECHO_T}$ac_cv_c_inline" >&6
case $ac_cv_c_inline in
inline | yes) ;;
*)
case $ac_cv_c_inline in
no) ac_val=;;
*) ac_val=$ac_cv_c_inline;;
esac
cat >>confdefs.h <<_ACEOF
#ifndef __cplusplus
#define inline $ac_val
#endif
_ACEOF
;;
esac
WULFWARE_CFLAGS="-I$includedir"
WULFWARE_LIBS="-L$libdir -ldieharder"
# Checks for libraries.
# FIXME: Replace `main' with a function in `-lcurses':
echo "$as_me:$LINENO: checking for main in -lcurses" >&5
echo $ECHO_N "checking for main in -lcurses... $ECHO_C" >&6
if test "${ac_cv_lib_curses_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lcurses $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_curses_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_curses_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_curses_main" >&5
echo "${ECHO_T}$ac_cv_lib_curses_main" >&6
if test $ac_cv_lib_curses_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBCURSES 1
_ACEOF
LIBS="-lcurses $LIBS"
fi
# FIXME: Replace `main' with a function in `-lm':
echo "$as_me:$LINENO: checking for main in -lm" >&5
echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6
if test "${ac_cv_lib_m_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_m_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_m_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5
echo "${ECHO_T}$ac_cv_lib_m_main" >&6
if test $ac_cv_lib_m_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBM 1
_ACEOF
LIBS="-lm $LIBS"
fi
# FIXME: Replace `main' with a function in `-local_icons':
echo "$as_me:$LINENO: checking for main in -local_icons" >&5
echo $ECHO_N "checking for main in -local_icons... $ECHO_C" >&6
if test "${ac_cv_lib_ocal_icons_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-local_icons $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_ocal_icons_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_ocal_icons_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_ocal_icons_main" >&5
echo "${ECHO_T}$ac_cv_lib_ocal_icons_main" >&6
if test $ac_cv_lib_ocal_icons_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBOCAL_ICONS 1
_ACEOF
LIBS="-local_icons $LIBS"
fi
# FIXME: Replace `main' with a function in `-lpthread':
echo "$as_me:$LINENO: checking for main in -lpthread" >&5
echo $ECHO_N "checking for main in -lpthread... $ECHO_C" >&6
if test "${ac_cv_lib_pthread_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpthread $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pthread_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pthread_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_main" >&5
echo "${ECHO_T}$ac_cv_lib_pthread_main" >&6
if test $ac_cv_lib_pthread_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPTHREAD 1
_ACEOF
LIBS="-lpthread $LIBS"
fi
# FIXME: Replace `main' with a function in `-lwulf':
echo "$as_me:$LINENO: checking for main in -lwulf" >&5
echo $ECHO_N "checking for main in -lwulf... $ECHO_C" >&6
if test "${ac_cv_lib_wulf_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lwulf $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_wulf_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_wulf_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_wulf_main" >&5
echo "${ECHO_T}$ac_cv_lib_wulf_main" >&6
if test $ac_cv_lib_wulf_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBWULF 1
_ACEOF
LIBS="-lwulf $LIBS"
fi
# FIXME: Replace `main' with a function in `-lxml2':
echo "$as_me:$LINENO: checking for main in -lxml2" >&5
echo $ECHO_N "checking for main in -lxml2... $ECHO_C" >&6
if test "${ac_cv_lib_xml2_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lxml2 $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_xml2_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_xml2_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_xml2_main" >&5
echo "${ECHO_T}$ac_cv_lib_xml2_main" >&6
if test $ac_cv_lib_xml2_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBXML2 1
_ACEOF
LIBS="-lxml2 $LIBS"
fi
# FIXME: Replace `main' with a function in `-lz':
echo "$as_me:$LINENO: checking for main in -lz" >&5
echo $ECHO_N "checking for main in -lz... $ECHO_C" >&6
if test "${ac_cv_lib_z_main+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
main ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_z_main=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_z_main=no
fi
rm -f conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_z_main" >&5
echo "${ECHO_T}$ac_cv_lib_z_main" >&6
if test $ac_cv_lib_z_main = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBZ 1
_ACEOF
LIBS="-lz $LIBS"
fi
# Checks for typedefs, structures, and compiler characteristics.
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
/* FIXME: Include the comments suggested by Paul. */
#ifndef __cplusplus
/* Ultrix mips cc rejects this. */
typedef int charset[2];
const charset x;
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in
an arm of an if-expression whose if-part is not a constant
expression */
const char *g = "string";
ccp = &g + (g ? g-g : 0);
/* HPUX 7.0 cc rejects these. */
++ccp;
p = (char**) ccp;
ccp = (char const *const *) p;
{ /* SCO 3.2v4 cc rejects this. */
char *t;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
}
{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
int x[] = {25, 17};
const int *foo = &x[0];
++foo;
}
{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
typedef const int *iptr;
iptr p = 0;
++p;
}
{ /* AIX XL C 1.02.0.0 rejects this saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
struct s { int j; const int *ap[3]; };
struct s *b; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
}
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_c_const=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
if test $ac_cv_c_const = no; then
cat >>confdefs.h <<\_ACEOF
#define const
_ACEOF
fi
echo "$as_me:$LINENO: checking for size_t" >&5
echo $ECHO_N "checking for size_t... $ECHO_C" >&6
if test "${ac_cv_type_size_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
int
main ()
{
if ((size_t *) 0)
return 0;
if (sizeof (size_t))
return 0;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_type_size_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_type_size_t=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
echo "${ECHO_T}$ac_cv_type_size_t" >&6
if test $ac_cv_type_size_t = yes; then
:
else
cat >>confdefs.h <<_ACEOF
#define size_t unsigned
_ACEOF
fi
echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
if test "${ac_cv_header_time+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include
#include
#include