home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume41 / rperf / part01 < prev    next >
Encoding:
Text File  |  1993-12-19  |  58.9 KB  |  2,298 lines

  1. Newsgroups: comp.sources.misc
  2. From: fitz@rpi.edu (Brian P. Fitzgerald)
  3. Subject: v41i039:  rperf - performance monitoring of network hosts, v3.1, Part01/04
  4. Message-ID: <csm-v41i039=rperf.145038@sparky.Sterling.COM>
  5. X-Md4-Signature: 7146c8b9faaafb4cb378f269ebfbd1a9
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Rensselaer Polytechnic Institute, Troy NY
  8. Date: Sun, 19 Dec 1993 20:51:02 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: fitz@rpi.edu (Brian P. Fitzgerald)
  12. Posting-number: Volume 41, Issue 39
  13. Archive-name: rperf/part01
  14. Environment: UNIX
  15. Supersedes: rperf: Volume 39, Issue 69-71
  16.  
  17. rperf is similar to xmeter, or SunView perfmeter, but is intended for
  18. use on ascii terminals or for logging.  rperf obtains system statistics
  19. from one or more network hosts and prints them to the standard output
  20. at periodic intervals, in a format similar to rup, vmstat, and
  21. netstat.  rperf reports on cpu load, disk activity, network interface
  22. activity, and virtual memory activity.
  23.  
  24. If invoked as "rup", it prints the uptime and system load.
  25.  
  26. New features:
  27. - work around bugs in some vendors' versions of rpc.rstatd
  28. - optional rstatd version selection
  29. - trim common suffix in hostname display
  30. - optional screen clear before each display
  31. - print '-' for unreported statistics
  32. - improved algorithms
  33. - many useful debug mode features
  34.  
  35. This is a major release.  Previous versions of rperf should be
  36. discarded.
  37.  
  38. Building:
  39.  
  40. Type "./configure", then "make".
  41.  
  42. Running:
  43.  
  44. Try "rperf" or "rperf <host>"
  45. Every monitored host must run rstatd.  Check with:
  46. rpcinfo -u <host> rstatd
  47.  
  48. Send bug reports and fixes to fitz@rpi.edu.
  49.  
  50. Runs on 386BSD, Alliant, Amiga, BSDi, DEC, DG, ESIX, HP, IBM, IRIS,
  51. Linux, MIPS, Motorolla, NeXT, NetBSD, SCO, Sun.
  52.  
  53. If it runs on your machine, please tell me!
  54.  
  55. Brian
  56. ----
  57. #! /bin/sh
  58. # This is a shell archive.  Remove anything before this line, then unpack
  59. # it by saving it into a file and typing "sh file".  To overwrite existing
  60. # files, type "sh file -c".  You can also feed this as standard input via
  61. # unshar, or by typing "sh <file", e.g..  The tool that generated this
  62. # shell archive is called "shar", and is available by anonymous ftp
  63. # from ftp.uu.net in subdirectory /usenet/comp.sources.unix, and from many
  64. # other places. Check 'archie' for the latest locations.  If this archive
  65. # is complete, you will see the following message at the end:
  66. #        "End of archive 1 (of 4)."
  67. # Contents:  README FAQ configure configure.in MANIFEST Makefile.in
  68. #   rstat.x rstat.h term.h
  69. # Wrapped by fitzgb@mml0.meche.rpi.edu on Wed Dec 15 13:06:53 1993
  70. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  71. if test -f 'README' -a "${1}" != "-c" ; then 
  72.   echo shar: Will not clobber existing file \"'README'\"
  73. else
  74. echo shar: Extracting \"'README'\" \(5921 characters\)
  75. sed "s/^X//" >'README' <<'END_OF_FILE'
  76. Xrperf README file
  77. X----- ------ ----
  78. X
  79. XContents of this file:
  80. X    DESCRIPTION
  81. X    BUILDING
  82. X    BUILDING HINTS
  83. X    RUNNING
  84. X    RUNNING HINTS
  85. X    PROBLEMS WITH BROADCAST MODE
  86. X    KNOWN PROBLEMS
  87. X    BUG REPORTS
  88. X    PLATFORMS SUPPORTED
  89. X
  90. XDESCRIPTION
  91. X-----------
  92. X
  93. Xrperf is similar to xmeter, or SunView perfmeter, but is intended for
  94. Xuse on ascii terminals or for logging.  rperf obtains system statistics
  95. Xfrom one or more network hosts and prints them to the standard output
  96. Xat periodic intervals, in a format similar to rup, vmstat, and
  97. Xnetstat.  rperf reports on cpu load, disk activity, network interface
  98. Xactivity, and virtual memory activity.
  99. X
  100. XIf installed as rup, the program prints the hostname, uptime, and load
  101. Xaverage once, then exits.  A hard or symbolic link to rperf may be used
  102. Xfor the installation.
  103. X
  104. XBUILDING
  105. X--------
  106. X
  107. XType "./configure", then type "make".
  108. X
  109. XBUILDING HINTS
  110. X--------------
  111. X
  112. X-  Copious syntax errors:  you may need to force K&R style
  113. Xcompilation.  In the Makefile, try modifying CFLAGS appropriately for
  114. Xyour compiler.
  115. X
  116. X-  Configuration errors:  If the sources do not compile, it may be
  117. Xbecause the configure script does not work on your machine.  For
  118. Xexample, on ESIX, all configuration checks that involve using the
  119. Xcompiler and that are performed after the library checks are
  120. Xpotentially incorrect, and manual editing of the Makefile is required.
  121. X
  122. X-  on many systems, the symbols _xdr_* and _clnt_* are defined in
  123. Xthe C library.  On other systems, the needed objects are in other
  124. Xlibraries, and must be specified on the link command line.
  125. X
  126. X-  If the symbols are not defined in any library on your system, you
  127. Xcan obtain the RPC library by anonymous ftp from wuarchive.wustl.edu in
  128. X/systems/sun/sun-exchange/rpc4.0
  129. X
  130. X-  if the client stubs provided do not compile on your machine, but you
  131. Xhave rpcgen (usually /bin/rpcgen), type "make gen" first.
  132. X
  133. XI would appreciate receiving patches from anyone who needed to modify
  134. Xthe sources or the Makefile to make the program compile on their
  135. Xmachine.  Patches should be sent to fitz@rpi.edu.  Please indicate the
  136. Xmanufacturer and model of your computer, and the name and version of
  137. Xyour operating system.
  138. X
  139. XRUNNING
  140. X-------
  141. X
  142. Xtype "rperf" to monitor all hosts on the local net, or "rperf host ..."
  143. Xto monitor a particular list of hosts.
  144. X
  145. XRUNNING HINTS
  146. X-------------
  147. X
  148. XEvery monitored host must run rstatd.  Check with:
  149. X
  150. Xrpcinfo -u <host> rstatd
  151. X
  152. XIf rstatd is not registered, uncomment rstatd from /etc/inetd.conf on
  153. Xthe host to be monitored, and send the inetd process a SIGHUP, as
  154. Xfollows:
  155. X
  156. Xps axc | grep inetd (note pid of inetd)
  157. Xkill -HUP <pid>
  158. X
  159. Xrs6000 users check your manual for the appropriate smit command.
  160. X
  161. X-  if your system needs rpc.rstatd, you may obtain it from
  162. Xwuarchive.wustl.edu in /systems/sun/sun-exchange/rpc4.0/rpcsvc. You
  163. Xwill need rstat_proc.c, rstat.x, and Makefile.  The executable will be
  164. Xcalled rstat_svc, but it's the same as rpc.rstatd.
  165. X
  166. XUnfortunately, the public version of rpc.rstatd does not support
  167. Xversion 4 of the rstatd protocol, as the latest Sun distribution does.
  168. X
  169. XIt also contains a serious error.  In rstat_proc.c,
  170. X
  171. Xunion {
  172. X    struct stats s1;
  173. X    struct statsswtch s2;
  174. X    struct statstime s3;
  175. X} stats_all;
  176. X
  177. Xdoesn't work because the members don't align (For example, look at the
  178. Xbyte offset of
  179. Xstats_all.s1.if_opackets vs
  180. Xstats_all.s2.if_opackets vs
  181. Xstats_all.s3.if_opackets).  The whole thing was rewritten
  182. Xby Sun, but the source is not public.
  183. X
  184. XPROBLEMS WITH BROADCAST MODE
  185. X-------- ---- --------- ----
  186. X
  187. XA lack of output in broadcast mode sometimes indicates a system
  188. Xconfiguration problem on the local machine or on the remote host.  If a
  189. Xhost on the local broadcast network does not respond to broadcasts
  190. X("rperf -b") but responds to rpc calls when specific hosts are supplied
  191. Xon the command line, then a system configuration problem is indicated.
  192. X
  193. XThe following troubleshooting suggestions and comments may be helpful:
  194. X
  195. X- check that other programs, besides rperf, that are designed to
  196. Xbroadcast are functioning properly.  See "rup", "rusers", "rpcinfo -b",
  197. Xand "ypbind", for example.
  198. X
  199. X- check that its network interface is configured to receive
  200. Xbroadcasts.  On some systems, this is done with the proper "netmask"
  201. Xand "broadcast" options to ifconfig.  These parameters are usually set
  202. Xat boot time, possibly in /etc/rc.local or /etc/rc.boot.  On some
  203. Xsystems, the relevant configuration is in /etc/tcpip.params.
  204. X
  205. X- a host connected to a smart hub may not be able to broadcast to other
  206. Xhosts.
  207. X
  208. X- a Linux user reports that a problem with ethernet addresses in
  209. Xbroadcast mode in Linux 0.99p13 was fixed in Linux 0.99p14.
  210. X
  211. X- an ESIX 4.0.4 user received the following message:  "clnt_broadcast:
  212. XRPC: Unable to send".  No additional details are available.
  213. X
  214. XKNOWN PROBLEMS
  215. X----- ---------
  216. X
  217. XThe first rstat reply from a newly started rpc.rstatd daemon on AIX
  218. X(and others) is cumulative, but the rest of the replies are incremental
  219. Xfrom the previous call.  The code attempts to work around this.
  220. X
  221. XBus Error.  On some systems, object code generated by gcc version 1.xx
  222. Xmay be incompatible with system libraries.  In particular, the use of
  223. Xgcc version 1 on sparc stations will result in a bus error in
  224. Xclntudp_create().  For sparcstations, use to cc to compile, or a more
  225. Xrecent version of gcc.
  226. X
  227. XBUG REPORTS
  228. X-----------
  229. X
  230. XSend bug reports, bug fixes, comments, and suggestions to
  231. Xfitz@rpi.edu.  Please indicate the manufacturer and model of your
  232. Xcomputer, the name and version of your operating system and the version
  233. Xof rperf that you are using.  Accompany reports about configuring or
  234. Xcompiling problems with the relevant configuration settings in
  235. Xconfig.status (grep ="'" config.status)
  236. X
  237. XPLATFORMS SUPPORTED
  238. X-------------------
  239. X
  240. XAlliant
  241. XAmiga
  242. XESIX
  243. XHP
  244. XIBM
  245. XIRIS
  246. XLinux
  247. XMIPS
  248. XMotorola
  249. XNeXT
  250. XSCO
  251. XSun
  252. XUltrix ...
  253. X
  254. XIf it runs on your machine, please tell me!
  255. X
  256. XBrian P. Fitzgerald
  257. XMechanics of Materials Laboratory
  258. XRensselaer Polytechnic Institute
  259. XTroy, New York
  260. END_OF_FILE
  261. if test 5921 -ne `wc -c <'README'`; then
  262.     echo shar: \"'README'\" unpacked with wrong size!
  263. fi
  264. # end of 'README'
  265. fi
  266. if test -f 'FAQ' -a "${1}" != "-c" ; then 
  267.   echo shar: Will not clobber existing file \"'FAQ'\"
  268. else
  269. echo shar: Extracting \"'FAQ'\" \(783 characters\)
  270. sed "s/^X//" >'FAQ' <<'END_OF_FILE'
  271. XAnswers to frequently asked questions about rperf
  272. X
  273. XCONTENTS OF THIS FILE
  274. X---------------------
  275. X1)  Could rperf report additional kernel statistics?
  276. X2)  Can rperf broadcast on just one network interface?
  277. X
  278. X1)  Could rperf report additional kernel statistics?
  279. X
  280. XIt could be done.  rperf queries rpc.rstatd, the network kernel
  281. Xstatistics daemon.  Currently, rpc.rstatd reports the statistics listed
  282. Xin /usr/rpcsvc/rstat.x.  You could extend rstat.x and then modify
  283. Xrpc.rstatd and rperf
  284. X
  285. X2)  Can rperf broadcast on just one network interface?
  286. X
  287. XNot easily.  The rperf broadcast mode uses the clnt_broadcast() routine
  288. Xin the RPC library.  clnt_broadcast() does not broadcast on a single
  289. Xinterface.  To confine the broadcast to a single network, run rperf
  290. Xfrom a host other than the gateway.
  291. END_OF_FILE
  292. if test 783 -ne `wc -c <'FAQ'`; then
  293.     echo shar: \"'FAQ'\" unpacked with wrong size!
  294. fi
  295. # end of 'FAQ'
  296. fi
  297. if test -f 'configure' -a "${1}" != "-c" ; then 
  298.   echo shar: Will not clobber existing file \"'configure'\"
  299. else
  300. echo shar: Extracting \"'configure'\" \(27666 characters\)
  301. sed "s/^X//" >'configure' <<'END_OF_FILE'
  302. X#!/bin/sh
  303. X# Guess values for system-dependent variables and create Makefiles.
  304. X# Generated automatically using autoconf version 1.7
  305. X# by fitzgb@mml0.meche.rpi.edu on Wed Dec 15 13:06:36 EST 1993
  306. X# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
  307. X
  308. X# This program is free software; you can redistribute it and/or modify
  309. X# it under the terms of the GNU General Public License as published by
  310. X# the Free Software Foundation; either version 2, or (at your option)
  311. X# any later version.
  312. X
  313. X# This program is distributed in the hope that it will be useful,
  314. X# but WITHOUT ANY WARRANTY; without even the implied warranty of
  315. X# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  316. X# GNU General Public License for more details.
  317. X
  318. X# You should have received a copy of the GNU General Public License
  319. X# along with this program; if not, write to the Free Software
  320. X# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  321. X
  322. X# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
  323. X#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
  324. X# Ignores all args except --srcdir, --prefix, --exec-prefix, and
  325. X# --with-PACKAGE[=VALUE] unless this script has special code to handle it.
  326. X
  327. Xfor arg
  328. Xdo
  329. X  # Handle --exec-prefix with a space before the argument.
  330. X  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  331. X  # Handle --host with a space before the argument.
  332. X  elif test x$next_host = xyes; then next_host=
  333. X  # Handle --prefix with a space before the argument.
  334. X  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  335. X  # Handle --srcdir with a space before the argument.
  336. X  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  337. X  else
  338. X    case $arg in
  339. X     # For backward compatibility, recognize -exec-prefix and --exec_prefix.
  340. X     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
  341. X    exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  342. X     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  343. X    next_exec_prefix=yes ;;
  344. X
  345. X     -gas | --gas | --ga | --g) ;;
  346. X
  347. X     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
  348. X     -host | --host | --hos | --ho | --h)
  349. X    next_host=yes ;;
  350. X
  351. X     -nfp | --nfp | --nf) ;;
  352. X
  353. X     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  354. X    prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  355. X     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  356. X    next_prefix=yes ;;
  357. X
  358. X     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
  359. X    srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
  360. X     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
  361. X    next_srcdir=yes ;;
  362. X
  363. X     -with-* | --with-*)
  364. X       package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
  365. X       # Reject names that aren't valid shell variable names.
  366. X       if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  367. X         echo "configure: $package: invalid package name" >&2; exit 1
  368. X       fi
  369. X       package=`echo $package| sed 's/-/_/g'`
  370. X       case "$arg" in
  371. X         *=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
  372. X         *) val=1 ;;
  373. X       esac
  374. X       eval "with_$package='$val'" ;;
  375. X
  376. X     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
  377. X       verbose=yes ;;
  378. X
  379. X     *) ;;
  380. X    esac
  381. X  fi
  382. Xdone
  383. X
  384. Xtrap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
  385. Xtrap 'rm -f confdefs*' 0
  386. X
  387. X# NLS nuisances.
  388. X# These must not be set unconditionally because not all systems understand
  389. X# e.g. LANG=C (notably SCO).
  390. Xif test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
  391. Xif test "${LANG+set}"   = 'set' ; then LANG=C;   export LANG;   fi
  392. X
  393. Xrm -f conftest* confdefs.h
  394. X# AIX cpp loses on an empty file, so make sure it contains at least a newline.
  395. Xecho > confdefs.h
  396. Xcompile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
  397. X
  398. X# A filename unique to this package, relative to the directory that
  399. X# configure is in, which we can look for to find out if srcdir is correct.
  400. Xunique_file=configure.in
  401. X
  402. X# Find the source files, if location was not specified.
  403. Xif test -z "$srcdir"; then
  404. X  srcdirdefaulted=yes
  405. X  # Try the directory containing this script, then `..'.
  406. X  prog=$0
  407. X  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
  408. X  test "X$confdir" = "X$prog" && confdir=.
  409. X  srcdir=$confdir
  410. X  if test ! -r $srcdir/$unique_file; then
  411. X    srcdir=..
  412. X  fi
  413. Xfi
  414. Xif test ! -r $srcdir/$unique_file; then
  415. X  if test x$srcdirdefaulted = xyes; then
  416. X    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
  417. X  else
  418. X    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
  419. X  fi
  420. X  exit 1
  421. Xfi
  422. X# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
  423. X# But we can't avoid them for `..', to make subdirectories work.
  424. Xcase $srcdir in
  425. X  .|/*|~*) ;;
  426. X  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
  427. Xesac
  428. X
  429. X
  430. X# Save the original args to write them into config.status later.
  431. Xconfigure_args="$*"
  432. X
  433. X
  434. X# configure.in for rperf
  435. X#
  436. X# This program may be copied, redistributed in any form, source or 
  437. X# binary, and used for any purpose, provided this copyright notice is 
  438. X# retained. 
  439. X# 
  440. X#    @(#)configure.in    3.1 12/15/93 (c) Copyright Brian P. Fitzgerald 
  441. X#    Rensselaer Polytechnic Institute 
  442. X
  443. X# definitions
  444. X
  445. X
  446. X# configure varibles
  447. X
  448. X
  449. X
  450. X
  451. X
  452. X
  453. X
  454. X
  455. X# compiler configuration
  456. X
  457. Xif test -z "$CC"; then
  458. X  # Extract the first word of `gcc', so it can be a program name with args.
  459. X  set dummy gcc; word=$2
  460. X  echo checking for $word
  461. X  IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  462. X  for dir in $PATH; do
  463. X    test -z "$dir" && dir=.
  464. X    if test -f $dir/$word; then
  465. X      CC="gcc"
  466. X      break
  467. X    fi
  468. X  done
  469. X  IFS="$saveifs"
  470. Xfi
  471. Xtest -z "$CC" && CC="cc"
  472. Xtest -n "$CC" && test -n "$verbose" && echo "    setting CC to $CC"
  473. X
  474. X# Find out if we are using GNU C, under whatever name.
  475. Xcat > conftest.c <<EOF
  476. X#ifdef __GNUC__
  477. X  yes
  478. X#endif
  479. XEOF
  480. X${CC-cc} -E conftest.c > conftest.out 2>&1
  481. Xif egrep yes conftest.out >/dev/null 2>&1; then
  482. X  GCC=1 # For later tests.
  483. Xfi
  484. Xrm -f conftest*
  485. X
  486. Xgccv1=`${CC-cc} -v  2>&1 | grep 'gcc version 1'`
  487. Xif test -n "$gccv1" ; then
  488. X    echo "Caution:  $gccv1 detected."
  489. X    echo "Some system library objects may be incompatible."
  490. X    echo "Using cc"
  491. X    CC=cc
  492. Xfi
  493. Xecho checking for AIX
  494. Xecho checking how to run the C preprocessor
  495. Xif test -z "$CPP"; then
  496. X  # This must be in double quotes, not single quotes, because CPP may get
  497. X  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  498. X  # make.  It must be expanded now.
  499. X  CPP="${CC-cc} -E"
  500. X  cat > conftest.c <<EOF
  501. X#include "confdefs.h"
  502. X#include <stdio.h>
  503. XSyntax Error
  504. XEOF
  505. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  506. Xif test -z "$err"; then
  507. X  :
  508. Xelse
  509. X  rm -rf conftest*
  510. X  CPP=/lib/cpp
  511. Xfi
  512. Xrm -f conftest*
  513. Xfi
  514. Xtest ".${verbose}" != "." && echo "    setting CPP to $CPP"
  515. X
  516. Xcat > conftest.c <<EOF
  517. X#include "confdefs.h"
  518. X#ifdef _AIX
  519. X  yes
  520. X#endif
  521. X
  522. XEOF
  523. Xeval "$CPP conftest.c > conftest.out 2>&1"
  524. Xif egrep "yes" conftest.out >/dev/null 2>&1; then
  525. X  rm -rf conftest*
  526. X  
  527. X{
  528. Xtest -n "$verbose" && \
  529. Xecho "    defining _ALL_SOURCE"
  530. Xecho "#define" _ALL_SOURCE 1 >> confdefs.h
  531. XDEFS="$DEFS -D_ALL_SOURCE=1"
  532. X}
  533. X
  534. X
  535. Xfi
  536. Xrm -f conftest*
  537. X
  538. X
  539. Xecho checking for minix/config.h
  540. Xcat > conftest.c <<EOF
  541. X#include "confdefs.h"
  542. X#include <minix/config.h>
  543. XEOF
  544. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  545. Xif test -z "$err"; then
  546. X  rm -rf conftest*
  547. X  MINIX=1
  548. X
  549. Xfi
  550. Xrm -f conftest*
  551. X
  552. X# The Minix shell can't assign to the same variable on the same line!
  553. Xif test -n "$MINIX"; then
  554. X  
  555. X{
  556. Xtest -n "$verbose" && \
  557. Xecho "    defining _POSIX_SOURCE"
  558. Xecho "#define" _POSIX_SOURCE 1 >> confdefs.h
  559. XDEFS="$DEFS -D_POSIX_SOURCE=1"
  560. X}
  561. X
  562. X  
  563. X{
  564. Xtest -n "$verbose" && \
  565. Xecho "    defining" _POSIX_1_SOURCE to be 2
  566. Xecho "#define" _POSIX_1_SOURCE 2 >> confdefs.h
  567. XDEFS="$DEFS -D_POSIX_1_SOURCE=2"
  568. X}
  569. X
  570. X  
  571. X{
  572. Xtest -n "$verbose" && \
  573. Xecho "    defining _MINIX"
  574. Xecho "#define" _MINIX 1 >> confdefs.h
  575. XDEFS="$DEFS -D_MINIX=1"
  576. X}
  577. X
  578. Xfi
  579. X
  580. Xecho checking for POSIXized ISC
  581. Xif test -d /etc/conf/kconfig.d &&
  582. X  grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  583. Xthen
  584. X  ISC=1 # If later tests want to check for ISC.
  585. X  
  586. X{
  587. Xtest -n "$verbose" && \
  588. Xecho "    defining _POSIX_SOURCE"
  589. Xecho "#define" _POSIX_SOURCE 1 >> confdefs.h
  590. XDEFS="$DEFS -D_POSIX_SOURCE=1"
  591. X}
  592. X
  593. X  if test -n "$GCC"; then
  594. X    CC="$CC -posix"
  595. X  else
  596. X    CC="$CC -Xp"
  597. X  fi
  598. Xfi
  599. X
  600. Xecho checking for ANSI C header files
  601. Xcat > conftest.c <<EOF
  602. X#include "confdefs.h"
  603. X#include <stdlib.h>
  604. X#include <stdarg.h>
  605. X#include <string.h>
  606. X#include <float.h>
  607. XEOF
  608. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  609. Xif test -z "$err"; then
  610. X  rm -rf conftest*
  611. X  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  612. Xecho '#include "confdefs.h"
  613. X#include <string.h>' > conftest.c
  614. Xeval "$CPP conftest.c > conftest.out 2>&1"
  615. Xif egrep "memchr" conftest.out >/dev/null 2>&1; then
  616. X  rm -rf conftest*
  617. X  # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  618. Xcat > conftest.c <<EOF
  619. X#include "confdefs.h"
  620. X#include <ctype.h>
  621. X#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  622. X#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  623. X#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
  624. Xint main () { int i; for (i = 0; i < 256; i++)
  625. Xif (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  626. Xexit (0); }
  627. X
  628. XEOF
  629. Xeval $compile
  630. Xif test -s conftest && (./conftest; exit) 2>/dev/null; then
  631. X  
  632. X{
  633. Xtest -n "$verbose" && \
  634. Xecho "    defining STDC_HEADERS"
  635. Xecho "#define" STDC_HEADERS 1 >> confdefs.h
  636. XDEFS="$DEFS -DSTDC_HEADERS=1"
  637. X}
  638. X
  639. X
  640. Xfi
  641. Xrm -fr conftest*
  642. X
  643. Xfi
  644. Xrm -f conftest*
  645. X
  646. X
  647. Xfi
  648. Xrm -f conftest*
  649. X
  650. X
  651. Xecho checking for checking for sgi
  652. Xcat > conftest.c <<EOF
  653. X#include "confdefs.h"
  654. X
  655. Xint main() { exit(0); }
  656. Xint t() { 
  657. X#ifndef sgi
  658. Xintentional_error
  659. X#endif
  660. X }
  661. XEOF
  662. Xif eval $compile; then
  663. X  rm -rf conftest*
  664. X  if test "$CC" = "cc" ; then CFLAGS="${CFLAGS} -cckr" ; fi
  665. X
  666. Xfi
  667. Xrm -f conftest*
  668. X
  669. X
  670. Xecho checking how to run the C preprocessor
  671. Xif test -z "$CPP"; then
  672. X  # This must be in double quotes, not single quotes, because CPP may get
  673. X  # substituted into the Makefile and ``${CC-cc}'' will simply confuse
  674. X  # make.  It must be expanded now.
  675. X  CPP="${CC-cc} -E"
  676. X  cat > conftest.c <<EOF
  677. X#include "confdefs.h"
  678. X#include <stdio.h>
  679. XSyntax Error
  680. XEOF
  681. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  682. Xif test -z "$err"; then
  683. X  :
  684. Xelse
  685. X  rm -rf conftest*
  686. X  CPP=/lib/cpp
  687. Xfi
  688. Xrm -f conftest*
  689. Xfi
  690. Xtest ".${verbose}" != "." && echo "    setting CPP to $CPP"
  691. X
  692. X
  693. X# programming and installation utilities
  694. X
  695. Xif test -z "$RANLIB"; then
  696. X  # Extract the first word of `ranlib', so it can be a program name with args.
  697. X  set dummy ranlib; word=$2
  698. X  echo checking for $word
  699. X  IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  700. X  for dir in $PATH; do
  701. X    test -z "$dir" && dir=.
  702. X    if test -f $dir/$word; then
  703. X      RANLIB="ranlib"
  704. X      break
  705. X    fi
  706. X  done
  707. X  IFS="$saveifs"
  708. Xfi
  709. Xtest -z "$RANLIB" && RANLIB=":"
  710. Xtest -n "$RANLIB" && test -n "$verbose" && echo "    setting RANLIB to $RANLIB"
  711. X
  712. Xecho checking for ln -s
  713. Xrm -f conftestdata
  714. Xif ln -s X conftestdata 2>/dev/null
  715. Xthen
  716. X  rm -f conftestdata
  717. X  LN_S="ln -s"
  718. Xelse
  719. X  LN_S=ln
  720. Xfi
  721. X
  722. X
  723. Xif test -z "$LINT"; then
  724. X  # Extract the first word of `lint', so it can be a program name with args.
  725. X  set dummy lint; word=$2
  726. X  echo checking for $word
  727. X  IFS="${IFS=     }"; saveifs="$IFS"; IFS="${IFS}:"
  728. X  for dir in $PATH; do
  729. X    test -z "$dir" && dir=.
  730. X    if test -f $dir/$word; then
  731. X      LINT="lint"
  732. X      break
  733. X    fi
  734. X  done
  735. X  IFS="$saveifs"
  736. Xfi
  737. Xtest -z "$LINT" && LINT="@echo no lint;false"
  738. Xtest -n "$LINT" && test -n "$verbose" && echo "    setting LINT to $LINT"
  739. X
  740. Xif test "$LINT" = lint ; then
  741. X  echo checking for lint pass 1 option
  742. X  rm -f conftest.c conftest.ln
  743. X  echo 'void foo(){}' > conftest.c
  744. X  $LINT -i conftest.c > /dev/null 2>&1
  745. X  if test -f conftest.ln ; then
  746. X    LINT_PASS1=-i
  747. X  else
  748. X    $LINT -c conftest.c > /dev/null 2>&1
  749. X    if test -f conftest.ln ; then
  750. X      LINT_PASS1=-c
  751. X    fi
  752. X  fi
  753. X  rm -f conftest.c conftest.ln
  754. Xfi
  755. X
  756. X# If we have rpcgen, then we can reproduce the stubs and header.
  757. X# In that case, let the stubs and header depend on the .x file
  758. X
  759. X
  760. X# libraries
  761. X
  762. X# This section is accreted from suggestions from numerous rperf users.
  763. X# Thanks to all who contributed.
  764. X
  765. X# Do not search -lrpcsvc.  rstat_xdr.o lives there, but don't use it.
  766. X# Use the rstat_xdr.c that is supplied with rperf, because it
  767. X# works around a bug found on most non-Sun rpc.rstatd's)
  768. X
  769. X
  770. X    
  771. X    echo checking for libns
  772. X    if test -f /lib/libns.a ; then LIBS="-lns $LIBS"
  773. X    elif test -f /usr/lib/libns.a ; then LIBS="-lns $LIBS"
  774. X    elif test -f /usr/local/libns.a ; then LIBS="-L/usr/local/lib -lns $LIBS"
  775. X    fi
  776. X    
  777. X    
  778. X    echo checking for libc_s
  779. X    if test -f /lib/libc_s.a ; then LIBS="-lc_s $LIBS"
  780. X    elif test -f /usr/lib/libc_s.a ; then LIBS="-lc_s $LIBS"
  781. X    elif test -f /usr/local/libc_s.a ; then LIBS="-L/usr/local/lib -lc_s $LIBS"
  782. X    fi
  783. X    
  784. X    
  785. X    echo checking for libinet
  786. X    if test -f /lib/libinet.a ; then LIBS="-linet $LIBS"
  787. X    elif test -f /usr/lib/libinet.a ; then LIBS="-linet $LIBS"
  788. X    elif test -f /usr/local/libinet.a ; then LIBS="-L/usr/local/lib -linet $LIBS"
  789. X    fi
  790. X    
  791. X    
  792. X    echo checking for libypsec
  793. X    if test -f /lib/libypsec.a ; then LIBS="-lypsec $LIBS"
  794. X    elif test -f /usr/lib/libypsec.a ; then LIBS="-lypsec $LIBS"
  795. X    elif test -f /usr/local/libypsec.a ; then LIBS="-L/usr/local/lib -lypsec $LIBS"
  796. X    fi
  797. X    
  798. X    
  799. X    echo checking for librpc
  800. X    if test -f /lib/librpc.a ; then LIBS="-lrpc $LIBS"
  801. X    elif test -f /usr/lib/librpc.a ; then LIBS="-lrpc $LIBS"
  802. X    elif test -f /usr/local/librpc.a ; then LIBS="-L/usr/local/lib -lrpc $LIBS"
  803. X    fi
  804. X    
  805. X    
  806. X    echo checking for libnsl
  807. X    if test -f /lib/libnsl.a ; then LIBS="-lnsl $LIBS"
  808. X    elif test -f /usr/lib/libnsl.a ; then LIBS="-lnsl $LIBS"
  809. X    elif test -f /usr/local/libnsl.a ; then LIBS="-L/usr/local/lib -lnsl $LIBS"
  810. X    fi
  811. X    
  812. X    
  813. X    echo checking for libsun
  814. X    if test -f /lib/libsun.a ; then LIBS="-lsun $LIBS"
  815. X    elif test -f /usr/lib/libsun.a ; then LIBS="-lsun $LIBS"
  816. X    elif test -f /usr/local/libsun.a ; then LIBS="-L/usr/local/lib -lsun $LIBS"
  817. X    fi
  818. X    
  819. X    
  820. X    echo checking for libsocket
  821. X    if test -f /lib/libsocket.a ; then LIBS="-lsocket $LIBS"
  822. X    elif test -f /usr/lib/libsocket.a ; then LIBS="-lsocket $LIBS"
  823. X    elif test -f /usr/local/libsocket.a ; then LIBS="-L/usr/local/lib -lsocket $LIBS"
  824. X    fi
  825. X    LIBS_save="${LIBS}"
  826. XLIBS="${LIBS} -lintl"
  827. Xhave_lib=""
  828. Xecho checking for -lintl
  829. Xcat > conftest.c <<EOF
  830. X#include "confdefs.h"
  831. X
  832. Xint main() { exit(0); }
  833. Xint t() { main(); }
  834. XEOF
  835. Xif eval $compile; then
  836. X  rm -rf conftest*
  837. X  have_lib="1"
  838. X
  839. Xfi
  840. Xrm -f conftest*
  841. XLIBS="${LIBS_save}"
  842. Xif test -n "${have_lib}"; then
  843. X   :; LIBS="$LIBS -lintl"
  844. Xelse
  845. X   :; 
  846. Xfi
  847. X
  848. X        
  849. X# Some SYSV users needed -lc -lucb but this breaks for Solaris 2
  850. X# so I have commented it out.
  851. X#
  852. X# The purpose was to link in library functions bzero and bcopy.
  853. X# bzero and bcopy are now macros that are defined in common.h
  854. X#
  855. X#echo checking for libucb
  856. X#if test -f /usr/ucblib/libucb.a ; then LIBS="-lc -L/usr/ucblib -lucb $LIBS"
  857. X#elif test -f /lib/libucb.a ; then LIBS="-lc -lucb $LIBS"
  858. X#elif test -f /usr/lib/libucb.a ; then LIBS="-lc -lucb $LIBS"
  859. X#elif test -f /usr/local/libucb.a ; then LIBS="-lc -L/usr/local/lib -lucb $LIBS"
  860. X#fi
  861. X
  862. Xecho checking for compiling with LIBS=$LIBS
  863. Xcat > conftest.c <<EOF
  864. X#include "confdefs.h"
  865. X
  866. Xint main() { exit(0); }
  867. Xint t() {  }
  868. XEOF
  869. Xif eval $compile; then
  870. X  :
  871. Xelse
  872. X  rm -rf conftest*
  873. X  echo '
  874. X  Your compiler apparently has a problem with linking an empty main
  875. X  program to the libraries that have been found by this configure
  876. X  script.  The configuration from here will, in some cases, be
  877. X  incorrect, and you will have to edit Makefile by hand.  In
  878. X  particular, you may need to set -DRETSIGTYPE=void to compile without
  879. X  trouble.  This is a known problem on ESIX.
  880. X'
  881. Xfi
  882. Xrm -f conftest*
  883. X
  884. X
  885. X# headers
  886. X
  887. Xfor hdr in sys/termio.h
  888. Xdo
  889. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  890. Xecho checking for ${hdr}
  891. Xcat > conftest.c <<EOF
  892. X#include "confdefs.h"
  893. X#include <${hdr}>
  894. XEOF
  895. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  896. Xif test -z "$err"; then
  897. X  rm -rf conftest*
  898. X  
  899. X{
  900. Xtest -n "$verbose" && \
  901. Xecho "    defining ${trhdr}"
  902. Xecho "#define" ${trhdr} 1 >> confdefs.h
  903. XDEFS="$DEFS -D${trhdr}=1"
  904. X}
  905. X
  906. X
  907. Xfi
  908. Xrm -f conftest*
  909. Xdone
  910. X
  911. Xfor hdr in sys/termios.h
  912. Xdo
  913. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  914. Xecho checking for ${hdr}
  915. Xcat > conftest.c <<EOF
  916. X#include "confdefs.h"
  917. X#include <${hdr}>
  918. XEOF
  919. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  920. Xif test -z "$err"; then
  921. X  rm -rf conftest*
  922. X  
  923. X{
  924. Xtest -n "$verbose" && \
  925. Xecho "    defining ${trhdr}"
  926. Xecho "#define" ${trhdr} 1 >> confdefs.h
  927. XDEFS="$DEFS -D${trhdr}=1"
  928. X}
  929. X
  930. X
  931. Xfi
  932. Xrm -f conftest*
  933. Xdone
  934. X
  935. Xfor hdr in sys/bsd_tty.h
  936. Xdo
  937. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  938. Xecho checking for ${hdr}
  939. Xcat > conftest.c <<EOF
  940. X#include "confdefs.h"
  941. X#include <${hdr}>
  942. XEOF
  943. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  944. Xif test -z "$err"; then
  945. X  rm -rf conftest*
  946. X  
  947. X{
  948. Xtest -n "$verbose" && \
  949. Xecho "    defining ${trhdr}"
  950. Xecho "#define" ${trhdr} 1 >> confdefs.h
  951. XDEFS="$DEFS -D${trhdr}=1"
  952. X}
  953. X
  954. X
  955. Xfi
  956. Xrm -f conftest*
  957. Xdone
  958. X
  959. Xfor hdr in sys/resource.h
  960. Xdo
  961. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  962. Xecho checking for ${hdr}
  963. Xcat > conftest.c <<EOF
  964. X#include "confdefs.h"
  965. X#include <${hdr}>
  966. XEOF
  967. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  968. Xif test -z "$err"; then
  969. X  rm -rf conftest*
  970. X  
  971. X{
  972. Xtest -n "$verbose" && \
  973. Xecho "    defining ${trhdr}"
  974. Xecho "#define" ${trhdr} 1 >> confdefs.h
  975. XDEFS="$DEFS -D${trhdr}=1"
  976. X}
  977. X
  978. X
  979. Xfi
  980. Xrm -f conftest*
  981. Xdone
  982. X
  983. Xfor hdr in unistd.h
  984. Xdo
  985. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  986. Xecho checking for ${hdr}
  987. Xcat > conftest.c <<EOF
  988. X#include "confdefs.h"
  989. X#include <${hdr}>
  990. XEOF
  991. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  992. Xif test -z "$err"; then
  993. X  rm -rf conftest*
  994. X  
  995. X{
  996. Xtest -n "$verbose" && \
  997. Xecho "    defining ${trhdr}"
  998. Xecho "#define" ${trhdr} 1 >> confdefs.h
  999. XDEFS="$DEFS -D${trhdr}=1"
  1000. X}
  1001. X
  1002. X
  1003. Xfi
  1004. Xrm -f conftest*
  1005. Xdone
  1006. X
  1007. Xfor hdr in stdlib.h
  1008. Xdo
  1009. Xtrhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
  1010. Xecho checking for ${hdr}
  1011. Xcat > conftest.c <<EOF
  1012. X#include "confdefs.h"
  1013. X#include <${hdr}>
  1014. XEOF
  1015. Xerr=`eval "($CPP conftest.c >/dev/null) 2>&1"`
  1016. Xif test -z "$err"; then
  1017. X  rm -rf conftest*
  1018. X  
  1019. X{
  1020. Xtest -n "$verbose" && \
  1021. Xecho "    defining ${trhdr}"
  1022. Xecho "#define" ${trhdr} 1 >> confdefs.h
  1023. XDEFS="$DEFS -D${trhdr}=1"
  1024. X}
  1025. X
  1026. X
  1027. Xfi
  1028. Xrm -f conftest*
  1029. Xdone
  1030. X
  1031. X
  1032. X# types
  1033. X
  1034. Xecho checking for return type of signal handlers
  1035. Xcat > conftest.c <<EOF
  1036. X#include "confdefs.h"
  1037. X#include <sys/types.h>
  1038. X#include <signal.h>
  1039. X#ifdef signal
  1040. X#undef signal
  1041. X#endif
  1042. Xextern void (*signal ()) ();
  1043. Xint main() { exit(0); }
  1044. Xint t() { int i; }
  1045. XEOF
  1046. Xif eval $compile; then
  1047. X  rm -rf conftest*
  1048. X  
  1049. X{
  1050. Xtest -n "$verbose" && \
  1051. Xecho "    defining" RETSIGTYPE to be void
  1052. Xecho "#define" RETSIGTYPE void >> confdefs.h
  1053. XDEFS="$DEFS -DRETSIGTYPE=void"
  1054. X}
  1055. X
  1056. X
  1057. Xelse
  1058. X  rm -rf conftest*
  1059. X  
  1060. X{
  1061. Xtest -n "$verbose" && \
  1062. Xecho "    defining" RETSIGTYPE to be int
  1063. Xecho "#define" RETSIGTYPE int >> confdefs.h
  1064. XDEFS="$DEFS -DRETSIGTYPE=int"
  1065. X}
  1066. X
  1067. Xfi
  1068. Xrm -f conftest*
  1069. X
  1070. X
  1071. Xecho checking for return type of inet_addr
  1072. Xcat > conftest.c <<EOF
  1073. X#include "confdefs.h"
  1074. X#include <sys/types.h>
  1075. X#include <netinet/in.h>
  1076. X#include <arpa/inet.h>
  1077. Xint main() { exit(0); }
  1078. Xint t() { struct in_addr
  1079. Xx()
  1080. X{
  1081. X    struct in_addr   a;
  1082. X
  1083. X    a = inet_addr("127.0.0.1");
  1084. X    return a;
  1085. X} }
  1086. XEOF
  1087. Xif eval $compile; then
  1088. X  rm -rf conftest*
  1089. X  
  1090. X{
  1091. Xtest -n "$verbose" && \
  1092. Xecho "    defining STRUCT_IN_ADDR_INET_ADDR"
  1093. Xecho "#define" STRUCT_IN_ADDR_INET_ADDR 1 >> confdefs.h
  1094. XDEFS="$DEFS -DSTRUCT_IN_ADDR_INET_ADDR=1"
  1095. X}
  1096. X
  1097. X
  1098. Xfi
  1099. Xrm -f conftest*
  1100. X
  1101. X
  1102. X# structures
  1103. X
  1104. Xecho checking for struct tm in time.h
  1105. Xcat > conftest.c <<EOF
  1106. X#include "confdefs.h"
  1107. X#include <sys/types.h>
  1108. X#include <time.h>
  1109. Xint main() { exit(0); }
  1110. Xint t() { struct tm *tp; tp->tm_sec; }
  1111. XEOF
  1112. Xif eval $compile; then
  1113. X  :
  1114. Xelse
  1115. X  rm -rf conftest*
  1116. X  
  1117. X{
  1118. Xtest -n "$verbose" && \
  1119. Xecho "    defining TM_IN_SYS_TIME"
  1120. Xecho "#define" TM_IN_SYS_TIME 1 >> confdefs.h
  1121. XDEFS="$DEFS -DTM_IN_SYS_TIME=1"
  1122. X}
  1123. X
  1124. Xfi
  1125. Xrm -f conftest*
  1126. X
  1127. Xdecl='#include <sys/types.h>
  1128. X'
  1129. Xcase "$DEFS" in
  1130. X  *TM_IN_SYS_TIME*) decl="$decl
  1131. X#include <sys/time.h>
  1132. X" ;;
  1133. X  *) decl="$decl
  1134. X#include <time.h>
  1135. X" ;;
  1136. Xesac
  1137. Xecho checking for tm_zone in struct tm
  1138. Xcat > conftest.c <<EOF
  1139. X#include "confdefs.h"
  1140. X$decl
  1141. Xint main() { exit(0); }
  1142. Xint t() { struct tm tm; tm.tm_zone; }
  1143. XEOF
  1144. Xif eval $compile; then
  1145. X  rm -rf conftest*
  1146. X  
  1147. X{
  1148. Xtest -n "$verbose" && \
  1149. Xecho "    defining HAVE_TM_ZONE"
  1150. Xecho "#define" HAVE_TM_ZONE 1 >> confdefs.h
  1151. XDEFS="$DEFS -DHAVE_TM_ZONE=1"
  1152. X}
  1153. X
  1154. X
  1155. Xelse
  1156. X  rm -rf conftest*
  1157. X  no_tm_zone=1
  1158. Xfi
  1159. Xrm -f conftest*
  1160. X
  1161. Xif test -n "$no_tm_zone"; then
  1162. Xecho checking for tzname
  1163. Xcat > conftest.c <<EOF
  1164. X#include "confdefs.h"
  1165. X#include <time.h>
  1166. X#ifndef tzname /* For SGI.  */
  1167. Xextern char *tzname[]; /* RS6000 and others want it this way.  */
  1168. X#endif
  1169. Xint main() { exit(0); }
  1170. Xint t() { atoi(*tzname); }
  1171. XEOF
  1172. Xif eval $compile; then
  1173. X  rm -rf conftest*
  1174. X  
  1175. X{
  1176. Xtest -n "$verbose" && \
  1177. Xecho "    defining HAVE_TZNAME"
  1178. Xecho "#define" HAVE_TZNAME 1 >> confdefs.h
  1179. XDEFS="$DEFS -DHAVE_TZNAME=1"
  1180. X}
  1181. X
  1182. X
  1183. Xfi
  1184. Xrm -f conftest*
  1185. X
  1186. Xfi
  1187. X
  1188. X
  1189. X# functions
  1190. X
  1191. Xecho checking for BSD memory functions
  1192. Xcat > conftest.c <<EOF
  1193. X#include "confdefs.h"
  1194. X#include <strings.h>
  1195. Xint main() { exit(0); }
  1196. Xint t() { bzero(0, 0); }
  1197. XEOF
  1198. Xif eval $compile; then
  1199. X  :
  1200. Xelse
  1201. X  rm -rf conftest*
  1202. X  
  1203. X{
  1204. Xtest -n "$verbose" && \
  1205. Xecho "    defining NO_BSTRING"
  1206. Xecho "#define" NO_BSTRING 1 >> confdefs.h
  1207. XDEFS="$DEFS -DNO_BSTRING=1"
  1208. X}
  1209. X
  1210. Xfi
  1211. Xrm -f conftest*
  1212. X
  1213. X
  1214. Xfor func in strftime
  1215. Xdo
  1216. Xecho checking for ${func}
  1217. Xcat > conftest.c <<EOF
  1218. X#include "confdefs.h"
  1219. X#include <ctype.h>
  1220. Xint main() { exit(0); }
  1221. Xint t() { 
  1222. X/* The GNU C library defines this for functions which it implements
  1223. X    to always fail with ENOSYS.  Some functions are actually named
  1224. X    something starting with __ and the normal name is an alias.  */
  1225. X#if defined (__stub_${func}) || defined (__stub___${func})
  1226. Xchoke me
  1227. X#else
  1228. X/* Override any gcc2 internal prototype to avoid an error.  */
  1229. Xextern char ${func}(); ${func}();
  1230. X#endif
  1231. X }
  1232. XEOF
  1233. Xif eval $compile; then
  1234. X  :
  1235. Xelse
  1236. X  rm -rf conftest*
  1237. X  LIBOBJS="$LIBOBJS ${func}.o"
  1238. Xtest -n "$verbose" && echo "    using ${func}.o instead"
  1239. Xfi
  1240. Xrm -f conftest*
  1241. X
  1242. Xdone
  1243. X
  1244. Xfor func in strdup
  1245. Xdo
  1246. Xecho checking for ${func}
  1247. Xcat > conftest.c <<EOF
  1248. X#include "confdefs.h"
  1249. X#include <ctype.h>
  1250. Xint main() { exit(0); }
  1251. Xint t() { 
  1252. X/* The GNU C library defines this for functions which it implements
  1253. X    to always fail with ENOSYS.  Some functions are actually named
  1254. X    something starting with __ and the normal name is an alias.  */
  1255. X#if defined (__stub_${func}) || defined (__stub___${func})
  1256. Xchoke me
  1257. X#else
  1258. X/* Override any gcc2 internal prototype to avoid an error.  */
  1259. Xextern char ${func}(); ${func}();
  1260. X#endif
  1261. X }
  1262. XEOF
  1263. Xif eval $compile; then
  1264. X  :
  1265. Xelse
  1266. X  rm -rf conftest*
  1267. X  LIBOBJS="$LIBOBJS ${func}.o"
  1268. Xtest -n "$verbose" && echo "    using ${func}.o instead"
  1269. Xfi
  1270. Xrm -f conftest*
  1271. X
  1272. Xdone
  1273. X
  1274. Xif test -n "$LIBOBJS" ; then
  1275. X    LIBC="libc.a"
  1276. Xfi
  1277. Xfor func in setlinebuf
  1278. Xdo
  1279. Xtrfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  1280. Xecho checking for ${func}
  1281. Xcat > conftest.c <<EOF
  1282. X#include "confdefs.h"
  1283. X#include <ctype.h>
  1284. Xint main() { exit(0); }
  1285. Xint t() { 
  1286. X/* The GNU C library defines this for functions which it implements
  1287. X    to always fail with ENOSYS.  Some functions are actually named
  1288. X    something starting with __ and the normal name is an alias.  */
  1289. X#if defined (__stub_${func}) || defined (__stub___${func})
  1290. Xchoke me
  1291. X#else
  1292. X/* Override any gcc2 internal prototype to avoid an error.  */
  1293. Xextern char ${func}(); ${func}();
  1294. X#endif
  1295. X }
  1296. XEOF
  1297. Xif eval $compile; then
  1298. X  rm -rf conftest*
  1299. X  {
  1300. Xtest -n "$verbose" && \
  1301. Xecho "    defining ${trfunc}"
  1302. Xecho "#define" ${trfunc} 1 >> confdefs.h
  1303. XDEFS="$DEFS -D${trfunc}=1"
  1304. X}
  1305. X
  1306. X
  1307. Xfi
  1308. Xrm -f conftest*
  1309. Xdone
  1310. X
  1311. Xcat > conftest.c <<EOF
  1312. X#include "confdefs.h"
  1313. X#include <stdio.h>
  1314. X/* If setvbuf has the reversed format, exit 0. */
  1315. Xmain () {
  1316. X  /* This call has the arguments reversed.
  1317. X     A reversed system may check and see that the address of main
  1318. X     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  1319. X  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
  1320. X    exit(1);
  1321. X  putc('\r', stdout);
  1322. X  exit(0);            /* Non-reversed systems segv here.  */
  1323. X}
  1324. XEOF
  1325. Xeval $compile
  1326. Xif test -s conftest && (./conftest; exit) 2>/dev/null; then
  1327. X  
  1328. X{
  1329. Xtest -n "$verbose" && \
  1330. Xecho "    defining SETVBUF_REVERSED"
  1331. Xecho "#define" SETVBUF_REVERSED 1 >> confdefs.h
  1332. XDEFS="$DEFS -DSETVBUF_REVERSED=1"
  1333. X}
  1334. X
  1335. X
  1336. Xfi
  1337. Xrm -fr conftest*
  1338. Xrm -f core
  1339. X
  1340. Xfor func in setdtablesize
  1341. Xdo
  1342. Xtrfunc=HAVE_`echo $func | tr '[a-z]' '[A-Z]'`
  1343. Xecho checking for ${func}
  1344. Xcat > conftest.c <<EOF
  1345. X#include "confdefs.h"
  1346. X#include <ctype.h>
  1347. Xint main() { exit(0); }
  1348. Xint t() { 
  1349. X/* The GNU C library defines this for functions which it implements
  1350. X    to always fail with ENOSYS.  Some functions are actually named
  1351. X    something starting with __ and the normal name is an alias.  */
  1352. X#if defined (__stub_${func}) || defined (__stub___${func})
  1353. Xchoke me
  1354. X#else
  1355. X/* Override any gcc2 internal prototype to avoid an error.  */
  1356. Xextern char ${func}(); ${func}();
  1357. X#endif
  1358. X }
  1359. XEOF
  1360. Xif eval $compile; then
  1361. X  rm -rf conftest*
  1362. X  {
  1363. Xtest -n "$verbose" && \
  1364. Xecho "    defining ${trfunc}"
  1365. Xecho "#define" ${trfunc} 1 >> confdefs.h
  1366. XDEFS="$DEFS -D${trfunc}=1"
  1367. X}
  1368. X
  1369. X
  1370. Xfi
  1371. Xrm -f conftest*
  1372. Xdone
  1373. X
  1374. X
  1375. X# Set default prefixes.
  1376. Xif test -n "$prefix"; then
  1377. X  test -z "$exec_prefix" && exec_prefix='${prefix}'
  1378. X  prsub="s%^prefix\\([     ]*\\)=\\([     ]*\\).*$%prefix\\1=\\2$prefix%"
  1379. Xfi
  1380. Xif test -n "$exec_prefix"; then
  1381. X  prsub="$prsub
  1382. Xs%^exec_prefix\\([     ]*\\)=\\([     ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
  1383. Xfi
  1384. X# Quote sed substitution magic chars in DEFS.
  1385. Xcat >conftest.def <<EOF
  1386. X$DEFS
  1387. XEOF
  1388. Xescape_ampersand_and_backslash='s%[&\\]%\\&%g'
  1389. XDEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
  1390. Xrm -f conftest.def
  1391. X# Substitute for predefined variables.
  1392. X
  1393. Xtrap 'rm -f config.status; exit 1' 1 3 15
  1394. Xecho creating config.status
  1395. Xrm -f config.status
  1396. Xcat > config.status <<EOF
  1397. X#!/bin/sh
  1398. X# Generated automatically by configure.
  1399. X# Run this file to recreate the current configuration.
  1400. X# This directory was configured as follows,
  1401. X# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1402. X#
  1403. X# $0 $configure_args
  1404. X
  1405. Xfor arg
  1406. Xdo
  1407. X  case "\$arg" in
  1408. X    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1409. X    echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
  1410. X    exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
  1411. X    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
  1412. X  esac
  1413. Xdone
  1414. X
  1415. Xtrap 'rm -f Makefile; exit 1' 1 3 15
  1416. XLIBC='$LIBC'
  1417. XCFLAGS='$CFLAGS'
  1418. XLINT_PASS1='$LINT_PASS1'
  1419. XCONF_USER='$CONF_USER'
  1420. XCONF_HOST='$CONF_HOST'
  1421. XCONF_DATE='$CONF_DATE'
  1422. XCC='$CC'
  1423. XCPP='$CPP'
  1424. XRANLIB='$RANLIB'
  1425. XLN_S='$LN_S'
  1426. XLINT='$LINT'
  1427. XLIBOBJS='$LIBOBJS'
  1428. XLIBS='$LIBS'
  1429. Xsrcdir='$srcdir'
  1430. XDEFS='$DEFS'
  1431. Xprefix='$prefix'
  1432. Xexec_prefix='$exec_prefix'
  1433. Xprsub='$prsub'
  1434. Xextrasub='$extrasub'
  1435. XEOF
  1436. Xcat >> config.status <<\EOF
  1437. Xsedcmd='s/^(*(\(^)*\)).*/\1/'
  1438. XCONF_USER=`(whoami || id|sed "$sedcmd") 2>/dev/null`
  1439. XCONF_HOST=`(hostname || uname -n) 2>/dev/null`
  1440. XCONF_DATE=`date`
  1441. X
  1442. Xtop_srcdir=$srcdir
  1443. X
  1444. XCONFIG_FILES=${CONFIG_FILES-"Makefile"}
  1445. Xfor file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
  1446. X  srcdir=$top_srcdir
  1447. X  # Remove last slash and all that follows it.  Not all systems have dirname.
  1448. X  dir=`echo $file|sed 's%/[^/][^/]*$%%'`
  1449. X  if test "$dir" != "$file"; then
  1450. X    test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
  1451. X    test ! -d $dir && mkdir $dir
  1452. X  fi
  1453. X  echo creating $file
  1454. X  rm -f $file
  1455. X  echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
  1456. X  sed -e "
  1457. X$prsub
  1458. X$extrasub
  1459. Xs%@LIBC@%$LIBC%g
  1460. Xs%@CFLAGS@%$CFLAGS%g
  1461. Xs%@LINT_PASS1@%$LINT_PASS1%g
  1462. Xs%@CONF_USER@%$CONF_USER%g
  1463. Xs%@CONF_HOST@%$CONF_HOST%g
  1464. Xs%@CONF_DATE@%$CONF_DATE%g
  1465. Xs%@CC@%$CC%g
  1466. Xs%@CPP@%$CPP%g
  1467. Xs%@RANLIB@%$RANLIB%g
  1468. Xs%@LN_S@%$LN_S%g
  1469. Xs%@LINT@%$LINT%g
  1470. Xs%@LIBOBJS@%$LIBOBJS%g
  1471. Xs%@LIBS@%$LIBS%g
  1472. Xs%@srcdir@%$srcdir%g
  1473. Xs%@DEFS@%$DEFS%
  1474. X" $top_srcdir/${file}.in >> $file
  1475. Xfi; done
  1476. X
  1477. X
  1478. Xexit 0
  1479. XEOF
  1480. Xchmod +x config.status
  1481. X${CONFIG_SHELL-/bin/sh} config.status
  1482. X
  1483. Xecho ""
  1484. Xecho "Configuration complete."
  1485. Xecho ""
  1486. Xecho "Now type 'make' to build rperf."
  1487. END_OF_FILE
  1488. if test 27666 -ne `wc -c <'configure'`; then
  1489.     echo shar: \"'configure'\" unpacked with wrong size!
  1490. fi
  1491. chmod +x 'configure'
  1492. # end of 'configure'
  1493. fi
  1494. if test -f 'configure.in' -a "${1}" != "-c" ; then 
  1495.   echo shar: Will not clobber existing file \"'configure.in'\"
  1496. else
  1497. echo shar: Extracting \"'configure.in'\" \(4551 characters\)
  1498. sed "s/^X//" >'configure.in' <<'END_OF_FILE'
  1499. Xdnl Process this file with autoconf to produce a configure script.
  1500. XAC_INIT(configure.in)
  1501. X
  1502. X# configure.in for rperf
  1503. X#
  1504. X# This program may be copied, redistributed in any form, source or 
  1505. X# binary, and used for any purpose, provided this copyright notice is 
  1506. X# retained. 
  1507. X# 
  1508. X#    @(#)configure.in    3.1 12/15/93 (c) Copyright Brian P. Fitzgerald 
  1509. X#    Rensselaer Polytechnic Institute 
  1510. X
  1511. X# definitions
  1512. X
  1513. Xdefine(ACX_HAVE_LIB, [
  1514. X    AC_PROVIDE([$0])
  1515. X    echo checking for lib[$1]
  1516. X    if test -f /lib/lib[$1].a ; then LIBS="-l[$1] $LIBS"
  1517. X    elif test -f /usr/lib/lib[$1].a ; then LIBS="-l[$1] $LIBS"
  1518. X    elif test -f /usr/local/lib[$1].a ; then LIBS="-L/usr/local/lib -l[$1] $LIBS"
  1519. X    fi
  1520. X])dnl
  1521. X
  1522. X# configure varibles
  1523. X
  1524. XAC_SUBST(LIBC)
  1525. XAC_SUBST(CFLAGS)
  1526. XAC_SUBST(LINT_PASS1)
  1527. XAC_SUBST(CONF_USER)
  1528. XAC_SUBST(CONF_HOST)
  1529. XAC_SUBST(CONF_DATE)
  1530. X
  1531. X# compiler configuration
  1532. X
  1533. XAC_PROG_CC
  1534. Xgccv1=`${CC-cc} -v  2>&1 | grep 'gcc version 1'`
  1535. Xif test -n "$gccv1" ; then
  1536. X    echo "Caution:  $gccv1 detected."
  1537. X    echo "Some system library objects may be incompatible."
  1538. X    echo "Using cc"
  1539. X    CC=cc
  1540. Xfi
  1541. XAC_AIX
  1542. XAC_MINIX
  1543. XAC_ISC_POSIX
  1544. XAC_STDC_HEADERS
  1545. X
  1546. XAC_COMPILE_CHECK([checking for sgi],,[
  1547. X#ifndef sgi
  1548. Xintentional_error
  1549. X#endif
  1550. X],[if test "$CC" = "cc" ; then CFLAGS="${CFLAGS} -cckr" ; fi])
  1551. X
  1552. XAC_PROG_CPP
  1553. X
  1554. X# programming and installation utilities
  1555. X
  1556. XAC_PROG_RANLIB
  1557. XAC_LN_S
  1558. XAC_PROGRAM_CHECK(LINT,lint,lint,@echo no lint;false)
  1559. Xif test "$LINT" = lint ; then
  1560. X  echo checking for lint pass 1 option
  1561. X  rm -f conftest.c conftest.ln
  1562. X  echo 'void foo(){}' > conftest.c
  1563. X  $LINT -i conftest.c > /dev/null 2>&1
  1564. X  if test -f conftest.ln ; then
  1565. X    LINT_PASS1=-i
  1566. X  else
  1567. X    $LINT -c conftest.c > /dev/null 2>&1
  1568. X    if test -f conftest.ln ; then
  1569. X      LINT_PASS1=-c
  1570. X    fi
  1571. X  fi
  1572. X  rm -f conftest.c conftest.ln
  1573. Xfi
  1574. X
  1575. X# If we have rpcgen, then we can reproduce the stubs and header.
  1576. X# In that case, let the stubs and header depend on the .x file
  1577. X
  1578. Xdnl AC_GCC_TRADITIONAL
  1579. X
  1580. X# libraries
  1581. X
  1582. X# This section is accreted from suggestions from numerous rperf users.
  1583. X# Thanks to all who contributed.
  1584. X
  1585. X# Do not search -lrpcsvc.  rstat_xdr.o lives there, but don't use it.
  1586. X# Use the rstat_xdr.c that is supplied with rperf, because it
  1587. X# works around a bug found on most non-Sun rpc.rstatd's)
  1588. X
  1589. XACX_HAVE_LIB(ns)    dnl TLI support for AT&T
  1590. XACX_HAVE_LIB(c_s)    dnl shared lib on SCO Unix.  Saves disk space.
  1591. XACX_HAVE_LIB(inet)    dnl needed for Interactive Systems 386/SYSV
  1592. XACX_HAVE_LIB(ypsec)    dnl Dolphin m88k machine speed up. (app. 1000/1)
  1593. XACX_HAVE_LIB(rpc)    dnl RPC library on some SYSV
  1594. XACX_HAVE_LIB(nsl)    dnl RPC library on some SYSV
  1595. XACX_HAVE_LIB(sun)    dnl RPC library for SGI
  1596. XACX_HAVE_LIB(socket)    dnl for gethostbyname/addr on ESIX
  1597. XAC_SCO_INTL        dnl for strftime
  1598. X
  1599. X# Some SYSV users needed -lc -lucb but this breaks for Solaris 2
  1600. X# so I have commented it out.
  1601. X#
  1602. X# The purpose was to link in library functions bzero and bcopy.
  1603. X# bzero and bcopy are now macros that are defined in common.h
  1604. X#
  1605. X#echo checking for libucb
  1606. X#if test -f /usr/ucblib/libucb.a ; then LIBS="-lc -L/usr/ucblib -lucb $LIBS"
  1607. X#elif test -f /lib/libucb.a ; then LIBS="-lc -lucb $LIBS"
  1608. X#elif test -f /usr/lib/libucb.a ; then LIBS="-lc -lucb $LIBS"
  1609. X#elif test -f /usr/local/libucb.a ; then LIBS="-lc -L/usr/local/lib -lucb $LIBS"
  1610. X#fi
  1611. X
  1612. XAC_COMPILE_CHECK([compiling with LIBS=$LIBS],
  1613. X, , , [echo '
  1614. X  Your compiler apparently has a problem with linking an empty main
  1615. X  program to the libraries that have been found by this configure
  1616. X  script.  The configuration from here will, in some cases, be
  1617. X  incorrect, and you will have to edit Makefile by hand.  In
  1618. X  particular, you may need to set -DRETSIGTYPE=void to compile without
  1619. X  trouble.  This is a known problem on ESIX.
  1620. X'])
  1621. X
  1622. X# headers
  1623. X
  1624. XAC_HAVE_HEADERS(sys/termio.h)
  1625. XAC_HAVE_HEADERS(sys/termios.h)
  1626. XAC_HAVE_HEADERS(sys/bsd_tty.h)
  1627. XAC_HAVE_HEADERS(sys/resource.h)
  1628. XAC_HAVE_HEADERS(unistd.h)
  1629. XAC_HAVE_HEADERS(stdlib.h)
  1630. X
  1631. X# types
  1632. X
  1633. XAC_RETSIGTYPE
  1634. XAC_COMPILE_CHECK(
  1635. X[return type of inet_addr],
  1636. X[#include <sys/types.h>
  1637. X#include <netinet/in.h>
  1638. X#include <arpa/inet.h>],
  1639. X[struct in_addr
  1640. Xx()
  1641. X{
  1642. X    struct in_addr   a;
  1643. X
  1644. X    a = inet_addr("127.0.0.1");
  1645. X    return a;
  1646. X}],
  1647. X[AC_DEFINE(STRUCT_IN_ADDR_INET_ADDR)])
  1648. X
  1649. X# structures
  1650. X
  1651. XAC_TIMEZONE
  1652. X
  1653. X# functions
  1654. X
  1655. XAC_COMPILE_CHECK([BSD memory functions],
  1656. X[#include <strings.h>], [bzero(0, 0);], , AC_DEFINE(NO_BSTRING))
  1657. X
  1658. XAC_REPLACE_FUNCS(strftime)
  1659. XAC_REPLACE_FUNCS(strdup)
  1660. Xif test -n "$LIBOBJS" ; then
  1661. X    LIBC="libc.a"
  1662. Xfi
  1663. XAC_HAVE_FUNCS(setlinebuf)
  1664. XAC_SETVBUF_REVERSED
  1665. XAC_HAVE_FUNCS(setdtablesize)
  1666. X
  1667. XAC_OUTPUT(Makefile)
  1668. Xecho ""
  1669. Xecho "Configuration complete."
  1670. Xecho ""
  1671. Xecho "Now type 'make' to build rperf."
  1672. END_OF_FILE
  1673. if test 4551 -ne `wc -c <'configure.in'`; then
  1674.     echo shar: \"'configure.in'\" unpacked with wrong size!
  1675. fi
  1676. # end of 'configure.in'
  1677. fi
  1678. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  1679.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  1680. else
  1681. echo shar: Extracting \"'MANIFEST'\" \(960 characters\)
  1682. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  1683. X   File Name        Archive #    Description
  1684. X-----------------------------------------------------------
  1685. X README                     1    
  1686. X FAQ                        1    
  1687. X configure                  1    Type "sh ./configure"
  1688. X configure.in               1    
  1689. X MANIFEST                   1    This shipping list
  1690. X Makefile.in                1    
  1691. X rstat.x                    1    
  1692. X rstat.h                    1    
  1693. X rstat_xdr.c                2    
  1694. X rstat_xdr.ed               2    
  1695. X rperf.8                    2    use: tbl rperf.8 | nroff -man
  1696. X rperf.c                    3    
  1697. X term.h                     1    
  1698. X rperf.h                    2    
  1699. X term.c                     2    
  1700. X rpc.c                      2    
  1701. X common.h                   2    
  1702. X strdup.c                   2    Not found on all systems
  1703. X strftime.c                 4    Not found on all systems
  1704. X hsearch.c                  3    Use instead of the system hsearch
  1705. X hsearch.h                  2    Use instead of the system hsearch
  1706. X PORTING                    4    
  1707. END_OF_FILE
  1708. if test 960 -ne `wc -c <'MANIFEST'`; then
  1709.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  1710. fi
  1711. # end of 'MANIFEST'
  1712. fi
  1713. if test -f 'Makefile.in' -a "${1}" != "-c" ; then 
  1714.   echo shar: Will not clobber existing file \"'Makefile.in'\"
  1715. else
  1716. echo shar: Extracting \"'Makefile.in'\" \(5171 characters\)
  1717. sed "s/^X//" >'Makefile.in' <<'END_OF_FILE'
  1718. X# Makefile for rperf
  1719. X#
  1720. X# Generated automatically from Makefile.in
  1721. X#   by @CONF_USER@@@CONF_HOST@
  1722. X#   on @CONF_DATE@
  1723. X#
  1724. X# This program may be copied, redistributed in any form, source or 
  1725. X# binary, and used for any purpose, provided this copyright notice is 
  1726. X# retained. 
  1727. X# 
  1728. X#    @(#)Makefile.in    3.1 12/15/93 (c) Copyright Brian P. Fitzgerald 
  1729. X#    Rensselaer Polytechnic Institute 
  1730. X
  1731. XCLNT_PROG    = rperf
  1732. XCLNT_SRCS    = rperf.c rstat_xdr.c term.c rpc.c hsearch.c
  1733. XCLNT_OBJS    = rperf.o rstat_xdr.o term.o rpc.o hsearch.o
  1734. XLIB_SRCS    = strdup.c strftime.c
  1735. XLIB_OBJS    = strdup.o strftime.o
  1736. X
  1737. XLIBS        = @LIBC@ @LIBS@ -ltermcap
  1738. X
  1739. XGEN_SRCS    = rstat_clnt.c rstat_svc.c rstat_xdr.c rstat.h
  1740. XGEN_OBJS    = rstat_xdr.o
  1741. X
  1742. XDBG_OBJS    = /usr/lib/debug/malloc.o /usr/lib/debug/mallocmap.o
  1743. X
  1744. XDEFS        = @DEFS@
  1745. XCPPFLAGS    = $(DEFS)
  1746. X
  1747. XCFLAGS        = -O @CFLAGS@
  1748. X
  1749. X# Caution:  On some systems, object code generated by gcc version 1.xx
  1750. X# may be incompatible with system libraries.  In particular, the use
  1751. X# of gcc version 1 on sparc stations will result in a bus error in
  1752. X# clntudp_create().
  1753. X
  1754. XCC        = @CC@
  1755. XCOMPILE.c    = $(CC) $(CFLAGS) $(CPPFLAGS) -c
  1756. XLINK.c        = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
  1757. XRM        = rm -f
  1758. XMAKE        = make
  1759. XAR        = ar
  1760. XARFLAGS        = rv
  1761. X
  1762. XSHELL        = /bin/sh
  1763. X
  1764. X.c.o:
  1765. X    $(COMPILE.c) $<
  1766. X
  1767. Xprefix         = /usr/local
  1768. Xexec_prefix    = $(prefix)
  1769. X
  1770. Xbindir        = $(exec_prefix)/bin
  1771. Xmandir        = $(prefix)/man
  1772. X
  1773. X$(CLNT_PROG): $(CLNT_OBJS) @LIBC@
  1774. X    $(LINK.c) -o $@ $(CLNT_OBJS) $(LIBS)
  1775. X
  1776. Xrup:
  1777. X    @LN_S@ $(CLNT_PROG) $@
  1778. X
  1779. Xall: $(CLNT_PROG) rup
  1780. X
  1781. Xlibc.a:    @LIBOBJS@
  1782. X    $(AR) $(ARFLAGS) libc.a @LIBOBJS@
  1783. X    @RANLIB@ libc.a
  1784. X
  1785. Xdbg: 
  1786. X    $(MAKE) $(TARGET) "DEFS=$(DEFS) -DDEBUG" "CLNT_OBJS=$(CLNT_OBJS) $(DBG_OBJS)" "LIBS=$(LIBS)" "CFLAGS=$(CFLAGS) -g" # /depot/rpc/arch/lib/librpclib.a"
  1787. X
  1788. X# compile with the AIX stdc compiler
  1789. Xstdc: 
  1790. X    $(MAKE) $(TARGET) "CFLAGS=$(CFLAGS) -qlanglvl=ansi" CC=cc
  1791. X
  1792. X# compile with -Wall
  1793. XGNUFLAGS    = -Wall \
  1794. X          -Wno-implicit \
  1795. X          -Wshadow
  1796. X
  1797. XWall: 
  1798. X    $(MAKE) $(TARGET) "CFLAGS=$(CFLAGS) $(GNUFLAGS)"
  1799. X
  1800. Xobjs: $(CLNT_OBJS) $(LIB_OBJS)
  1801. X
  1802. Xprof: 
  1803. X    $(MAKE) Wall TARGET="$(TARGET)" "CFLAGS=$(CFLAGS) -p"
  1804. X
  1805. Xgprof: 
  1806. X    $(MAKE) Wall TARGET="$(TARGET)" "CFLAGS=$(CFLAGS) -pg"
  1807. X
  1808. Xdfiles: 
  1809. X    $(MAKE) $(TARGET) "CFLAGS=$(CFLAGS) -a" CC=/usr/lang/SC1.0/cc
  1810. X
  1811. XTCOV        = tcov
  1812. XTCOVOPTS    =
  1813. XTCOV.c        = $(TCOV) $(TCOVOPTS)
  1814. X.d.tcov:
  1815. X    $(TCOV.c) $*.c
  1816. XCLNT_TCOVS    = rperf.tcov rpc.tcov term.tcov rstat_xdr.tcov hsearch.tcov
  1817. X
  1818. Xtcov:        $(CLNT_TCOVS)
  1819. X
  1820. Xinstall: install_prefix install_bin install_man
  1821. X
  1822. Xinstall_prefix:
  1823. X    if test ! -d $(prefix) ; then mkdir $(prefix) ; fi
  1824. X
  1825. Xinstall_bin:
  1826. X    if test ! -d $(bindir) ; then mkdir $(bindir) ; fi
  1827. X    cp $(CLNT_PROG) $(bindir)/$(CLNT_PROG)
  1828. X    chmod go+rx $(bindir)/$(CLNT_PROG)
  1829. X    $(RM) $(bindir)/rup
  1830. X    cd $(bindir) ; @LN_S@ $(CLNT_PROG) rup
  1831. X
  1832. Xinstall_man:
  1833. X    if test ! -d $(mandir) ; then mkdir $(mandir) ; fi
  1834. X    if test ! -d $(mandir)/man8 ; then mkdir $(mandir)/man8 ; fi
  1835. X    if test ! -d $(mandir)/cat8 ; then mkdir $(mandir)/cat8 ; fi
  1836. X    cp rperf.8 $(mandir)/man8/rperf.8
  1837. X    chmod go+r $(mandir)/man8/rperf.8
  1838. X    tbl $(mandir)/man8/rperf.8 | nroff -man > $(mandir)/cat8/rperf.8
  1839. X    chmod go+r $(mandir)/cat8/rperf.8
  1840. X
  1841. X# let rmdir fail if directory is not empty
  1842. Xuninstall: uninstall_bin uninstall_man uninstall_prefix
  1843. X
  1844. Xuninstall_bin:
  1845. X    $(RM) $(bindir)/$(CLNT_PROG)
  1846. X    $(RM) $(bindir)/rup
  1847. X    -rmdir $(bindir)
  1848. X
  1849. Xuninstall_man:
  1850. X    $(RM) $(mandir)/man8/rperf.8
  1851. X    $(RM) $(mandir)/cat8/rperf.8
  1852. X    -rmdir $(mandir)/man8
  1853. X    -rmdir $(mandir)/cat8
  1854. X    -rmdir $(mandir)
  1855. X
  1856. Xuninstall_prefix:
  1857. X    -rmdir $(prefix)
  1858. X
  1859. Xgen: 
  1860. X    rpcgen -h rstat.x > rstat.h
  1861. X    rpcgen -c rstat.x > rstat_xdr.c
  1862. X    ed < rstat_xdr.ed rstat_xdr.c
  1863. X
  1864. Xconfigure: configure.in
  1865. X    autoconf
  1866. X
  1867. XSHARMSG        = "Now do 'sh ./configure' or 'sh ./configure -prefix=PATH' (Default = $(prefix))"
  1868. XSHAROPTS    = -p -npart -m -t $(SHARMSG)
  1869. XSHARDEPS    = configure
  1870. Xkit: $(SHARDEPS)
  1871. X    makekit $(SHAROPTS)
  1872. X
  1873. Xshar: $(SHARDEPS)
  1874. X    makekit -s1000k $(SHAROPTS)
  1875. X
  1876. Xmostlyclean:
  1877. X    $(RM) a.out $(CLNT_PROG) rup *.BAK typescript
  1878. X    $(RM) mon.out gmon.out *.d *.tcov
  1879. X
  1880. Xclean: mostlyclean
  1881. X    $(RM) *.ln *.o core libc.a *.fl
  1882. X
  1883. Xdistclean: clean
  1884. X    $(RM) Makefile config.status *part* tags
  1885. X
  1886. X# wayclean is "way too clean" unless you have autoconf and Sun rpcgen :-)
  1887. Xwayclean: distclean
  1888. X    $(RM) configure $(GEN_SRCS)
  1889. X
  1890. X# development
  1891. X
  1892. XLINT_PASS1    = @LINT_PASS1@
  1893. XLINTFLAGS    = -wk -wD -wa -u -n -wP -x
  1894. XLINTFLAGS    = -abchx
  1895. XLINTFLAGS    =
  1896. XLINT        = @LINT@
  1897. XLINT.c        = $(LINT) $(LINTFLAGS) $(CPPFLAGS)
  1898. XCLNT_LNS    = rperf.ln rpc.ln term.ln rstat_xdr.ln hsearch.ln
  1899. XLIB_LNS        = strdup.ln strftime.ln
  1900. XGEN_LNS        = rstat_xdr.ln
  1901. X
  1902. X.SUFFIXES: .ln .fl .d .tcov
  1903. X
  1904. X.c.ln:
  1905. X    $(LINT.c) $(LINT_PASS1) $<
  1906. X
  1907. Xlint: lint-clnt lint-lib
  1908. X    @echo linting all
  1909. X    $(LINT.c) $(CLNT_LNS) $(LIB_LNS) $(LIBS)
  1910. X
  1911. Xlint-clnt: $(CLNT_LNS)
  1912. X    $(LINT.c) $(CLNT_LNS) $(LIBS)
  1913. Xlint-lib: $(LIB_LNS)
  1914. X    $(LINT.c) $(LIB_LNS) $(LIBS)
  1915. X
  1916. XCFLOW        = /bin/cflow
  1917. XCFLOWFLAGS    = 
  1918. XCFLOW.c        = $(CFLOW) $(CFLOWFLAGS) $(CPPFLAGS)
  1919. XCLNT_FLS    = rperf.fl rpc.fl term.fl rstat_xdr.fl hsearch.fl
  1920. XLIB_FLS        = strdup.fl strftime.fl
  1921. X.c.fl:
  1922. X    $(CFLOW.c) $< > $@
  1923. X
  1924. Xflow:    $(CLNT_FLS) $(LIB_FLS)
  1925. X
  1926. X# hidden dependencies
  1927. Xrperf.o:    rstat.h term.h rperf.h common.h
  1928. Xrperf.ln:    rstat.h term.h rperf.h common.h
  1929. Xterm.o:        rstat.h term.h common.h
  1930. Xterm.ln:    rstat.h term.h common.h
  1931. Xrpc.o:        rstat.h rperf.h common.h
  1932. Xrpc.ln:        rstat.h rperf.h common.h
  1933. X$(GEN_OBJS):    rstat.h
  1934. X$(GEN_LNS):    rstat.h
  1935. Xhsearch.o:    hsearch.h
  1936. Xhsearch.ln:    hsearch.h
  1937. END_OF_FILE
  1938. if test 5171 -ne `wc -c <'Makefile.in'`; then
  1939.     echo shar: \"'Makefile.in'\" unpacked with wrong size!
  1940. fi
  1941. # end of 'Makefile.in'
  1942. fi
  1943. if test -f 'rstat.x' -a "${1}" != "-c" ; then 
  1944.   echo shar: Will not clobber existing file \"'rstat.x'\"
  1945. else
  1946. echo shar: Extracting \"'rstat.x'\" \(4278 characters\)
  1947. sed "s/^X//" >'rstat.x' <<'END_OF_FILE'
  1948. X/* @(#)rstat.x    2.2 88/08/01 4.0 RPCSRC */
  1949. X/* @(#)rstat.x 1.2 87/09/18 Copyr 1987 Sun Micro */
  1950. X
  1951. X/*
  1952. X * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
  1953. X * unrestricted use provided that this legend is included on all tape
  1954. X * media and as a part of the software program in whole or part.  Users
  1955. X * may copy or modify Sun RPC without charge, but are not authorized
  1956. X * to license or distribute it to anyone else except as part of a product or
  1957. X * program developed by the user.
  1958. X * 
  1959. X * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
  1960. X * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  1961. X * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
  1962. X * 
  1963. X * Sun RPC is provided with no support and without any obligation on the
  1964. X * part of Sun Microsystems, Inc. to assist in its use, correction,
  1965. X * modification or enhancement.
  1966. X * 
  1967. X * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
  1968. X * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
  1969. X * OR ANY PART THEREOF.
  1970. X * 
  1971. X * In no event will Sun Microsystems, Inc. be liable for any lost revenue
  1972. X * or profits or other special, indirect and consequential damages, even if
  1973. X * Sun has been advised of the possibility of such damages.
  1974. X * 
  1975. X * Sun Microsystems, Inc.
  1976. X * 2550 Garcia Avenue
  1977. X * Mountain View, California  94043
  1978. X */
  1979. X
  1980. X/*
  1981. X * Gather statistics on remote machines
  1982. X */
  1983. X
  1984. X#ifdef RPC_HDR
  1985. X
  1986. X%#ifndef FSCALE
  1987. X%/*
  1988. X% * Scale factor for scaled integers used to count load averages.
  1989. X% */
  1990. X%#define FSHIFT  8               /* bits to right of fixed binary point */
  1991. X%#define FSCALE  (1<<FSHIFT)
  1992. X%
  1993. X%#endif /* ndef FSCALE */
  1994. X
  1995. X#endif /* def RPC_HDR */
  1996. X
  1997. Xconst CPUSTATES = 4;
  1998. Xconst DK_NDRIVE = 4;    /* max drives for rstatprog versions 1-3 */
  1999. X
  2000. X/*
  2001. X * GMT since 0:00, January 1, 1970
  2002. X */
  2003. Xstruct rstat_timeval {
  2004. X    unsigned int tv_sec;    /* seconds */
  2005. X    unsigned int tv_usec;    /* and microseconds */
  2006. X};
  2007. X
  2008. Xstruct statsvar {                /* version 4 */
  2009. X    int cp_time<>;
  2010. X    int dk_xfer<>;
  2011. X    unsigned int v_pgpgin;
  2012. X    unsigned int v_pgpgout;
  2013. X    unsigned int v_pswpin;
  2014. X    unsigned int v_pswpout;
  2015. X    unsigned int v_intr;
  2016. X    int if_ipackets;
  2017. X    int if_ierrors;
  2018. X    int if_opackets;
  2019. X    int if_oerrors;
  2020. X    int if_collisions;
  2021. X    unsigned int v_swtch;
  2022. X    long avenrun[3];
  2023. X    rstat_timeval boottime;
  2024. X    rstat_timeval curtime;
  2025. X};
  2026. X
  2027. Xstruct statstime {                /* RSTATVERS_TIME */
  2028. X    int cp_time[CPUSTATES];
  2029. X    int dk_xfer[DK_NDRIVE];
  2030. X    unsigned int v_pgpgin;    /* these are cumulative sum */
  2031. X    unsigned int v_pgpgout;
  2032. X    unsigned int v_pswpin;
  2033. X    unsigned int v_pswpout;
  2034. X    unsigned int v_intr;
  2035. X    int if_ipackets;
  2036. X    int if_ierrors;
  2037. X    int if_oerrors;
  2038. X    int if_collisions;
  2039. X    unsigned int v_swtch;
  2040. X    int avenrun[3];         /* scaled by FSCALE */
  2041. X    rstat_timeval boottime;
  2042. X    rstat_timeval curtime;
  2043. X    int if_opackets;
  2044. X};
  2045. X
  2046. Xstruct statsswtch {            /* RSTATVERS_SWTCH */
  2047. X    int cp_time[CPUSTATES];
  2048. X    int dk_xfer[DK_NDRIVE];
  2049. X    unsigned int v_pgpgin;    /* these are cumulative sum */
  2050. X    unsigned int v_pgpgout;
  2051. X    unsigned int v_pswpin;
  2052. X    unsigned int v_pswpout;
  2053. X    unsigned int v_intr;
  2054. X    int if_ipackets;
  2055. X    int if_ierrors;
  2056. X    int if_oerrors;
  2057. X    int if_collisions;
  2058. X    unsigned int v_swtch;
  2059. X    unsigned int avenrun[3];/* scaled by FSCALE */
  2060. X    rstat_timeval boottime;
  2061. X    int if_opackets;
  2062. X};
  2063. X
  2064. Xstruct stats {                /* RSTATVERS_ORIG */
  2065. X    int cp_time[CPUSTATES];
  2066. X    int dk_xfer[DK_NDRIVE];
  2067. X    unsigned int v_pgpgin;    /* these are cumulative sum */
  2068. X    unsigned int v_pgpgout;
  2069. X    unsigned int v_pswpin;
  2070. X    unsigned int v_pswpout;
  2071. X    unsigned int v_intr;
  2072. X    int if_ipackets;
  2073. X    int if_ierrors;
  2074. X    int if_oerrors;
  2075. X    int if_collisions;
  2076. X    int if_opackets;
  2077. X};
  2078. X
  2079. X
  2080. Xprogram RSTATPROG {
  2081. X    /*
  2082. X     * variable number of disks and cpu states
  2083. X     */
  2084. X    version RSTATVERS_VAR {
  2085. X        statsvar
  2086. X        RSTATPROC_STATS(void) = 1;
  2087. X
  2088. X        unsigned int
  2089. X        RSTATPROC_HAVEDISK(void) = 2;
  2090. X    } = 4;
  2091. X    /*
  2092. X     * version includes current time and context switching info
  2093. X     */
  2094. X    version RSTATVERS_TIME {
  2095. X        statstime
  2096. X        RSTATPROC_STATS(void) = 1;
  2097. X
  2098. X        unsigned int
  2099. X        RSTATPROC_HAVEDISK(void) = 2;
  2100. X    } = 3;
  2101. X    /*
  2102. X     * Does not have current time
  2103. X     */
  2104. X    version RSTATVERS_SWTCH {
  2105. X        statsswtch
  2106. X        RSTATPROC_STATS(void) = 1;
  2107. X
  2108. X        unsigned int
  2109. X        RSTATPROC_HAVEDISK(void) = 2;
  2110. X    } = 2;
  2111. X    /*
  2112. X     * Old version has no info about current time or context switching
  2113. X     */
  2114. X    version RSTATVERS_ORIG {
  2115. X        stats
  2116. X        RSTATPROC_STATS(void) = 1;
  2117. X
  2118. X        unsigned int
  2119. X        RSTATPROC_HAVEDISK(void) = 2;
  2120. X    } = 1;
  2121. X} = 100001;
  2122. END_OF_FILE
  2123. if test 4278 -ne `wc -c <'rstat.x'`; then
  2124.     echo shar: \"'rstat.x'\" unpacked with wrong size!
  2125. fi
  2126. # end of 'rstat.x'
  2127. fi
  2128. if test -f 'rstat.h' -a "${1}" != "-c" ; then 
  2129.   echo shar: Will not clobber existing file \"'rstat.h'\"
  2130. else
  2131. echo shar: Extracting \"'rstat.h'\" \(2556 characters\)
  2132. sed "s/^X//" >'rstat.h' <<'END_OF_FILE'
  2133. X/*
  2134. X * Please do not edit this file.
  2135. X * It was generated using rpcgen.
  2136. X */
  2137. X
  2138. X#include <rpc/types.h>
  2139. X
  2140. X#ifndef FSCALE
  2141. X/*
  2142. X * Scale factor for scaled integers used to count load averages.
  2143. X */
  2144. X#define FSHIFT  8               /* bits to right of fixed binary point */
  2145. X#define FSCALE  (1<<FSHIFT)
  2146. X
  2147. X#endif /* ndef FSCALE */
  2148. X#define CPUSTATES 4
  2149. X#define DK_NDRIVE 4
  2150. X
  2151. Xstruct rstat_timeval {
  2152. X    u_int tv_sec;
  2153. X    u_int tv_usec;
  2154. X};
  2155. Xtypedef struct rstat_timeval rstat_timeval;
  2156. Xbool_t xdr_rstat_timeval();
  2157. X
  2158. Xstruct statsvar {
  2159. X    struct {
  2160. X        u_int cp_time_len;
  2161. X        int *cp_time_val;
  2162. X    } cp_time;
  2163. X    struct {
  2164. X        u_int dk_xfer_len;
  2165. X        int *dk_xfer_val;
  2166. X    } dk_xfer;
  2167. X    u_int v_pgpgin;
  2168. X    u_int v_pgpgout;
  2169. X    u_int v_pswpin;
  2170. X    u_int v_pswpout;
  2171. X    u_int v_intr;
  2172. X    int if_ipackets;
  2173. X    int if_ierrors;
  2174. X    int if_opackets;
  2175. X    int if_oerrors;
  2176. X    int if_collisions;
  2177. X    u_int v_swtch;
  2178. X    long avenrun[3];
  2179. X    rstat_timeval boottime;
  2180. X    rstat_timeval curtime;
  2181. X};
  2182. Xtypedef struct statsvar statsvar;
  2183. Xbool_t xdr_statsvar();
  2184. X
  2185. Xstruct statstime {
  2186. X    int cp_time[CPUSTATES];
  2187. X    int dk_xfer[DK_NDRIVE];
  2188. X    u_int v_pgpgin;
  2189. X    u_int v_pgpgout;
  2190. X    u_int v_pswpin;
  2191. X    u_int v_pswpout;
  2192. X    u_int v_intr;
  2193. X    int if_ipackets;
  2194. X    int if_ierrors;
  2195. X    int if_oerrors;
  2196. X    int if_collisions;
  2197. X    u_int v_swtch;
  2198. X    int avenrun[3];
  2199. X    rstat_timeval boottime;
  2200. X    rstat_timeval curtime;
  2201. X    int if_opackets;
  2202. X};
  2203. Xtypedef struct statstime statstime;
  2204. Xbool_t xdr_statstime();
  2205. X
  2206. Xstruct statsswtch {
  2207. X    int cp_time[CPUSTATES];
  2208. X    int dk_xfer[DK_NDRIVE];
  2209. X    u_int v_pgpgin;
  2210. X    u_int v_pgpgout;
  2211. X    u_int v_pswpin;
  2212. X    u_int v_pswpout;
  2213. X    u_int v_intr;
  2214. X    int if_ipackets;
  2215. X    int if_ierrors;
  2216. X    int if_oerrors;
  2217. X    int if_collisions;
  2218. X    u_int v_swtch;
  2219. X    u_int avenrun[3];
  2220. X    rstat_timeval boottime;
  2221. X    int if_opackets;
  2222. X};
  2223. Xtypedef struct statsswtch statsswtch;
  2224. Xbool_t xdr_statsswtch();
  2225. X
  2226. Xstruct stats {
  2227. X    int cp_time[CPUSTATES];
  2228. X    int dk_xfer[DK_NDRIVE];
  2229. X    u_int v_pgpgin;
  2230. X    u_int v_pgpgout;
  2231. X    u_int v_pswpin;
  2232. X    u_int v_pswpout;
  2233. X    u_int v_intr;
  2234. X    int if_ipackets;
  2235. X    int if_ierrors;
  2236. X    int if_oerrors;
  2237. X    int if_collisions;
  2238. X    int if_opackets;
  2239. X};
  2240. Xtypedef struct stats stats;
  2241. Xbool_t xdr_stats();
  2242. X
  2243. X#define RSTATPROG ((u_long)100001)
  2244. X#define RSTATVERS_VAR ((u_long)4)
  2245. X#define RSTATPROC_STATS ((u_long)1)
  2246. Xextern statsvar *rstatproc_stats_4();
  2247. X#define RSTATPROC_HAVEDISK ((u_long)2)
  2248. Xextern u_int *rstatproc_havedisk_4();
  2249. X#define RSTATVERS_TIME ((u_long)3)
  2250. Xextern statstime *rstatproc_stats_3();
  2251. Xextern u_int *rstatproc_havedisk_3();
  2252. X#define RSTATVERS_SWTCH ((u_long)2)
  2253. Xextern statsswtch *rstatproc_stats_2();
  2254. Xextern u_int *rstatproc_havedisk_2();
  2255. X#define RSTATVERS_ORIG ((u_long)1)
  2256. Xextern stats *rstatproc_stats_1();
  2257. Xextern u_int *rstatproc_havedisk_1();
  2258. END_OF_FILE
  2259. if test 2556 -ne `wc -c <'rstat.h'`; then
  2260.     echo shar: \"'rstat.h'\" unpacked with wrong size!
  2261. fi
  2262. # end of 'rstat.h'
  2263. fi
  2264. if test -f 'term.h' -a "${1}" != "-c" ; then 
  2265.   echo shar: Will not clobber existing file \"'term.h'\"
  2266. else
  2267. echo shar: Extracting \"'term.h'\" \(87 characters\)
  2268. sed "s/^X//" >'term.h' <<'END_OF_FILE'
  2269. Xextern void     init_termcap();
  2270. Xextern void     check_term();
  2271. Xextern void     clear();
  2272. END_OF_FILE
  2273. if test 87 -ne `wc -c <'term.h'`; then
  2274.     echo shar: \"'term.h'\" unpacked with wrong size!
  2275. fi
  2276. # end of 'term.h'
  2277. fi
  2278. echo shar: End of archive 1 \(of 4\).
  2279. cp /dev/null ark1isdone
  2280. MISSING=""
  2281. for I in 1 2 3 4 ; do
  2282.     if test ! -f ark${I}isdone ; then
  2283.     MISSING="${MISSING} ${I}"
  2284.     fi
  2285. done
  2286. if test "${MISSING}" = "" ; then
  2287.     echo You have unpacked all 4 archives.
  2288.     echo "Now do 'sh ./configure' or 'sh ./configure -prefix=PATH' (Default = /usr/local)"
  2289.     rm -f ark[1-9]isdone
  2290. else
  2291.     echo You still need to unpack the following archives:
  2292.     echo "        " ${MISSING}
  2293. fi
  2294. ##  End of shell archive.
  2295. exit 0
  2296.  
  2297. exit 0 # Just in case...
  2298.