aps-0.15/0000777000000000000000000000000007102607452005740 5aps-0.15/Makefile.in0000644000000000000000000002625607102607452007734 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CFLAGS = @CFLAGS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INCLUDE_INST_DIR = @INCLUDE_INST_DIR@ LFLAGS = @LFLAGS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PORTLIST_MAX_PNUM = @PORTLIST_MAX_PNUM@ VERSION = @VERSION@ XAPS_ENABLED = @XAPS_ENABLED@ X_CFLAGS = @X_CFLAGS@ X_LFLAGS = @X_LFLAGS@ EXTRA_DIST = doc/aps.1.gz SUBDIRS = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ./src/include/config.h CONFIG_CLEAN_FILES = DIST_COMMON = README AUTHORS COPYING ChangeLog INSTALL Makefile.am \ Makefile.in NEWS acconfig.h aclocal.m4 config.guess config.sub \ configure configure.in install-sh missing mkinstalldirs \ src/include/config.h.in src/include/stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) src/include/config.h: src/include/stamp-h @if test ! -f $@; then \ rm -f src/include/stamp-h; \ $(MAKE) src/include/stamp-h; \ else :; fi src/include/stamp-h: $(srcdir)/src/include/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=src/include/config.h \ $(SHELL) ./config.status @echo timestamp > src/include/stamp-h 2> /dev/null $(srcdir)/src/include/config.h.in: $(srcdir)/src/include/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/src/include/stamp-h.in; \ $(MAKE) $(srcdir)/src/include/stamp-h.in; \ else :; fi $(srcdir)/src/include/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/src/include/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f src/include/config.h maintainer-clean-hdr: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) $(mkinstalldirs) $(distdir)/doc @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile all-redirect: all-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean install: mkdir -p ${INCLUDE_INST_DIR} if [ -f src/include/portlist.aps ]; then\ cp -f src/include/portlist.aps ${INCLUDE_INST_DIR};fi if [ ! -d /usr/man/man1 ]; then mkdir -p /usr/man/man1; fi if [ -f doc/aps.1.gz ]; then\ cp -f doc/aps.1.gz /usr/man/man1/;fi # 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: aps-0.15/doc/0000755000000000000000000000000007102607452006501 5aps-0.15/doc/aps.1.gz0000644000000000000000000000331407076317355007720 #8aps.1Vks_/LRȀl"qljk]Hsz$ulLOO?Nn/Ft{%?=")"*+l F|\|ބiY~-駍V/?UY@FRJ7FebLR i)ҬRVGJE%Q(X0g_/͒DR3iRNVTRbNҝ?vwP'G ZcAVJTqJa kRK+u&*IZUVH:dǧ/&RF(txqpb4>-9p?3e.NA+7XQgЅQrص5ݫko|jorOtZi{LݷtΣ(`K/QjwݙB:Ǭ)n ﲝ3]qq2N湲BĮnj3M;wSς\QgܛU9gȃ4r䬢6:W:1ϣ# I$UvXKY+5#s8}ۆ f|2/d^߳|>z\ s(SBldaڄl<8vRDG=OdDJ/o{e_ gt*G"HnF>ًO˥H<4p_;/x ?8;1S'04]#zB*):-_um@(f!1C{_TŹHƋvz;AYڼd0ܢ~˕*{x?=~?do*&1c4W"s'Ez4]-%{ʟAA[YH-rPrVZZ鈭|g:DՠG1iWOjo:D'jw;؂F$6Gc#/CkՒ==))q "s.lЦ*{d̮G%*ފ@D"]e*=r2Y,lbkx>1N sz늻*1s7rS=ҟ?ҙAl_Mq Up\iA<^/S/`"zN$Ux3_M^Yr^aZHczAyJ;qi C8Bح"HنGGHHm*+k`7!ףwhƐ=Zg;eVᦆl-rh JFڌ=Ð~}<=sԕLTrըEGXF4̣_&W}j椪8 {Qp,=M]gy#Ԩ`0b聑R12!aӦDJ[; I[@EԘm8m@y 9ciى'Vh(N2~ 醱;m%vP 7}PfV~:((%J[o Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. aps-0.15/ChangeLog0000644000000000000000000000467407077123156007446 V0.14: - Added protected modes to ASCII output for saving the console-modes this will cut off characters below 32 and between 150 and 160(MODE 5) the cutted characters may be displayed as HEX (MODE 6) In most cases this works fine but sometimes not .. if anybody knows what characters are the dangerous ones please tell me ! - Added a mode for printing only the rest (data) in ASCII or HEX. - Added the capability to switch X-Interface-compilation on and of - fixed a bug in UDP-reports (8 bytes got displayed twice :-) - fixed a bug in the HEX-output-routine (at each line the last byte was cut off :-< ) - Started to implement the APS-X-Interface XAPS (over SHMEM) to display a few counters and reset buttons with them ... - Added a "better" INSTALL-description - Internal handling enhancements - Added Colorization for different packet-types and an alarming for some ports (ANSI-BEEP) V0.13: - deleted redundant command line parameter "ip" for protocoll filtering which confused the ip-* parsing - fixed commandline-parsing bug which mixed up port-filtering options - Again fixed a bug in guessing port-names (was limited to ports lower 1023 rather than 17999) - Now portlist.aps can contain comments and empty lines - enabled configurable portlist-range (memory usage) - added quiet and raw mode for piping into a script or whatever V0.12: - added packet counters for optional statistics at termination - extended configure-script - added output of BUILD-VERSION on startup - fixed a further pnum_pname bug (nothing critical but i hope that was the last !! GRMPFL) - altered the ICMP-output style a bit (for 80 char console) - now we can filter a scope of ports (ie. from 20-30) - added and altered functionality in configure - separated precompiled binary from source distribution V0.11b: - now some H-files fewer - changed command style to SYSV in Makefile.am - configure: now checking for needed H-files and some functions V0.11: - fixed pnum_pname bug (from 0.10) for higher ports than 17000 V0.10: - fixed filtering bug for hardware layer - enabled port-filtering - enabled TCP/UDP/ICMP filtering - fixed bug in parameter-parsing - expanded configure-usage V0.05: - got this all into a autoconf/automake environment - completed the portnumber to protocolname mapping - fixed this shitty SuSE-include problem V0.04: - major bugfixes in filtering - the rest ? ... don't know anymore ... aps-0.15/INSTALL0000644000000000000000000002357407062754250006724 INSTALLING APS ============== First you have to call the configure-script: >./configure Optionally you can disable the compilation of the X-GUI by passing "--disable-xaps" to the configure script: >./configure --disable-xaps Now you SHOULD check "src/include/user_config.h" for the correct settings !! If there were no errors you can call make: >make If the make did not break at all you may install and test the binary: >make install Now it produces a SEGFAULT ? Then you may send me the output of an "ldd -V -d -r ./aps" from whithin the source directory (ie. ..../aps-0.13/src/ ) and a brief description what parameters you used to compile APS. And of course the VERSION of APS as well as information about your system (os-version,os-name,architecture). If you altered any files you MUST mail them also!! (see AUTHORS) Now after a call it ONLY traces YOUR packets and BROADCASTS ? You may have to set your Ethernet Card to promiscous mode by hand, by typing. >ifconfig eth0 promisc (this works with linux) KNOWN ERRORS during the CONFIGURE-SCRIPT: ----------------------------------------- If CONFIGURE caught an error while checking for GTK: If you now you have the correct GTK-Version you may add "--disable-gtktest" to the parameter line for configure. (try it ! maybe it works :-) If CONFIGURE caught an error while checking for the header files: Some distributions do not include all Header-Files or rename them. So it MAY suffice to copy an equal file out of the include-dir of another distribution. (BE CAUTIOUS WHEN COPYING FILES, ONLY DO IF YOU NOW WHAT YOU ARE DOING !!) Also it would be VERY nice if you would drop me a note if needed to do so! If MAKE caught an error while compiling aps: Hmm ... looks bad ... you can still send me a mail (see README/AUTHORS). If MAKE caught an error while compiling xaps: Maybe you have disabled the GTK-TEST but do NOT have the correct version or you have mixed your includes of GTK with the rest? Download and compile a new version of the gtklibs and try configure again after deleting config.cache! Okay .. If this did not suffice here comes the Basic Introduction into installing and compiling software with the GNU-auto-environment... 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, a file `config.cache' that saves the results of its tests to speed up reconfiguring, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). 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 at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.in' is used to create `configure' by a program called `autoconf'. You only need `configure.in' 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. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 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 supports 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' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' 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' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM 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 host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. 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. Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--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. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. aps-0.15/Makefile.am0000644000000000000000000000047407062754414007723 EXTRA_DIST += \ doc/aps.1.gz SUBDIRS = src install: mkdir -p ${INCLUDE_INST_DIR} if [ -f src/include/portlist.aps ]; then\ cp -f src/include/portlist.aps ${INCLUDE_INST_DIR};fi if [ ! -d /usr/man/man1 ]; then mkdir -p /usr/man/man1; fi if [ -f doc/aps.1.gz ]; then\ cp -f doc/aps.1.gz /usr/man/man1/;fi aps-0.15/NEWS0000644000000000000000000000002607076314367006363 A new version maybe ??aps-0.15/aclocal.m40000644000000000000000000003061207102607435007517 dnl aclocal.m4 generated automatically by aclocal 1.4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # Do all the work for Automake. This macro actually does too much -- # some checks are only needed if your package does certain things. # But this isn't really a big deal. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # # Check to make sure that the build environment is sane. # AC_DEFUN(AM_SANITY_CHECK, [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN(AM_MISSING_PROG, [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN(AM_CONFIG_HEADER, [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # Configure paths for GTK+ # Owen Taylor 97-11-3 dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS dnl AC_DEFUN(AM_PATH_GTK, [dnl dnl Get the cflags and libraries from the gtk-config script dnl AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)], gtk_config_prefix="$withval", gtk_config_prefix="") AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)], gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="") AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program], , enable_gtktest=yes) for module in . $4 do case "$module" in gthread) gtk_config_args="$gtk_config_args gthread" ;; esac done if test x$gtk_config_exec_prefix != x ; then gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config fi fi if test x$gtk_config_prefix != x ; then gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix" if test x${GTK_CONFIG+set} != xset ; then GTK_CONFIG=$gtk_config_prefix/bin/gtk-config fi fi AC_PATH_PROG(GTK_CONFIG, gtk-config, no) min_gtk_version=ifelse([$1], ,0.99.7,$1) AC_MSG_CHECKING(for GTK - version >= $min_gtk_version) no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" dnl dnl Now check if the installed GTK is sufficiently new. (Also sanity dnl checks the results of gtk-config to some extent dnl rm -f conf.gtktest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" AC_TRY_LINK([ #include #include ], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) rm -f conf.gtktest ]) aps-0.15/config.guess0000755000000000000000000007501707040361504010202 #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 # Free Software Foundation, Inc. # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Written by Per Bothner . # The master version of this file is at the FSF in /home/gd/gnu/lib. # Please send patches to the Autoconf mailing list . # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit system type (host/target name). # # Only a few systems have been added to this list; please add others # (but try to keep the structure clean). # # Use $HOST_CC if defined. $CC may point to a cross-compiler if test x"$CC_FOR_BUILD" = x; then if test x"$HOST_CC" != x; then CC_FOR_BUILD="$HOST_CC" else if test x"$CC" != x; then CC_FOR_BUILD="$CC" else CC_FOR_BUILD=cc fi fi fi # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 8/24/94.) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. cat <$dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit 0 ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-cbm-sysv4 exit 0;; amiga:NetBSD:*:*) echo m68k-cbm-netbsd${UNAME_RELEASE} exit 0 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; arc64:OpenBSD:*:*) echo mips64el-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hkmips:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mips-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; arm32:NetBSD:*:*) echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; SR2?01:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit 0;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit 0 ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit 0 ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; atari*:NetBSD:*:*) echo m68k-atari-netbsd${UNAME_RELEASE} exit 0 ;; atari*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit 0 ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit 0 ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit 0 ;; sun3*:NetBSD:*:*) echo m68k-sun-netbsd${UNAME_RELEASE} exit 0 ;; sun3*:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:NetBSD:*:*) echo m68k-apple-netbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mvme88k:OpenBSD:*:*) echo m88k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; macppc:NetBSD:*:*) echo powerpc-apple-netbsd${UNAME_RELEASE} exit 0 ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit 0 ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit 0 ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit 0 ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit 0 ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit 0 ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit 0 ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit 0 ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit 0 ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit 0 ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit 0 ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i?86:AIX:*:*) echo i386-ibm-aix exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit 0 ;; *:AIX:*:4) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=4.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; *:AIX:*:*) echo rs6000-ibm-aix exit 0 ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit 0 ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit 0 ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit 0 ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; 9000/[34678]??:HP-UX:*:*) case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) sed 's/^ //' << EOF >$dummy.c #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF ($CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` rm -f $dummy.c $dummy esac HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; 3050*:HI-UX:*:*) sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit 0 ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; *9??*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; i?86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit 0 ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit 0 ;; hppa*:OpenBSD:*:*) echo hppa-unknown-openbsd exit 0 ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit 0 ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit 0 ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit 0 ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; CRAY*X-MP:*:*:*) echo xmp-cray-unicos exit 0 ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} exit 0 ;; CRAY*T3E:*:*:*) echo t3e-cray-unicosmk${UNAME_RELEASE} exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F300:UNIX_System_V:*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; F301:UNIX_System_V:*:*) echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` exit 0 ;; hp3[0-9][05]:NetBSD:*:*) echo m68k-hp-netbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i?86:BSD/386:*:* | i?86:BSD/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) if test -x /usr/bin/objformat; then if test "elf" = "`/usr/bin/objformat`"; then echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` exit 0 fi fi echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit 0 ;; *:NetBSD:*:*) echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i386-pc-interix exit 0 ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit 0 ;; *:Linux:*:*) # uname on the ARM produces all sorts of strangeness, and we need to # filter it out. case "$UNAME_MACHINE" in armv*) UNAME_MACHINE=$UNAME_MACHINE ;; arm* | sa110*) UNAME_MACHINE="arm" ;; esac # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. ld_help_string=`cd /; ld --help 2>&1` ld_supported_emulations=`echo $ld_help_string \ | sed -ne '/supported emulations:/!d s/[ ][ ]*/ /g s/.*supported emulations: *// s/ .*// p'` case "$ld_supported_emulations" in i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; elf32ppc) # Determine Lib Version cat >$dummy.c < #if defined(__GLIBC__) extern char __libc_version[]; extern char __libc_release[]; #endif main(argc, argv) int argc; char *argv[]; { #if defined(__GLIBC__) printf("%s %s\n", __libc_version, __libc_release); #else printf("unkown\n"); #endif return 0; } EOF LIBC="" $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy | grep 1\.99 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.c $dummy echo powerpc-unknown-linux-gnu${LIBC} ; exit 0 ;; esac if test "${UNAME_MACHINE}" = "alpha" ; then sed 's/^ //' <$dummy.s .globl main .ent main main: .frame \$30,0,\$26,0 .prologue 0 .long 0x47e03d80 # implver $0 lda \$2,259 .long 0x47e20c21 # amask $2,$1 srl \$1,8,\$2 sll \$2,2,\$2 sll \$0,3,\$0 addl \$1,\$0,\$0 addl \$2,\$0,\$0 ret \$31,(\$26),1 .end main EOF LIBC="" $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then ./$dummy case "$?" in 7) UNAME_MACHINE="alpha" ;; 15) UNAME_MACHINE="alphaev5" ;; 14) UNAME_MACHINE="alphaev56" ;; 10) UNAME_MACHINE="alphapca56" ;; 16) UNAME_MACHINE="alphaev6" ;; esac objdump --private-headers $dummy | \ grep ld.so.1 > /dev/null if test "$?" = 0 ; then LIBC="libc1" fi fi rm -f $dummy.s $dummy echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 elif test "${UNAME_MACHINE}" = "mips" ; then cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy else # Either a pre-BFD a.out linker (linux-gnuoldld) # or one that does not give us useful --help. # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. # If ld does not provide *any* "supported emulations:" # that means it is gnuoldld. echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 case "${UNAME_MACHINE}" in i?86) VENDOR=pc; ;; *) VENDOR=unknown; ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); #endif return 0; } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy fi ;; # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions # are messed up and put the nodename in both sysname and nodename. i?86:DYNIX/ptx:4*:*) echo i386-sequent-sysv4 exit 0 ;; i?86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit 0 ;; i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} fi exit 0 ;; i?86:*:5:7*) UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent.*II' >/dev/null) && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) && UNAME_MACHINE=i585 echo ${UNAME_MACHINE}-${UNAME_SYSTEM}${UNAME_VERSION}-sysv${UNAME_RELEASE} exit 0 ;; i?86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; paragon:*:*:*) echo i860-intel-osf1 exit 0 ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit 0 ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4.3${OS_REL} && exit 0 /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; m68*:LynxOS:2.*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit 0 ;; PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit 0 ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; news*:NEWS-OS:*:6*) echo mips-sony-newsos6 exit 0 ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit 0 ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit 0 ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit 0 ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit 0 ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit 0 ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit 0 ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) #if !defined (ultrix) printf ("vax-dec-bsd\n"); exit (0); #else printf ("vax-dec-ultrix\n"); exit (0); #endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit 0 ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit 0 ;; c34*) echo c34-convex-bsd exit 0 ;; c38*) echo c38-convex-bsd exit 0 ;; c4*) echo c4-convex-bsd exit 0 ;; esac fi #echo '(Unable to guess system type)' 1>&2 exit 1 aps-0.15/config.sub0000755000000000000000000005715307040361510007643 #! /bin/sh # Configuration validation subroutine script, version 1.1. # Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. # 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., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # 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. if [ x$1 = x ] then echo Configuration name missing. 1>&2 echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 echo "or $0 ALIAS" 1>&2 echo where ALIAS is a recognized configuration type. 1>&2 exit 1 fi # First pass through any local machine types. case $1 in *local*) echo $1 exit 0 ;; *) ;; 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 linux-gnu*) 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) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=vxworks 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 ;; 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. tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | miprs64vr5000el \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | thumb | d10v) basic_machine=$basic_machine-unknown ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) ;; # 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[34567]86) 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. vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* \ | f301-* | armv*-* | t3e-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) ;; # 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 ;; 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 ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-cbm ;; amigaos | amigados) basic_machine=m68k-cbm os=-amigaos ;; amigaunix | amix) basic_machine=m68k-cbm 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 ;; 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 | ymp) basic_machine=ymp-cray os=-unicos ;; cray2) basic_machine=cray2-cray os=-unicos ;; [ctj]90-cray) basic_machine=c90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; 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 ;; 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 os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i[34567]86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i[34567]86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i[34567]86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i[34567]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 ;; i386-go32 | go32) basic_machine=i386-unknown os=-go32 ;; i386-mingw32 | mingw32) basic_machine=i386-unknown os=-mingw32 ;; 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 ;; miniframe) basic_machine=m68000-convergent ;; *mint | *MiNT) basic_machine=m68k-atari os=-mint ;; mipsel*-linux*) basic_machine=mipsel-unknown os=-linux-gnu ;; mips*-linux*) basic_machine=mips-unknown os=-linux-gnu ;; 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 ;; msdos) basic_machine=i386-unknown os=-msdos ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-corel 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 ;; np1) basic_machine=np1-gould ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; 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 | nexen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=rs6000-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/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-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 ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; tower | tower-32) basic_machine=m68k-ncr ;; 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 ;; xmp) basic_machine=xmp-cray os=-unicos ;; xps | xps100) basic_machine=xps100-honeywell ;; 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 ;; mips) if [ x$os = x-linux-gnu ]; then basic_machine=mips-unknown else basic_machine=mips-mips fi ;; romp) basic_machine=romp-ibm ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sparc | sparcv9) 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 ;; c4x*) basic_machine=c4x-none os=-coff ;; *) 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* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -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|'` ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -ns2 ) os=-nextstep2 ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -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) os=-mint ;; -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*-corel) os=-linux ;; arm*-semi) os=-aout ;; 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 ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-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 ;; f301-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*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -*MiNT) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os aps-0.15/configure0000755000000000000000000022270407102607436007574 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --enable-maxport redefine the highest port supported in portlist.aps" ac_help="$ac_help --disable-xaps do not try to compile the X-Interface for APS" ac_help="$ac_help " ac_help="$ac_help --with-gtk-prefix=PFX Prefix where GTK is installed (optional)" ac_help="$ac_help --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)" ac_help="$ac_help --disable-gtktest Do not try to compile and run a test GTK program" # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE 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' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 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 case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # 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 ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$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" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) 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) # 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 << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --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 EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$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) 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 ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi 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 "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # 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 # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=src/aps.c # 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_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 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 "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # 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 "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross ac_exeext= ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi 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 fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Do some error checking and defaulting for the host and target type. # The inputs are: # configure --host=HOST --target=TARGET --build=BUILD NONOPT # # The rules are: # 1. You are not allowed to specify --host, --target, and nonopt at the # same time. # 2. Host defaults to nonopt. # 3. If nonopt is not specified, then host defaults to the current host, # as determined by config.guess. # 4. Target and build default to nonopt. # 5. If nonopt is not specified, then target and build default to host. # The aliases save the names the user supplied, while $host etc. # will get canonicalized. case $host---$target---$nonopt in NONE---*---* | *---NONE---* | *---*---NONE) ;; *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; esac # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:585: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 echo "configure:606: checking target system type" >&5 target_alias=$target case "$target_alias" in NONE) case $nonopt in NONE) target_alias=$host_alias ;; *) target_alias=$nonopt ;; esac ;; esac target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 echo "configure:624: checking build system type" >&5 build_alias=$build case "$build_alias" in NONE) case $nonopt in NONE) build_alias=$host_alias ;; *) build_alias=$nonopt ;; esac ;; esac build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$build" 1>&6 test "$host_alias" != "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- echo $ac_n "checking cached system tuple""... $ac_c" 1>&6 echo "configure:649: checking cached system tuple" >&5 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; } || { test x"${ac_cv_build_system_type+set}" = x"set" && test x"$ac_cv_build_system_type" != x"$build"; } || { test x"${ac_cv_target_system_type+set}" = x"set" && test x"$ac_cv_target_system_type" != x"$target"; }; then echo "$ac_t""different" 1>&6 echo "" > ./config.cache else echo "$ac_t""ok" 1>&6 fi ac_cv_host_system_type="$host" ac_cv_build_system_type="$build" ac_cv_target_system_type="$target" # Make sure we can run config.sub. if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 echo "configure:672: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 # 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 # 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" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:705: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/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 if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" 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 "$ac_t""$INSTALL" 1>&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_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo "configure:758: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { echo "configure: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" 1>&2; exit 1; } fi test "$2" = conftestfile ) then # Ok. : else { echo "configure: error: newly created file is older than distributed files! Check your system clock" 1>&2; exit 1; } fi rm -f conftest* echo "$ac_t""yes" 1>&6 if test "$program_transform_name" = s,x,x,; then program_transform_name= else # Double any \ or $. echo might interpret backslashes. cat <<\EOF_SED > conftestsed s,\\,\\\\,g; s,\$,$$,g EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi 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" # sed with no file args requires a program. test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo "configure:815: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftestmake <<\EOF all: @echo 'ac_maketemp="${MAKE}"' EOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftestmake 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 conftestmake fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$ac_t""yes" 1>&6 SET_MAKE= else echo "$ac_t""no" 1>&6 SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=aps VERSION=0.15 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:861: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal echo "$ac_t""found" 1>&6 else ACLOCAL="$missing_dir/missing aclocal" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo "configure:874: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf echo "$ac_t""found" 1>&6 else AUTOCONF="$missing_dir/missing autoconf" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo "configure:887: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake echo "$ac_t""found" 1>&6 else AUTOMAKE="$missing_dir/missing automake" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo "configure:900: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader echo "$ac_t""found" 1>&6 else AUTOHEADER="$missing_dir/missing autoheader" echo "$ac_t""missing" 1>&6 fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo "configure:913: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo echo "$ac_t""found" 1>&6 else MAKEINFO="$missing_dir/missing makeinfo" echo "$ac_t""missing" 1>&6 fi echo "checking host_os = $host_os" _CFLAGS="-O3 -Iinclude" X_CFLAGS="-Wall -O3 -Iinclude" X_LFLAGS="" if test $host_os = "solaris2.7" ; then { LFLAGS="-lsocket -lnsl"; } fi if test $host_os = "linux-gnu" ; then { LFLAGS=""; } fi top_srcdir="src" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:945: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 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 $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:975: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" break fi done IFS="$ac_save_ifs" 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 $# -gt 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 set dummy "$ac_dir/$ac_word" "$@" shift ac_cv_prog_CC="$@" fi fi fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -z "$CC"; then case "`uname -s`" in *win32* | *WIN32*) # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:1026: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="cl" break fi done IFS="$ac_save_ifs" fi fi CC="$ac_cv_prog_CC" if test -n "$CC"; then echo "$ac_t""$CC" 1>&6 else echo "$ac_t""no" 1>&6 fi ;; esac fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:1058: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF #line 1069 "configure" #include "confdefs.h" main(){return(0);} EOF if { (eval echo configure:1074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then ac_cv_prog_cc_cross=no else ac_cv_prog_cc_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cc_works=no fi rm -fr conftest* ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:1100: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo "configure:1105: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes else GCC= fi ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo "configure:1133: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.c if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then ac_cv_prog_cc_g=yes else ac_cv_prog_cc_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&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 $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:1165: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # This must be in double quotes, not single quotes, because CPP may get # substituted into the Makefile and "${CC-cc}" will confuse make. CPP="${CC-cc} -E" # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1186: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1203: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* CPP=/lib/cpp fi rm -f conftest* fi rm -f conftest* fi rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" else ac_cv_prog_CPP="$CPP" fi echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:1245: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_stdc=no fi rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "memchr" >/dev/null 2>&1; then : else rm -rf conftest* 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 < EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then : else rm -rf conftest* 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 < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #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); } EOF if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=no fi rm -fr conftest* fi fi fi echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF #define STDC_HEADERS 1 EOF fi for ac_hdr in unistd.h stdio.h signal.h string.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1353: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done for ac_hdr in sys/types.h sys/socket.h sys/ioctl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:1393: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <&6 fi done CFLAGS="$_CFLAGS $LFLAGS" echo $ac_n "checking size of char""... $ac_c" 1>&6 echo "configure:1433: checking size of char" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(char)); exit(0); } EOF if { (eval echo configure:1452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_char=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_char=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_char" 1>&6 cat >> confdefs.h <&6 echo "configure:1472: checking size of short" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(short)); exit(0); } EOF if { (eval echo configure:1491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_short=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_short" 1>&6 cat >> confdefs.h <&6 echo "configure:1511: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(int)); exit(0); } EOF if { (eval echo configure:1530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_int=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_int" 1>&6 cat >> confdefs.h <&6 echo "configure:1550: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() { FILE *f=fopen("conftestval", "w"); if (!f) exit(1); fprintf(f, "%d\n", sizeof(long)); exit(0); } EOF if { (eval echo configure:1569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_sizeof_long=0 fi rm -fr conftest* fi fi echo "$ac_t""$ac_cv_sizeof_long" 1>&6 cat >> confdefs.h <&6 echo "configure:1590: checking for socket" >&5 if eval "test \"`echo '$''{'ac_cv_func_socket'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char socket(); int main() { /* 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_socket) || defined (__stub___socket) choke me #else socket(); #endif ; return 0; } EOF if { (eval echo configure:1618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_socket=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_socket=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 { echo "configure: error: Function 'socket' not found." 1>&2; exit 1; } fi CFLAGS="$_CFLAGS" INCLUDE_INST_DIR="/usr/local/include/aps" PORTLIST_MAX_PNUM=17999 # Check whether --enable-maxport or --disable-maxport was given. if test "${enable_maxport+set}" = set; then enableval="$enable_maxport" echo "set PORTLIST_MAX_PNUM=$enableval Ok"; PORTLIST_MAX_PNUM=$enableval else echo "using standard portlist-size of MAXPORT=$PORTLIST_MAX_PNUM Ok" fi cat >> confdefs.h <> confdefs.h <&6 echo "configure:1741: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_GTK_CONFIG'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$GTK_CONFIG" in /*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a path. ;; ?:/*) ac_cv_path_GTK_CONFIG="$GTK_CONFIG" # Let the user override the test with a dos path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_GTK_CONFIG="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_GTK_CONFIG" && ac_cv_path_GTK_CONFIG="no" ;; esac fi GTK_CONFIG="$ac_cv_path_GTK_CONFIG" if test -n "$GTK_CONFIG"; then echo "$ac_t""$GTK_CONFIG" 1>&6 else echo "$ac_t""no" 1>&6 fi min_gtk_version=1.2.0 echo $ac_n "checking for GTK - version >= $min_gtk_version""... $ac_c" 1>&6 echo "configure:1776: checking for GTK - version >= $min_gtk_version" >&5 no_gtk="" if test "$GTK_CONFIG" = "no" ; then no_gtk=yes else GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags` GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs` gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_gtktest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$GTK_LIBS $LIBS" rm -f conf.gtktest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat > conftest.$ac_ext < #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.gtktest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_gtk_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_gtk_version"); exit(1); } if ((gtk_major_version != $gtk_config_major_version) || (gtk_minor_version != $gtk_config_minor_version) || (gtk_micro_version != $gtk_config_micro_version)) { printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version, gtk_major_version, gtk_minor_version, gtk_micro_version); printf ("*** was found! If gtk-config was correct, then it is best\n"); printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n"); printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n"); printf("*** before re-running configure\n"); } #if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION) else if ((gtk_major_version != GTK_MAJOR_VERSION) || (gtk_minor_version != GTK_MINOR_VERSION) || (gtk_micro_version != GTK_MICRO_VERSION)) { printf("*** GTK+ header files (version %d.%d.%d) do not match\n", GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", gtk_major_version, gtk_minor_version, gtk_micro_version); } #endif /* defined (GTK_MAJOR_VERSION) ... */ else { if ((gtk_major_version > major) || ((gtk_major_version == major) && (gtk_minor_version > minor)) || ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n", gtk_major_version, gtk_minor_version, gtk_micro_version); printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the gtk-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n"); printf("*** correct copy of gtk-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } EOF if { (eval echo configure:1877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* no_gtk=yes fi rm -fr conftest* fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_gtk" = x ; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 if test "$GTK_CONFIG" = "no" ; then echo "*** The gtk-config script installed by GTK could not be found" echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the GTK_CONFIG environment variable to the" echo "*** full path to gtk-config." else if test -f conf.gtktest ; then : else echo "*** Could not run GTK test program, checking why..." CFLAGS="$CFLAGS $GTK_CFLAGS" LIBS="$LIBS $GTK_LIBS" cat > conftest.$ac_ext < #include int main() { return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ; return 0; } EOF if { (eval echo configure:1921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GTK or finding the wrong" echo "*** version of GTK. If it is not finding GTK, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" echo "***" echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that" echo "*** came with the system with the command" echo "***" echo "*** rpm --erase --nodeps gtk gtk-devel" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GTK was incorrectly installed" echo "*** or that you have moved GTK since it was installed. In the latter case, you" echo "*** may want to edit the gtk-config script: $GTK_CONFIG" fi rm -f conftest* CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GTK_CFLAGS="" GTK_LIBS="" { echo "configure: error: You may add --disable-gtktest or upgrade your GTK-LIB - see www.gnome.org?" 1>&2; exit 1; } fi rm -f conf.gtktest }; fi BUILD_DATE=`date +%k:%M:%S-%D` cat >> confdefs.h < confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 DEFS=-DHAVE_CONFIG_H # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo " Makefile src/Makefile src/include/Makefile src/include/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g s%@host_vendor@%$host_vendor%g s%@host_os@%$host_os%g s%@target@%$target%g s%@target_alias@%$target_alias%g s%@target_cpu@%$target_cpu%g s%@target_vendor@%$target_vendor%g s%@target_os@%$target_os%g s%@build@%$build%g s%@build_alias@%$build_alias%g s%@build_cpu@%$build_cpu%g s%@build_vendor@%$build_vendor%g s%@build_os@%$build_os%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@PACKAGE@%$PACKAGE%g s%@VERSION@%$VERSION%g s%@ACLOCAL@%$ACLOCAL%g s%@AUTOCONF@%$AUTOCONF%g s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g s%@LFLAGS@%$LFLAGS%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_LFLAGS@%$X_LFLAGS%g s%@INCLUDE_INST_DIR@%$INCLUDE_INST_DIR%g s%@PORTLIST_MAX_PNUM@%$PORTLIST_MAX_PNUM%g s%@XAPS_ENABLED@%$XAPS_ENABLED%g s%@GTK_CONFIG@%$GTK_CONFIG%g s%@GTK_CFLAGS@%$GTK_CFLAGS%g s%@GTK_LIBS@%$GTK_LIBS%g s%@BUILD_DATE@%$BUILD_DATE%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' ac_dC='\3' ac_dD='%g' # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='\([ ]\)%\1#\2define\3' ac_uC=' ' ac_uD='\4%g' # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' if test "${CONFIG_HEADERS+set}" != set; then EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac echo creating $ac_file rm -f conftest.frag conftest.in conftest.out ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` cat $ac_file_inputs > conftest.in EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: # Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF sed -n -f conftest.hdr confdefs.h > conftest.vals rm -f conftest.hdr # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >> conftest.vals <<\EOF s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. rm -f conftest.tail while : do ac_lines=`grep -c . conftest.vals` # grep -c gives empty output for an empty file on some AIX systems. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi # Write a limited-size here document to conftest.frag. echo ' cat > conftest.frag <> $CONFIG_STATUS sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS echo 'CEOF sed -f conftest.frag conftest.in > conftest.out rm -f conftest.in mv conftest.out conftest.in ' >> $CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail rm -f conftest.vals mv conftest.tail conftest.vals done rm -f conftest.vals cat >> $CONFIG_STATUS <<\EOF rm -f conftest.frag conftest.h echo "/* $ac_file. Generated automatically by configure. */" > conftest.h cat conftest.in >> conftest.h rm -f conftest.in if cmp -s $ac_file conftest.h 2>/dev/null; then echo "$ac_file is unchanged" rm -f conftest.h else # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" fi rm -f $ac_file mv conftest.h $ac_file fi fi; done EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF test -z "$CONFIG_HEADERS" || echo timestamp > src/include/stamp-h exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 aps-0.15/configure.in0000644000000000000000000000402007102576241010162 AC_INIT(src/aps.c,aps,0.15) AC_VALIDATE_CACHED_SYSTEM_TUPLE(echo "" > ./config.cache) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(aps,0.15) AM_CONFIG_HEADER(src/include/config.h) echo "checking host_os = $host_os" _CFLAGS="-O3 -Iinclude" X_CFLAGS="-Wall -O3 -Iinclude" X_LFLAGS="" if test [ $host_os = "solaris2.7" ]; then { LFLAGS="-lsocket -lnsl"; } fi if test [ $host_os = "linux-gnu" ]; then { LFLAGS=""; } fi top_srcdir="src" AC_PROG_CC AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h stdio.h signal.h string.h) AC_CHECK_HEADERS(sys/types.h sys/socket.h sys/ioctl.h) CFLAGS="$_CFLAGS $LFLAGS" AC_CHECK_SIZEOF(char) AC_CHECK_SIZEOF(short) AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_FUNC(socket,, AC_MSG_ERROR(Function 'socket' not found.)) CFLAGS="$_CFLAGS" AC_SUBST(CFLAGS) AC_SUBST(LFLAGS) AC_SUBST(X_CFLAGS) AC_SUBST(X_LFLAGS) INCLUDE_INST_DIR="/usr/local/include/aps" AC_SUBST(INCLUDE_INST_DIR) PORTLIST_MAX_PNUM=17999 AC_ARG_ENABLE(maxport,[ --enable-maxport redefine the highest port supported in portlist.aps], echo "set PORTLIST_MAX_PNUM=$enableval Ok"; PORTLIST_MAX_PNUM=$enableval , echo "using standard portlist-size of MAXPORT=$PORTLIST_MAX_PNUM Ok") AC_DEFINE_UNQUOTED(PORTLIST_MAX_PNUM,$PORTLIST_MAX_PNUM) AC_SUBST(PORTLIST_MAX_PNUM) GTK_TEST_ARG="YES" # default is enabled but when switching of xaps this SHOULD also get "NO" !!! XAPS_ENABLED="YES" AC_ARG_ENABLE(xaps,[ --disable-xaps do not try to compile the X-Interface for APS], echo "compiling APS WITHOUT X-Interface ... Ok";XAPS_ENABLED=NO;GTK_TEST_ARG=NO, echo "trying to compile APS WITH X-Interface(default)... Ok";AC_DEFINE_UNQUOTED(XAPS_ENABLED,$XAPS_ENABLED)) AC_SUBST(XAPS_ENABLED) AC_ARG_ENABLE(gtktest,,GTK_TEST_ARG="NO") if test "$GTK_TEST_ARG" = "YES" ; then { AM_PATH_GTK(1.2.0, ,AC_MSG_ERROR(You may add --disable-gtktest or upgrade your GTK-LIB - see www.gnome.org?)) }; fi BUILD_DATE=`date +%k:%M:%S-%D` AC_DEFINE_UNQUOTED(BUILD_DATE,"$BUILD_DATE") AC_SUBST(BUILD_DATE) AC_OUTPUT([ Makefile src/Makefile src/include/Makefile ]) aps-0.15/install-sh0000755000000000000000000001272007030517126007660 #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 aps-0.15/missing0000755000000000000000000001420207030516724007253 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997 Free Software Foundation, Inc. # Franc,ois 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., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`configure.in'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` if test -z "$files"; then files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` test -z "$files" || files="$files.in" else files=`echo "$files" | sed -e 's/:/ /g'` fi test -z "$files" && files="config.h.in" touch $files ;; automake) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print \ | sed 's/^\(.*\).am$/touch \1.in/' \ | sh ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 aps-0.15/mkinstalldirs0000755000000000000000000000133407030517312010456 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.10 1996/05/03 07:37:52 friedman Exp $ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" 1>&2 mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here aps-0.15/src/0000777000000000000000000000000007102607453006530 5aps-0.15/src/Makefile.in0000644000000000000000000002601507102607453010515 # Makefile.in generated automatically by automake 1.4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ BUILD_DATE = @BUILD_DATE@ CC = @CC@ CFLAGS = @CFLAGS@ GTK_CFLAGS = @GTK_CFLAGS@ GTK_CONFIG = @GTK_CONFIG@ GTK_LIBS = @GTK_LIBS@ INCLUDE_INST_DIR = @INCLUDE_INST_DIR@ LFLAGS = @LFLAGS@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PORTLIST_MAX_PNUM = @PORTLIST_MAX_PNUM@ VERSION = @VERSION@ XAPS_ENABLED = @XAPS_ENABLED@ X_CFLAGS = @X_CFLAGS@ X_LFLAGS = @X_LFLAGS@ bin_PROGRAMS = aps xaps aps_SOURCES = aps.c tcp.c udp.c ports.c icmp.c pif.c aps_OFILES = aps.o tcp.o udp.o ports.o icmp.o pif.o xaps_SOURCES = xaps.c pif.c xaps_OFILES = xaps.o pif.o SUBDIRS = include mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../src/include/config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I../src/include CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ aps_OBJECTS = aps.o tcp.o udp.o ports.o icmp.o pif.o aps_LDADD = $(LDADD) aps_DEPENDENCIES = aps_LDFLAGS = xaps_OBJECTS = xaps.o pif.o xaps_LDADD = $(LDADD) xaps_DEPENDENCIES = xaps_LDFLAGS = COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(aps_SOURCES) $(xaps_SOURCES) OBJECTS = $(aps_OBJECTS) $(xaps_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps src/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done .c.o: $(COMPILE) -c $< .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" = "." && dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = src distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(top_distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive install-exec-am: install-binPROGRAMS install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-recursive all-am: Makefile $(PROGRAMS) all-redirect: all-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-binPROGRAMS mostlyclean-compile \ mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-binPROGRAMS clean-compile clean-tags clean-generic \ mostlyclean-am clean: clean-recursive distclean-am: distclean-binPROGRAMS distclean-compile distclean-tags \ distclean-generic clean-am distclean: distclean-recursive maintainer-clean-am: maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive .PHONY: mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile install-data-recursive \ uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ install-exec install-data-am install-data install-am install \ uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean all: aps: sync # this never hurts ${CC} ${CFLAGS} -c ${aps_SOURCES} ${CC} -o aps ${aps_OFILES} ${LFLAGS} if [ "${XAPS_ENABLED}" = "YES" ]; then\ ${CC} `gtk-config --cflags` ${X_CFLAGS} -c ${xaps_SOURCES};\ ${CC} `gtk-config --libs` ${X_LFLAGS} -o xaps ${xaps_OFILES};\ fi xaps: ${CC} `gtk-config --cflags` ${X_CFLAGS} -c ${xaps_SOURCES};\ ${CC} `gtk-config --libs` ${X_LFLAGS} -o xaps ${xaps_OFILES}; aps-static: sync ${CC} ${CFLAGS} -c ${aps_SOURCES} ${CC} -o aps ${aps_OFILES} ${LFLAGS} -static # 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: aps-0.15/src/Makefile.am0000444000000000000000000000134007055035625010477 bin_PROGRAMS = aps xaps aps_SOURCES = aps.c tcp.c udp.c ports.c icmp.c pif.c aps_OFILES = aps.o tcp.o udp.o ports.o icmp.o pif.o xaps_SOURCES = xaps.c pif.c xaps_OFILES = xaps.o pif.o SUBDIRS = include all: aps: sync # this never hurts ${CC} ${CFLAGS} -c ${aps_SOURCES} ${CC} -o aps ${aps_OFILES} ${LFLAGS} if [ "${XAPS_ENABLED}" = "YES" ]; then\ ${CC} `gtk-config --cflags` ${X_CFLAGS} -c ${xaps_SOURCES};\ ${CC} `gtk-config --libs` ${X_LFLAGS} -o xaps ${xaps_OFILES};\ fi xaps: ${CC} `gtk-config --cflags` ${X_CFLAGS} -c ${xaps_SOURCES};\ ${CC} `gtk-config --libs` ${X_LFLAGS} -o xaps ${xaps_OFILES}; aps-static: sync ${CC} ${CFLAGS} -c ${aps_SOURCES} ${CC} -o aps ${aps_OFILES} ${LFLAGS} -static aps-0.15/src/aps.c0000444000000000000000000007347007102607431007400 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include #include #include #include #include #include #include // ------- local includes #include #include #include #include #include #include #define DIST_COMMENT "\n\ \n\ Copyright (C) 1999 Christian Schulte (dg1nsw@saturn2.franken.de)\n\ \n\ This program is free software; you can redistribute it and/or modify\n\ it under the terms of the GNU General Public License as published by\n\ the Free Software Foundation.\n\ \n" #define COPYLEFT "\n\ This program is distributed in the hope that it will be useful,\n\ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ See the GNU General Public License for more details.\n\ You should have received a copy of the GNU General Public License\n\ along with this program; if not, write to the Free Software\n\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\ \n\ For a recent version of this code...\n\ Have a look at: \"http://www.swrtec.de\"\n\ \n\ >As this is still under development, help, bug-reports and encouragement\n\ >to the mentioned addresses is allways welcome :->\n\n" #define HELP "\n\ aps [options][-p ][-o ]\n\ options: -d display rest-output in \n\ (1)HEX (2)ASCII (3)BOTH (4)NONE\n\ (5)PROTECTED-ASCII (6)MODE-5 with HEX\n\ (7)ONLY rest in HEX (8)only rest in PROTECTED-ASCII\n\ (9)ONLY rest in PROTECTED-ASCII with HEX\n\ (10)RAW-HEX-DUMP (without interpretation and filters!!)\n\ -c do NOT use colorization (ANSI-CODES)\n\ -b activate beep for some protocolls (see manpage)\n\ -q do not say hello and bye nor print the copyleft\n\ -Q do not say anything (using X-GUI instead ?)\n\ -s do not display summary statistics info \n\ -n do not print info of IP-Header\n\ -i display only this IP-ADDR (192.168.17.4) \n\ -I do not display this IP-ADDR (192.168.17.4) \n\ -h display only this HW-ADDR (de:ad:be:ef:00:00) \n\ -H do not display this HW-ADDR (de:ad:be:ef:00:00) \n\ -p display only these ports (23-80) or (23-23) \n\ -P do not display this port (23-80) or (23-23) \n\ -o display only one frame type \n\ (can be combined: (\"-o arp -o tcp-udp\")\n\ -h print this HELP (or --help)\n\ -v print Version and COPYLEFT\n\ \n\ valid frame-types are: \n\ smb,loop,arp,rarp,all-ip,tcp-ip,udp-ip,icmp-ip,other \n\ \n\n" int sockt; unsigned int n_byte,nmbr; unsigned char buf[10002]={128}; // 10Kbyte Buffer unsigned int G_OPTS=0; //Global options: Bit1=QUIET-MODE unsigned int IPF_MASK=0xff; //frame type filter for ICMP,UDP,TCP ... (bits are set if visible) unsigned int FRAMEXMASK=0xff; //frame type filter for ARP,RARP,IP ... (bits are set if visible) unsigned int PRINT_MODE=0x01; //Only-HEX=0x01, Only-ASCII=0x02 and 0x03 is both unsigned int MASK_MODE=0; //For mask out of IP or HW addresses ! unsigned int MASK_PORT_F=0,MASK_PORT_T=0; //For PORT-Filter unsigned char COLORS=TRUE; // use ansi-colors ?? unsigned char BEEPING=FALSE; // we don't cry before anyone tells us so ! unsigned char PRINT_STATS=TRUE; char PRINT_IP_HEADER=TRUE; //print it or not ... this is the question unsigned int NUM_COLUMNS=80; // this is the default i think ?:-> unsigned char pnn[PORTLIST_MAX_PNUM+2][27]; // one more may be sure ! :-> unsigned char cfn[100]={0}; // capture file name unsigned char HW[6]={0,0,0,0,0,0}; // for masking out unsigned long int HWA[2],IPA,hwa[2],ipa; unsigned long int RX_PACKET_COUNT; unsigned int shmid=-1; // shared memory id and IPC-Key key_t ipck; struct in_addr { unsigned long int s_addr; }c_ipa; // for converting dot-ip-addresses to binary ips s_aps_cntr *p_cnt; // struct for counting the packets of each type ... // ***************** void termh(int signum); void print_head (unsigned char); // 0 for only count up n_byte 1 for full functionality void print_tail (void); void open_socket (int *fd); void clean_exit(int ret); void eth_loop(void); void smb(void); int ip(void); int arp(char tp); int ipx(); int other(int X); int hw_filter (); void sz_if_FF (unsigned int *ZVAR); int main (int argc, char *argv[]); // ***************** void termh(int signum) { unsigned int p_all_icmp=0,p_all_ip=0,other=0,arp_rarp=0; close(sockt); kill_pif(); if (G_OPTS&0x01) clean_exit(0); // Just go away ... if (COLORS) RED; printf("\n APS: terminating after %i packets. (%i)\n\n",RX_PACKET_COUNT,signum); if (COLORS) NORMAL; if (PRINT_STATS==TRUE) { p_all_icmp+=p_cnt->icmp_ip_echo_req; p_all_icmp+=p_cnt->icmp_ip_echo_rep;// p_all_icmp+=p_cnt->icmp_ip_unre_net; p_all_icmp+=p_cnt->icmp_ip_unre_host; p_all_icmp+=p_cnt->icmp_ip_unre_proto; p_all_icmp+=p_cnt->icmp_ip_unre_port; p_all_icmp+=p_cnt->icmp_ip_unre_frag_need; p_all_icmp+=p_cnt->icmp_ip_unre_src_route; p_all_icmp+=p_cnt->icmp_ip_unre_unknown;// p_all_icmp+=p_cnt->icmp_ip_source_quench;// p_all_icmp+=p_cnt->icmp_ip_redir_tonet; p_all_icmp+=p_cnt->icmp_ip_redir_tohost; p_all_icmp+=p_cnt->icmp_ip_redir_tos_net; p_all_icmp+=p_cnt->icmp_ip_redir_tos_host; p_all_icmp+=p_cnt->icmp_ip_redir_unknown;// p_all_icmp+=p_cnt->icmp_ip_exc_time_limit; p_all_icmp+=p_cnt->icmp_ip_dtgr_param_prob; p_all_icmp+=p_cnt->icmp_ip_time_req; p_all_icmp+=p_cnt->icmp_ip_time_rep; p_all_icmp+=p_cnt->icmp_ip_info_req; p_all_icmp+=p_cnt->icmp_ip_info_rep; p_all_icmp+=p_cnt->icmp_ip_addr_mask_req; p_all_icmp+=p_cnt->icmp_ip_addr_mask_rep; p_all_icmp+=p_cnt->icmp_ip_unknown;// p_all_ip+=p_cnt->udp_ip; p_all_ip+=p_cnt->tcp_ip; p_all_ip+=p_all_icmp;// arp_rarp+=p_cnt->arp_req; arp_rarp+=p_cnt->arp_rep; arp_rarp+=p_cnt->rarp_req; arp_rarp+=p_cnt->rarp_rep;// other+=p_cnt->smb; other+=p_cnt->loop; other+=p_cnt->unknown; if (COLORS) {REV;BOLD;} printf ("Package summary: \n"); if (COLORS) {NORMAL;BLUE;} printf ("--> IP :%.6d ## TCP-IP:%.6d UDP-IP:%.6d ICMP-IP:%.6d\n\n",p_all_ip,p_cnt->tcp_ip,p_cnt->udp_ip,p_all_icmp); if (COLORS) {NORMAL;BOLD;} printf ("--> RSLV:%.6d ## ARP-REQ:%.6d RARP-REQ:%.6d\n",arp_rarp,p_cnt->arp_req,p_cnt->rarp_req); printf (" ## ARP-REP:%.6d RARP-REP:%.6d\n\n",p_cnt->arp_rep,p_cnt->rarp_rep); if (COLORS) {NORMAL;GREEN;} printf ("--> ICMP:%.6d ## ECHO-REQ:%.6d TIME-REQ:%.6d INFO-REQ:%.6d\n",p_all_icmp,p_cnt->icmp_ip_echo_req,p_cnt->icmp_ip_time_req,p_cnt->icmp_ip_info_req); printf (" ## ECHO-REP:%.6d TIME-REP:%.6d INFO-REP:%.6d\n",p_cnt->icmp_ip_echo_rep,p_cnt->icmp_ip_time_rep,p_cnt->icmp_ip_info_rep); printf (" ## ADDR-MASK-REQ:%.6d ADDR-MASK-REP:%.6d\n",p_cnt->icmp_ip_addr_mask_req,p_cnt->icmp_ip_addr_mask_rep); if (COLORS) {NORMAL; RED;} printf (" unreachable # HOST:%.6d NETW:%.6d PROT:%.6d PORT:%.6d\n", p_cnt->icmp_ip_unre_host,p_cnt->icmp_ip_unre_net,p_cnt->icmp_ip_unre_proto,p_cnt->icmp_ip_unre_port); printf (" unreachable # FRAGM-NEEDED:%.6d SRC-ROUTE:%.6d UNKNOWN:%.6d\n", p_cnt->icmp_ip_unre_frag_need,p_cnt->icmp_ip_unre_src_route,p_cnt->icmp_ip_unre_unknown); if (COLORS) {NORMAL;MAGENTA;} printf (" redirect # TO-NET :%.6d TO-HOST :%.6d\n",p_cnt->icmp_ip_redir_tonet,p_cnt->icmp_ip_redir_tohost); printf (" redirect # TOS-NET:%.6d TOS-HOST:%.6d REDIR-UNKNOWN:%.6d\n",p_cnt->icmp_ip_redir_tos_net,p_cnt->icmp_ip_redir_tos_host,p_cnt->icmp_ip_redir_unknown); printf (" other # EXCEEDED-TIME-LIMIT:%.6d PARAMETER-PROBLEM:%.6d\n", p_cnt->icmp_ip_dtgr_param_prob,p_cnt->icmp_ip_dtgr_param_prob); printf (" # OVERALL-ICMP-UNKNOWN:%.6d\n\n",p_cnt->icmp_ip_unknown); if (COLORS) {NORMAL;CYAN;} printf ("--> OTHER:%.6d ## LOOP:%.6d SMB:%.6d UNKNOWN-FRAMES:%.6d\n\n",other,p_cnt->loop,p_cnt->smb,p_cnt->unknown); if (COLORS) NORMAL; } clean_exit(0); } void init (void) // do some initialization { char cbufs[200],cbufn[200],ipc_str[30]; register unsigned int cnt,dmy; char *ncp,un[10]="unknown",fname[150]; uid_t euid; int pnum,n; FILE *F_p; euid=getuid(); if (euid!=0) { if (COLORS) RED; printf ("YOU ARE NOT ROOT !!! \n"); if (COLORS) NORMAL; exit(2); } signal(SIGKILL,termh); // kill -9 signal(SIGQUIT,termh); // signal 3 signal(SIGINT,termh); // control+C signal(SIGHUP,termh); // hangup CLEANS; // better make it clean here than later and wipe away some messages ... un[8]=0; for (cnt=0;cnt=25) { if (COLORS) RED; printf ("Format error !! Entry %s is too long !!\n",cbufn); if (COLORS) NORMAL; clean_exit(1);} } else while ( (dmy!=0x0a) && (dmy!=EOF) ) dmy=fgetc(F_p); } if (cnt!=0) cbufs[cnt-1]=0; sscanf(cbufn,"%d",&pnum); if (pnumicmp_ip_echo_req=0; if ( (create_new_pif(shmid)) == -1 ) { printf ("WARNING: Could not create %s ... no X-GUI available for this process !\n",fname); } // tell them where whe are (shmid and pid) } else { printf ("Could not allocate SHMEM-SEGMENT ... no X-GUI available for this process \n"); if ( (int) (p_cnt=malloc(STRCTSZE_CNTR)) == -1) // allocate memory of size STRCTSZE_CNT=size of struct p_cnt { perror ("malloc:"); exit (1); } memset(p_cnt,0,STRCTSZE_CNTR); // set it all to 0 } printf ("\n"); } void print_head (unsigned char func) { if (func>0) { printf("HW-ADDR: %.2x:%.2x:%.2x:%.2x:%.2x:%.2x -----> %.2x:%.2x:%.2x:%.2x:%.2x:%.2x \n", buf[6],buf[7],buf[8],buf[9],buf[10],buf[11], buf[0],buf[1],buf[2],buf[3],buf[4],buf[5]); } n_byte+=14; // The Mac-Header (+12) and the protocol ID (+2) ... } void print_tail (void) { unsigned int br,bs; if (G_OPTS&0x02) return; if (!(PRINT_MODE&0x10)) printf("Bytes until here: 0x%0.4x Bytes over all: 0x%0.4x \n",n_byte,nmbr); if (PRINT_MODE&0x08) { printf("\n"); return; } if (PRINT_MODE&0x01) // HEX { for (br=n_byte;br31) printf("%c",buf[bs]); else printf (" "); bs--; br=bs; } if (PRINT_MODE&0x40) for (br=n_byte;br31) && (buf[bs]<150) ) printf("%c",buf[bs]); else if (buf[bs]>160) printf("%c",buf[bs]); else printf (" %.2x",buf[bs]); bs--; br=bs; } if (COLORS) NORMAL; printf("\n\n"); // The next one please ? } void open_socket (int *fd) { // *fd=socket(PF_INET,SOCK_PACKET,htons(ETH_P_ALL)); /* I include here the call PF_PACKET and SOCK_RAW in my Linux SuSE 6.3 kernel 2.22. The SOCK_PACKET call is deprecated, and widely non-portable, see 'man packet'... But we need the Libpcap support! */ *fd=socket(PF_PACKET,SOCK_RAW,htons(ETH_P_ALL)); if (*fd<0) { perror ("opening socket"); abort(); } } void clean_exit(int ret) { // should we do something more ?? if (COLORS) NORMAL; shmctl(shmid,IPC_RMID,0); // mark segment for deletion ... shmdt(p_cnt); // detach the SHMEM-segment if (!(G_OPTS&0x01)) printf (" Detached SHMEM-Segment (ID=%d)\n",shmid); kill_pif(); close (sockt); exit(ret); } void eth_loop(void) { if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) { print_head(1); printf("Loopback\n"); } print_tail; p_cnt->loop++; // for the statistics } void smb(void) { if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) { print_head(1); printf("SAMBA/NetBios\n"); } print_tail(); p_cnt->smb++; // for the statistics } int ip(void) { char *proto_str; char proto_s[50]; int TOS=0,sp,dp; // Type Of Service, source-port, dest-port proto_str=(char*) &proto_s; if (MASK_MODE&0x04) // "i" only { ipa=(buf[26])+(buf[27]<<8)+(buf[28]<<16)+(buf[29]<<24); // As a number if (ipa!=IPA) { ipa=(buf[30])+(buf[31]<<8)+(buf[32]<<16)+(buf[33]<<24); // As a number if (ipa!=IPA) return -1; } } if (MASK_MODE&0x08) // "i" not { // "I" not ipa=(buf[26])+(buf[27]<<8)+(buf[28]<<16)+(buf[29]<<24); // As a number if (ipa==IPA) return -1; ipa=(buf[30])+(buf[31]<<8)+(buf[32]<<16)+(buf[33]<<24); // As a number if (ipa==IPA) return -1; } TOS=buf[n_byte+23]; // n_byte should be 14 but then the header would have been already printed! // So at this point n_byte is 0 because we cant decide if we should print info or not // before we dont know anything about the packet !! :-> if (PRINT_MODE&0x80) { print_head(0); goto cut_ip_header; } // print_head(0) for the MAC-Header if (MASK_MODE&0x10) // print port only { if ( (TOS==IP_TCP) || (TOS==IP_UDP) ) { sp=(buf[n_byte+34]<<8)+buf[n_byte+35]; dp=(buf[n_byte+36]<<8)+buf[n_byte+37]; if ( ((spMASK_PORT_T)) && ((dpMASK_PORT_T)) ) return -1; // if both are not in scope ... throw away } } if (MASK_MODE&0x20) // print port not { if ( (TOS==IP_TCP) || (TOS==IP_UDP) ) { sp=(buf[n_byte+34]<<8)+buf[n_byte+35]; if ((sp>=MASK_PORT_F)&&(sp<=MASK_PORT_T)) return -1; // if the first is in scope ... throw away dp=(buf[n_byte+36]<<8)+buf[n_byte+37]; if ((dp>=MASK_PORT_F)&&(dp<=MASK_PORT_T)) return -1; // if the second is in scope ... throw away } } switch(TOS) // Yah i know this is real dumb programming :-> { case(IP_ICMP): if (!(IPF_MASK&0x02)) return(-1); proto_str="ICMP";break; case(IP_TCP): if (!(IPF_MASK&0x01)) return(-1); proto_str="TCP";break; case(IP_UDP): if (!(IPF_MASK&0x04)) return(-1); proto_str="UDP";break; case(IP_IGMP): proto_str="IGMP";break; case(IP_GGP): proto_str="GGP";break; case(IP_ST): proto_str="ST";break; case(IP_UCL): proto_str="UCL";break; case(IP_EGP): proto_str="EGP";break; case(IP_IGP): proto_str="IGP";break; case(IP_BBN_RCC_MON): proto_str="BBN_RCC_MON";break; case(IP_NVP_II): proto_str="NVP_II";break; case(IP_PUP): proto_str="PUP";break; case(IP_ARGUS): proto_str="ARGUS";break; case(IP_EMCON): proto_str="EMCON";break; case(IP_XNET): proto_str="XNET";break; case(IP_CHAOS): proto_str="CHAOS";break; case(IP_MUX): proto_str="MUX";break; case(IP_DCN_MEAS): proto_str="DCN_MEAS";break; case(IP_HMP): proto_str="HMP";break; case(IP_PRM): proto_str="PRM";break; case(IP_XNS_IDP): proto_str="XNS_IDP";break; case(IP_TRUNK1): proto_str="TRUNK1";break; case(IP_TRUNK2): proto_str="TRUNK2";break; case(IP_LEAF1): proto_str="LEAF1";break; case(IP_LEAF2): proto_str="LEAF2";break; case(IP_RDP): proto_str="RDP";break; case(IP_IRTP): proto_str="IRTP";break; case(IP_ISO_TP4): proto_str="ISO_TP4";break; case(IP_NETBLT): proto_str="NETBLT";break; case(IP_MFE_NSP): proto_str="MFE_NSP";break; case(IP_MERIT_INP): proto_str="INP";break; case(IP_SEP): proto_str="SEP";break; case(IP_3PC): proto_str="3PC";break; case(IP_CFTP): proto_str="CFTP";break; case(SAT_EXPAK): proto_str="EXPAK";break; case(IP_RVD): proto_str="RVD";break; case(IP_IPPC): proto_str="IPPC";break; case(IP_SAT_MON): proto_str="SAT_MON";break; case(IP_VISA): proto_str="VISA";break; case(IP_IPCV): proto_str="IPCV";break; case(IP_BR_SAT_MON): proto_str="BR_SAT_MON";break; case(IP_SUN_ND): proto_str="SUN_ND";break; case(IP_WB_MON): proto_str="WB_MON";break; case(IP_WB_EXPAK): proto_str="WB_EXPAK";break; case(IP_ISO_IP): proto_str="ISO_IP";break; case(IP_VMTP): proto_str="VMTP";break; case(IP_SECURE_VMTP): proto_str="SECURE_VMTP";break; case(IP_VINES): proto_str="VINES";break; case(IP_TTP): proto_str="TTP";break; case(NSFNET_IGP): proto_str="IGP";break; case(IP_DGP): proto_str="DGP";break; case(IP_TCF): proto_str="TCF";break; case(IP_IGRP): proto_str="IGRP";break; case(IP_OSPFIGP): proto_str="OSPFIGP";break; case(IP_SPRITE_RPG): proto_str="SPRITE_RPG";break; case(IP_LARP): proto_str="LARP";break; default:proto_str="unknown";break; } if (PRINT_IP_HEADER==FALSE) { print_head(0); goto cut_ip_header; } // I think this is the fastest way print_head(1); printf("IP-ADDR: %d.%d.%d.%d -----> %d.%d.%d.%d\n", buf[n_byte+12],buf[n_byte+13],buf[n_byte+14],buf[n_byte+15], buf[n_byte+16],buf[n_byte+17],buf[n_byte+18],buf[n_byte+19]); printf("IP-Ver%d || Head:0x%0.2x (bytes) || Service(TOS):%d || ", buf[n_byte]>>4,(buf[n_byte]&0xf)<<2,buf[n_byte+1]); printf("Length over all:%0.4d\n",((buf[n_byte+2]<<8)+buf[n_byte+3])); printf("Fragmentation: ID:0x%0.4x - ",((buf[n_byte+4]<<8)+buf[n_byte+5])); printf("Flags: %d %d %d - ",(buf[n_byte+6]&0x80)>>7,(buf[n_byte+6]&0x40)>>6,(buf[n_byte+6]&0x20)>>5); printf("Offset:%0.5d\n",((buf[n_byte+6]&0x1f)<<8)+buf[n_byte+7]); printf("TTL:%0.3d || Protokoll:%0.3d (%s) || HeaderCRC:0x%0.4x\n", buf[n_byte+8],buf[n_byte+9],proto_str,(buf[n_byte+10]<<8)+buf[n_byte+11]); cut_ip_header: n_byte+=20; // Here we are ... if (TOS==IP_ICMP) icmp_info(); // print out ICMP-INFO if (TOS==IP_UDP) if(PRINT_MODE&0x80) n_byte+=8; else udp_info(); if (TOS==IP_TCP) if(PRINT_MODE&0x80) n_byte+=20; else tcp_info(); // get the TCP-Header splitted of ... print_tail(); return(1); } int arp(char tp) { if (MASK_MODE&0x04) // "i" only { ipa=(buf[28])+(buf[29]<<8)+(buf[30]<<16)+(buf[31]<<24); // As a number if (ipa!=IPA) { ipa=(buf[31])+(buf[32]<<8)+(buf[33]<<16)+(buf[34]<<24); // As a number if (ipa!=IPA) return -1; } } if (MASK_MODE&0x08) // "I" not { ipa=(buf[28])+(buf[29]<<8)+(buf[30]<<16)+(buf[31]<<24); // As a number if (ipa==IPA) return -1; ipa=(buf[31])+(buf[32]<<8)+(buf[33]<<16)+(buf[34]<<24); // As a number if (ipa==IPA) return -1; } if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) print_head(1); if (tp==0) { if (COLORS) {YELLOW;BOLD;} if (!(G_OPTS&0x02)) printf("ARP: IP->Ethernet \n"); if ((buf[20]==0)&(buf[21]==1)) { p_cnt->arp_req++; if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) printf("Request"); } if ((buf[20]==0)&(buf[21]==2)) { p_cnt->arp_rep++; if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) printf("Answer "); } if (COLORS) NORMAL; } else { if ( (COLORS) && (!(G_OPTS&0x02)) ) {YELLOW;BOLD;} if (!(G_OPTS&0x02)) printf("RARP: Ethernet->IP \n"); if ((buf[20]==0)&(buf[21]==1)) { p_cnt->rarp_req++; if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) printf("Request"); } if ((buf[20]==0)&(buf[21]==2)) { p_cnt->rarp_rep++; if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) printf("Answer "); } if (COLORS) NORMAL; } if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) { if (COLORS) {YELLOW;BOLD;} printf( " from %-3d.%-3d.%-3d.%-3d (HW:%0.2x:%0.2x:%0.2x:%0.2x:%0.2x:%0.2x) \n", buf[28],buf[29],buf[30],buf[31],buf[22],buf[23],buf[24],buf[25],buf[26],buf[27]); printf("Goes to %-3d.%-3d.%-3d.%-3d (HW:%0.2x:%0.2x:%0.2x:%0.2x:%0.2x:%0.2x) \n", buf[38],buf[39],buf[40],buf[41],buf[32],buf[33],buf[34],buf[35],buf[36],buf[37]); if (COLORS) NORMAL; n_byte+=28; // 28 weitere Bytes ... // bis hier wurde das Packet ausgewertet .. der Rest wird hex-gedumpt B->> } print_tail(); return(1); } int ipx() { if (!(PRINT_MODE&0x80)) { print_head(1); printf("IPX-Packet? -- sorry no further information ... :-<\n"); } print_tail(); p_cnt->ipx++; return(1); } int other(int X) { if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) { print_head(1); if (COLORS) RED; printf("Unknown Frame type 0x%.4x :-<\n",X); if (COLORS) NORMAL; } print_tail(); p_cnt->unknown++; return(1); } int hw_filter () { if (MASK_MODE&0x01) // "h" only { hwa[0]=(buf[6])+(buf[7]<<8)+(buf[8]<<16)+(buf[9]<<24); hwa[1]=(buf[10])+(buf[11]<<8); if (hwa[0]!=HWA[0]||hwa[1]!=HWA[1]) { hwa[0]=(buf[0])+(buf[1]<<8)+(buf[2]<<16)+(buf[3]<<24); hwa[1]=(buf[4])+(buf[5]<8); if (hwa[0]!=HWA[0]||hwa[1]!=HWA[1]) return (1); // invalid } } if (MASK_MODE&0x02) // "h" not { hwa[0]=(buf[6])+(buf[7]<<8)+(buf[8]<<16)+(buf[9]<<24); hwa[1]=(buf[10])+(buf[11]<<8); if ((hwa[0]==HWA[0])&&(hwa[1]==HWA[1])) return (1); // invalid hwa[0]=(buf[0])+(buf[1]<<8)+(buf[2]<<16)+(buf[3]<<24); hwa[1]=(buf[4])+(buf[5]<<8); if ((hwa[0]==HWA[0])&&(hwa[1]==HWA[1])) return (1); // invalid } // They cant be set both !!! return(0); } void sz_if_FF (unsigned int *ZVAR) { if (*ZVAR==0xff) *ZVAR=0; printf (" ---> %x \n",*ZVAR); } // *********************** HERE COMES THE MAIN *********************** int main (int argc, char *argv[]) { unsigned int X; int optc; char arg_str[20],c; extern char *optarg; init(); if (argc!=1) { printf ("\n\n"); while ((optc=getopt(argc,argv,"f:o:i:I:h:H:p:P:d:vnsqQbc"))!=EOF) switch (optc) { case'b':BEEPING=TRUE;break; // okay he wants us to shout out :-> case'c':COLORS=FALSE;break; // okay so we do not print ansi-colors case'q':G_OPTS|=0x01; break; // set QUIET-MODE (just the data ... no greetings) case'Q':G_OPTS|=0x03; // set both bits (be VERY QUIET !!) PRINT_IP_HEADER=FALSE; PRINT_MODE=0x08; printf (" Running in VERY-QUIET-MODE !\n"); break; case'f':strcpy(cfn,optarg);break; // read in the filename for the capture FILE !! case'p': case'P':if(sscanf(optarg,"%d-%d",&MASK_PORT_F,&MASK_PORT_T) == 1) MASK_PORT_T=MASK_PORT_F; if (MASK_PORT_F>MASK_PORT_T) { X=MASK_PORT_F; MASK_PORT_F=MASK_PORT_T; MASK_PORT_T=X; } // order the vars if (FRAMEXMASK!=0xff) printf (" WARNING: allready filtering a protocoll\n (mayby there are no ports left to filter ie. for ICMP-IP)\n\n"); if (optc=='p') { MASK_MODE|=0x10; FRAMEXMASK|=0x04; printf(" Only printing PORT %d - %d\n\n",MASK_PORT_F,MASK_PORT_T); } // display PORT only ! if (optc=='P') { MASK_MODE|=0x20; FRAMEXMASK|=0x04; printf(" Not printing PORT %d - %d\n\n",MASK_PORT_F,MASK_PORT_T); } // display PORT not ! break; case'h': case'H':arg_str[2]=0; for (X=0;X<6;X++) { if (X<5) if (optarg[2+X*3]!=*":") { printf (" Wrong number format !! \n %s",HELP); abort(); } arg_str[0]=optarg[0+X*3]; arg_str[1]=optarg[1+X*3]; sscanf(arg_str,"%x",&HW[X]); } HWA[0]=(HW[0])+(HW[1]<<8)+(HW[2]<<16)+(HW[3]<<24); // As a number HWA[1]=(HW[4])+(HW[5]<<8); if (optc=='h') { MASK_MODE|=0x01; printf(" Only printing HWA %s\n\n",optarg); } // display HWA only ! if (optc=='H') { MASK_MODE|=0x02; printf(" Not printing HWA %s\n\n",optarg); } // display HWA not ! break; case'i': case'I':if (optc=='i') { MASK_MODE|=0x04; printf (" Only printing %s \n\n",optarg); } // display IP only ! if (optc=='I') { MASK_MODE|=0x08; printf (" Not printing %s \n\n",optarg); } // display IP not ! inet_aton(optarg,&c_ipa); IPA=c_ipa.s_addr; break; case'd':arg_str[0]=optarg[0]; arg_str[1]=0; PRINT_MODE=atoi(optarg); switch(PRINT_MODE) { case(1):printf(" Printing rest-output in HEX(default) \n\n");PRINT_MODE=0x01;break; case(2):printf(" Printing rest-output in ASCII \n\n");PRINT_MODE=0x02;break; case(3):printf(" Printing rest-output in HEX and ASCII \n\n");PRINT_MODE=0x04;break; case(4):printf(" Printing no rest-output \n\n");PRINT_MODE=0x08;break; case(5):printf(" Printing rest-output in FILTERED ASCII \n\n");PRINT_MODE=0x20;break; case(6):printf(" Printing rest-output in FILTERED ASCII with HEX \n\n");PRINT_MODE=0x40;break; case(7):printf(" Printing ONLY rest-output in HEX \n\n");PRINT_MODE=0x81;break; case(8):printf(" Printing ONLY rest-output in FILTERED ASCII \n\n");PRINT_MODE=0xa0;break; case(9):printf(" Printing ONLY rest-output in FILTERED ASCII with HEX \n\n");PRINT_MODE=0xc0;break; case(10):printf(" Printing raw dump in HEX\n\n");PRINT_MODE=0x11;break; default:printf(" Invalid Number for output format! \n\n%s",HELP); clean_exit(1); } break; case'o': X=0; if (FRAMEXMASK==0xff) FRAMEXMASK=0; strcpy(arg_str,optarg); if(strncmp(arg_str,"smb",3)==0) { X=1; FRAMEXMASK|=0x01; printf (" Only printing smb frames ... \n\n"); } if(strncmp(arg_str,"loop",4)==0) { X=1; FRAMEXMASK|=0x02; printf (" Only printing loop frames ... \n\n"); } if(strncmp(arg_str,"arp",3)==0) { X=1; FRAMEXMASK|=0x08; printf (" Only printing arp frames ... \n\n"); } if(strncmp(arg_str,"rarp",4)==0) { X=1; FRAMEXMASK|=0x10; printf (" Only printing rarp frames ... \n\n"); } if(strncmp(arg_str,"ipx",3)==0) { X=1; FRAMEXMASK|=0x20; printf (" Only printing ipx frames ... \n\n"); } if(strncmp(arg_str,"other",5)==0) { X=1; FRAMEXMASK|=0x40; printf (" Only printing unknown frames ...\n\n");} if(strncmp(arg_str,"all-ip",6)==0) { X=1; sz_if_FF(&IPF_MASK); IPF_MASK|=0x07; FRAMEXMASK|=0x04; printf (" Only printing IP frames ...\n\n");} if(strncmp(arg_str,"tcp-ip",6)==0) { X=1; sz_if_FF(&IPF_MASK); IPF_MASK|=0x01; FRAMEXMASK|=0x04; printf (" Only printing TCP-IP frames ...\n\n");} if(strncmp(arg_str,"icmp-ip",7)==0){ X=1; sz_if_FF(&IPF_MASK); IPF_MASK|=0x02; FRAMEXMASK|=0x04; printf (" Only printing ICMP-IP frames ...\n\n");} if(strncmp(arg_str,"udp-ip",6)==0) { X=1; sz_if_FF(&IPF_MASK); IPF_MASK|=0x04; FRAMEXMASK|=0x04; printf (" Only printing UDP-IP frames ...\n\n");} if(X==0) { printf("%s\n%s: %s\n",HELP,"Unknown frame-type",arg_str); abort(); } break; case'v': BOLD;printf ("%s",COPYLEFT); if (COLORS) NORMAL; clean_exit(0); break; case'n': PRINT_IP_HEADER=FALSE; printf (" Ok cutting of IP Header information... \n\n"); break; case's': PRINT_STATS=FALSE;break; case'?': printf ("%s\n%s",COPYLEFT,HELP);clean_exit(0);break; default: printf ("%s\n%s: %c\n",HELP,"Unknown argument character",optc); abort(); break; } } if (!(G_OPTS&0x01)) // If not quiet say hello to everybody { if (COLORS) {BGBLUE;} printf("\n\nAdvancedPacketSniffer V%s (CONFIG-DATE:%s)",VERSION,BUILD_DATE); // this is the VERSION from autoconf in "config.h" printf("%s",DIST_COMMENT); if (COLORS) NORMAL; } open_socket(&sockt); if (PRINT_MODE&0x10) for(;;) { nmbr=recv(sockt,buf,10000,0); RX_PACKET_COUNT++; n_byte=0; print_tail(); } for(;;) { forget: // forget this package nmbr=recv(sockt,buf,10000,0); RX_PACKET_COUNT++; if (MASK_MODE&0x03) { if (hw_filter()!=0) goto forget; } X=buf[12]*256+buf[13]; // this is really messy at this point !! who created the hardware layer ?? eh!? n_byte=0; switch(X) { case(0x0025):if (FRAMEXMASK&0x01) smb();break; case(0x0060):if (FRAMEXMASK&0x02) eth_loop();break; case(0x0800):if (FRAMEXMASK&0x04) { if (ip()==-1) goto forget; }break; case(0x0806):if (FRAMEXMASK&0x08) { if (arp(0)==-1) goto forget; }break; case(0x8035):if (FRAMEXMASK&0x10) { if (arp(1)==-1) goto forget; }break; case(0x8137):if (FRAMEXMASK&0x20) ipx();break; default:if (FRAMEXMASK&0x40) other(X); break; } } } aps-0.15/src/tcp.c0000444000000000000000000000563307076314061007403 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include #include // here the tcp part is printed ... const char FLAGS_SET[6][4]={"FIN","SYN","RST","PSH","ACK","URG"}; const char FLAGS_CLRD[6][4]={"fin","syn","rst","psh","ack","urg"}; extern unsigned int PRINT_MODE,G_OPTS; extern unsigned char COLORS,BEEPING; // ******************* void tcp_info(void); void pnum_pname(unsigned int p1,unsigned int p2,char *s); // ******************* extern unsigned char buf[10002]; extern unsigned int n_byte; extern s_aps_cntr *p_cnt; void tcp_info(void); void tcp_info(void) { unsigned int s_port=0,d_port=0; char pname[50],flags,c; if (COLORS) GREEN; s_port=(buf[n_byte+0]<<8)+buf[n_byte+1]; d_port=(buf[n_byte+2]<<8)+buf[n_byte+3]; pnum_pname(s_port,d_port,(char *) &pname); if(BEEPING) { if (d_port == 23 || s_port == 23) // Telnet BEEP; if (d_port == 22 || s_port == 22) // SSH BEEP; if (d_port == 21 || s_port == 21) // FTP BEEP; if (d_port == 80 || s_port == 80) // WEB BEEP; if (d_port == 3128 || s_port == 3128) // Squid cache BEEP; if (d_port == 119 || s_port == 119) // NNTP BEEP; } if (!(G_OPTS&0x02)) // Talk to them if not VERY-QUIET-MODE !! { if (COLORS) BOLD; printf ("TCP-HEADER:\nPorts: %0.4d-->%0.4d (%s) ",s_port,d_port,pname); printf ("Seq./Ack. Nr.:0x%0.8x / 0x%0.8x\n", ((buf[n_byte+4]<<24)+(buf[n_byte+5]<<16)+(buf[n_byte+6]<<8)+buf[n_byte+7]), ((buf[n_byte+8]<<24)+(buf[n_byte+9]<<16)+(buf[n_byte+10]<<8)+buf[n_byte+11])); printf ("Data-Offset:0x%0.2x Reserved-6Bit:%0.2x Flags:", buf[n_byte+12]>>4,((buf[n_byte+12]&0xf)<<2)+(buf[n_byte+13]&0xc0)>>6); flags=buf[n_byte+13]; for (c=5;c>=0;c--) { if ((flags>>c)&0x01) printf ("-%s",FLAGS_SET[c]); else printf ("-%s",FLAGS_CLRD[c]); } printf ("-\n"); printf ("Window:0x%0.4x CRC:0x%0.4x ", ((buf[n_byte+14]<<8)+buf[n_byte+15]),((buf[n_byte+16]<<8)+buf[n_byte+17])); printf ("Urgent-Pointer:0x%0.4x\n",((buf[n_byte+18]<<8)+buf[n_byte+19])); if (COLORS) NORMAL; } n_byte+=20; // Now we are here ! p_cnt->tcp_ip++; } aps-0.15/src/udp.c0000444000000000000000000000313707075720453007407 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include extern unsigned char buf[]; extern unsigned int n_byte; extern void pnum_pname(unsigned int p1,unsigned int p2,char *s); extern s_aps_cntr *p_cnt; extern unsigned int G_OPTS; extern unsigned char COLORS; void udp_info(void); void udp_info(void) { char pname[50]; unsigned int send_port,recv_port,length,crc; send_port=(buf[n_byte]) +(buf[n_byte+1]<<8); // get 'em recv_port=(buf[n_byte+2])+(buf[n_byte+3]<<8); length =(buf[n_byte+4])+(buf[n_byte+5]<<8); crc =(buf[n_byte+6])+(buf[n_byte+7]<<8); pnum_pname(send_port,recv_port,(char *) &pname); if (!(G_OPTS&0x02)) { if (COLORS) CYAN; printf("PORT:%-5d->%-5d (%s) LENGTH: 0x%-4x CRC: 0x%-4x\n", send_port,recv_port,pname,length,crc); } p_cnt->udp_ip++; // for the statistics n_byte+=8; } aps-0.15/src/ports.c0000444000000000000000000000245407056216062007762 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include extern char pnn[PORTLIST_MAX_PNUM+2][27]; void pnum_pname(unsigned int p1,unsigned int p2,char *s) { if (p1 #include extern unsigned char buf[]; extern int n_byte; extern s_aps_cntr *p_cnt; extern unsigned int PRINT_MODE,G_OPTS; extern unsigned char COLORS; void get_icmp_redirect_code (char *s,char code); void get_icmp_unreachable_code (char *s,char code); void icmp_info (void); void get_icmp_redirect_code (char *s,char code) { switch(code) { case(0):strcpy(s,"redirect datagrams to NETWORK");p_cnt->icmp_ip_redir_tonet++;break; case(1):strcpy(s,"redirect datagrams to HOST");p_cnt->icmp_ip_redir_tohost++;break; case(2):strcpy(s,"redirect datagrams to TOS on NETWORK");p_cnt->icmp_ip_redir_tos_net++;break; case(3):strcpy(s,"redirect datagrams to TOS on HOST");p_cnt->icmp_ip_redir_tos_host++;break; default:sprintf(s,"unknown redirect:%d",code);p_cnt->icmp_ip_redir_unknown++;break; }} void get_icmp_unreachable_code (char *s,char code) { switch(code) { case(0):strcpy(s,"Network unreachable");p_cnt->icmp_ip_unre_net++; break; case(1):strcpy(s,"Host unreachable");p_cnt->icmp_ip_unre_host++; break; case(2):strcpy(s,"Protocol unreachable");p_cnt->icmp_ip_unre_proto++; break; case(3):strcpy(s,"Port unreachable");p_cnt->icmp_ip_unre_port++; break; case(4):strcpy(s,"Fragmentation needed but DF set");p_cnt->icmp_ip_unre_frag_need++; break; case(5):strcpy(s,"Source route failed");p_cnt->icmp_ip_unre_src_route++; break; default:sprintf(s,"ICMP-unreachable %d(unknown)",code);p_cnt->icmp_ip_unre_unknown++; break; }} void icmp_info (void) { // print the icmp packet... char code[50]; if ( (!(PRINT_MODE&0x80)) && (!(G_OPTS&0x02)) ) switch(buf[n_byte]) // switch out the type-field { case(0): if (COLORS) if (COLORS) BLUE; printf("%-30s CODE:0x%x CRC:0x%x SIG:0x%x NUM:0x%x\n", "echo reply",buf[n_byte+1],(buf[n_byte+2])+(buf[n_byte+3]<<8), (buf[n_byte+4])+(buf[n_byte+5]<<8),(buf[n_byte+6])+(buf[n_byte+7]<<8)); n_byte+=8; p_cnt->icmp_ip_echo_rep++; // for the statistics break; // echo reply case(3): if (COLORS) BLUE; get_icmp_unreachable_code((char *) &code,buf[n_byte+1]); printf("%-30s\n",code); n_byte+=2; break; case(4): if (COLORS) BLUE; printf("%-30s","source quench (slow down tx)\n"); n_byte+=1; p_cnt->icmp_ip_source_quench++; // for the statistics break; case(5): if (COLORS) BLUE; get_icmp_redirect_code ((char *) &code,buf[n_byte+1]); printf("%-30s %-30s","redirect (route change)\n",code); n_byte+=2; break; case(8): if (COLORS) BLUE; printf("%-30s CODE:0x%x CRC:0x%x SIG:0x%x NUM:0x%x\n", "echo request",buf[n_byte+1],(buf[n_byte+2])+(buf[n_byte+3]<<8), (buf[n_byte+4])+(buf[n_byte+5]<<8),(buf[n_byte+6])+(buf[n_byte+7]<<8)); n_byte+=8; p_cnt->icmp_ip_echo_req++; // for the statistics break; // echo request case(11):if (COLORS) BLUE; printf("%-30s","datagram exceeded timelimit\n"); n_byte+=1; p_cnt->icmp_ip_exc_time_limit++; // for the statistics break; case(12):if (COLORS) BLUE; printf("%-30s","datagram parameter problem\n"); n_byte+=1; p_cnt->icmp_ip_dtgr_param_prob++; // for the statistics break; case(13):if (COLORS) BLUE; printf("%-30s","time stamp request\n"); n_byte+=1; p_cnt->icmp_ip_time_req++; // for the statistics break; case(14):if (COLORS) BLUE; printf("%-30s","time stamp reply\n"); n_byte+=1; p_cnt->icmp_ip_time_rep++; // for the statistics break; case(15):if (COLORS) BLUE; printf("%-30s","information request\n"); n_byte+=1; p_cnt->icmp_ip_info_req++; // for the statistics break; case(16):if (COLORS) BLUE; printf("%-30s","information reply\n"); n_byte+=1; p_cnt->icmp_ip_info_rep++; // for the statistics break; case(17):if (COLORS) BLUE; printf("%-30s","address mask request\n"); n_byte+=1; p_cnt->icmp_ip_addr_mask_req++; // for the statistics break; case(18):if (COLORS) BLUE; printf("%-30s","address mask reply\n"); n_byte+=1; p_cnt->icmp_ip_addr_mask_rep++; // for the statistics break; default: if (COLORS) BLUE; printf("unknown type:%d\n",buf[n_byte]); n_byte++; p_cnt->icmp_ip_unknown++; // for the statistics break; } else switch(buf[n_byte]) // switch out the type-field { case(0): n_byte+=8; p_cnt->icmp_ip_echo_rep++; // for the statistics break; // echo reply case(3): n_byte+=2; get_icmp_unreachable_code((char *) &code,buf[n_byte+1]);// for the statistics break; case(4): n_byte++; p_cnt->icmp_ip_source_quench++; // for the statistics break; case(5): n_byte+=2; get_icmp_redirect_code ((char *) &code,buf[n_byte+1]); break; case(8): n_byte+=8; p_cnt->icmp_ip_echo_req++; // for the statistics break; // echo request case(11):n_byte++; p_cnt->icmp_ip_exc_time_limit++; // for the statistics break; case(12):n_byte++; p_cnt->icmp_ip_dtgr_param_prob++; // for the statistics break; case(13):n_byte++; p_cnt->icmp_ip_time_req++; // for the statistics break; case(14):n_byte++; p_cnt->icmp_ip_time_rep++; // for the statistics break; case(15):n_byte++; p_cnt->icmp_ip_info_req++; // for the statistics break; case(16):n_byte++; p_cnt->icmp_ip_info_rep++; // for the statistics break; case(17):n_byte++; p_cnt->icmp_ip_addr_mask_req++; // for the statistics break; case(18):n_byte++; p_cnt->icmp_ip_addr_mask_rep++; // for the statistics break; default: n_byte++; p_cnt->icmp_ip_unknown++; // for the statistics break; } // get_icmp_type((char *) &icmp_type,buf[n_byte]); // get the type-string // printf ("ICMP-TYPE: %-30s %s\n",icmp_type,code); } aps-0.15/src/pif.c0000644000000000000000000000702507102575672007401 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include #include unsigned int PIF_ID=-1; // ------- local includes #include #include int get_last_pif (void) // find out the next number available for an APS-process { int c,pid; FILE *F_pif; char fname[200]; for (c=0;c<100;c++) { sprintf (fname,"%s/aps_%.4d.pif",PIF_PATH,c); if ( (F_pif=fopen(fname,"r")) == NULL) { return(c); } // fname is allready existent ! ... okay else { fscanf(F_pif,"%u",&pid); getpgid(pid); if (errno==ESRCH) { printf("Stayled lock file (%s) found!!\n",fname); fclose(F_pif);F_pif=0; if (unlink(fname)==0) { printf ("deleted ...\n"); c--; } else perror("while deleting lockfile"); } } if (F_pif != NULL) fclose (F_pif); } return(101); } int create_new_pif (unsigned int shmid) { int c,pid; FILE *F_pif; char fname[200]; for (c=0;c<100;c++) { sprintf (fname,"%s/aps_%.4d.pif",PIF_PATH,c); if ( (F_pif=fopen(fname,"r")) == NULL) { if ( (F_pif=fopen(fname,"w")) == NULL) printf ("Can not create new PIF-File in %s \n",fname); else { printf ("Creating PIF-File (%s) with PID=%u and SHMID=%u\n",fname,getpid(),shmid); fprintf(F_pif,"%u %u",getpid(),shmid); PIF_ID=c; fclose(F_pif); return(0); } } // fname is allready existent ! ... okay else { fscanf(F_pif,"%u %u",&pid,&shmid); getpgid(pid); if (errno==ESRCH) { printf("Stayled lock file (%s) found!!\n",fname); fclose(F_pif);F_pif=0; if (unlink(fname)==0) { printf ("deleted ...\n"); c--; } else perror("while deleting lockfile"); } } if (F_pif != NULL) fclose (F_pif); } printf ("WARNING: Could not create %s ... no X-GUI available for this process !\n",fname); return(-1); } void kill_pif (void) { char fname[200]; FILE *F_pif; sprintf (fname,"%s/aps_%.4d.pif",PIF_PATH,PIF_ID); if ( (F_pif=fopen(fname,"r")) != NULL) { fclose(F_pif); if (unlink(fname) == -1 ) { printf ("%s:",fname); perror("while deleting PIF-File"); } // delete the PIF-File !! } } int get_shmid (void) { int c; char fname[200]; FILE *F_pif; unsigned int pid; unsigned int shmid; for (c=0;c<100;c++) { sprintf (fname,"%s/aps_%4.4d.pif",PIF_PATH,c); if ( (F_pif=fopen(fname,"r")) != NULL) { fscanf(F_pif,"%u %u",&pid,&shmid); printf ("GOT IT: PID=%u shmid=%u\n",pid,shmid); return(shmid); } else return(-1); } return(-1); } aps-0.15/src/xaps.c0000644000000000000000000003501607062771372007577 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include #include #include #include #include #include #include #include #include #include // SOME DEFINES AND DECLARATIONS NOW ----------------------------------------------------------------------------- const char LABEL_NAMES[NUM_CNTRS][30]={ "UDP-IP_ALL:", "TCP-IP_ALL:", "ECHO_REQESTS:", "ECHO_REPLIES:", "UNREACHABLE_NET:", "UNREACHABLE_HOST:", "UNREACHABLE_PROTO:", "UNREACHABLE_PORT:", "UN_FRAGM_NEEDED:", "UN_SOURCE_ROUTE:", "UNREACH_UNKOWN:", // 10 "SOURCE_QUENCH:", "REDIR_TO_HONET:", "REDIR_TO_HOST:", "REDIR_TO_TOS_NET:", "REDIR_TO_TOS_HOST:", "REDIR_UNKOWN:", "EXCEED_TIME_LIMIT:", "DGRAM_PARAM_PROBL:", "TIME_REQUEST:", "TIME_REPLY:", // 20 "INFO_REQUEST:", "INFO_REPLY:", "ADDR_MASK_REQ:", "ADDR_MASK_REPLY:", "ICMP-IP_UNKOWN:", "RARP_REQUEST:", "RARP_REPLY:", "ARP_REQUEST:", "ARP_REPLY:", "SAMBA/NETBIOS:", // 30 "LOOPBACK:", "IPX:", "COMPLETE_UNKOWN:"}; a_un_cntrs *a_cntrs; // have them all as a nice array ... GtkWidget *update_opt_menu,*update_menu,*update_item,*update_menu_label,*reset_all_button; GtkWidget *a_rclb[NUM_CNTRS][4]; // 0=reset-button 1=counter-entry 2=label 3=gtk-box containing the others GtkWidget *main_window; GtkWidget *main_table; // NOW SOME BOXES GtkWidget *main_box; signed int D_LEVEL=0; // debug_level=0 (is default) unsigned int shmid,pid; // where should we attach our data-field ?? unsigned int updates_p_sec=12; // ----------- some function declarations ... extern int get_shmid (void); void update_option_menu_select(GtkWidget *item, unsigned int sel_val); GtkWidget *make_menu_item( gchar *name,GtkSignalFunc callback, gpointer data); void sh_IO_ALRM (int num); void local_init(void); // ---------------------------------------- END OF GLOBAL VARS ... NOW SOME FUNCTIONS ----------------------------------- // This is borrowed from the GTK-Tutorial v1.2 void update_option_menu_select(GtkWidget *item, unsigned int sel_val) { if (D_LEVEL>0) printf ("set update speed to %d updates per second\n",sel_val); updates_p_sec=sel_val; } // This is borrowed from the GTK-Tutorial v1.2 GtkWidget *make_menu_item( gchar *name,GtkSignalFunc callback, gpointer data) { GtkWidget *item; item = gtk_menu_item_new_with_label (name); gtk_signal_connect (GTK_OBJECT (item), "activate", callback, data); gtk_widget_show (item); return(item); } // some reset-signal-handlers (how the hell can i create an array of handlers ??) // I hope i can clean this part up a bit in the next releases ... void reset_sigh_0(void) { a_cntrs->N[0]=0; } void reset_sigh_1(void) { a_cntrs->N[1]=0; } void reset_sigh_2(void) { a_cntrs->N[2]=0; } void reset_sigh_3(void) { a_cntrs->N[3]=0; } void reset_sigh_4(void) { a_cntrs->N[4]=0; } void reset_sigh_5(void) { a_cntrs->N[5]=0; } void reset_sigh_6(void) { a_cntrs->N[6]=0; } void reset_sigh_7(void) { a_cntrs->N[7]=0; } void reset_sigh_8(void) { a_cntrs->N[8]=0; } void reset_sigh_9(void) { a_cntrs->N[9]=0; } void reset_sigh_10(void) { a_cntrs->N[10]=0; } void reset_sigh_11(void) { a_cntrs->N[11]=0; } void reset_sigh_12(void) { a_cntrs->N[12]=0; } void reset_sigh_13(void) { a_cntrs->N[13]=0; } void reset_sigh_14(void) { a_cntrs->N[14]=0; } void reset_sigh_15(void) { a_cntrs->N[15]=0; } void reset_sigh_16(void) { a_cntrs->N[16]=0; } void reset_sigh_17(void) { a_cntrs->N[17]=0; } void reset_sigh_18(void) { a_cntrs->N[18]=0; } void reset_sigh_19(void) { a_cntrs->N[19]=0; } void reset_sigh_20(void) { a_cntrs->N[20]=0; } void reset_sigh_21(void) { a_cntrs->N[21]=0; } void reset_sigh_22(void) { a_cntrs->N[22]=0; } void reset_sigh_23(void) { a_cntrs->N[23]=0; } void reset_sigh_24(void) { a_cntrs->N[24]=0; } void reset_sigh_25(void) { a_cntrs->N[25]=0; } void reset_sigh_26(void) { a_cntrs->N[26]=0; } void reset_sigh_27(void) { a_cntrs->N[27]=0; } void reset_sigh_28(void) { a_cntrs->N[28]=0; } void reset_sigh_29(void) { a_cntrs->N[29]=0; } void reset_sigh_30(void) { a_cntrs->N[30]=0; } void reset_sigh_31(void) { a_cntrs->N[31]=0; } void reset_sigh_32(void) { a_cntrs->N[32]=0; } void reset_sigh_33(void) { a_cntrs->N[32]=0; } void reset_all_sigh(void) { unsigned int c; for (c=0;cN[c]=0; } void sh_IO_ALRM (int num) { unsigned int c; struct itimerval tval,otval; char dtext[30]=""; tval.it_value.tv_sec=0; tval.it_value.tv_usec=1000000/updates_p_sec; tval.it_interval.tv_sec=0; tval.it_interval.tv_usec=0; setitimer(ITIMER_REAL,&tval,&otval); for (c=0;c<33;c++) { sprintf(dtext,"%u",a_cntrs->N[c]); gtk_entry_set_text(GTK_ENTRY(a_rclb[c][1]),dtext); } } void local_init(void) { if ( (shmid=get_shmid()) == -1) { printf ("Could not get PIF-File in %s (APS not running) ??\n",PIF_PATH); exit(1); } if (D_LEVEL>0) printf ("Got SHMID=%u \n",shmid); if ( (int) (a_cntrs=(a_un_cntrs*) shmat(shmid,0,0)) == -1 ) // attach the allocated segment { perror ("could not attach SHMEM-SEGMENT"); exit (1); } signal(SIGALRM,sh_IO_ALRM); alarm(1); } // ------------------------------------- AND HERE COMES THE MAIN ------------------------------------- int main (void) { int c; local_init(); gtk_init(NULL,NULL); main_window=gtk_window_new(GTK_WINDOW_TOPLEVEL); // get a new window to display all this shit !! main_table=gtk_table_new(20,6,TRUE); for (c=0;c stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = src/include distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-hdr clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-hdr distclean-generic clean-am distclean: distclean-am maintainer-clean-am: maintainer-clean-hdr maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ tags distdir info-am info dvi-am dvi check check-am installcheck-am \ installcheck all-recursive-am install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: aps-0.15/src/include/stamp-h.in0000644000000000000000000000001207102576272011765 timestamp aps-0.15/src/include/Makefile.am0000644000000000000000000000016207076310244012121 EXTRA_DIST += \ protocols.h \ linux_if_ether.h \ portlist.aps \ aps_types.h \ user_config.h \ lansi.h aps-0.15/src/include/config.h.in0000644000000000000000000000211107060712672012110 /* src/include/config.h.in. Generated automatically from configure.in by autoheader. */ /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS #undef XAPS_ENABLED #undef PORTLIST_MAX_PNUM #undef BUILD_DATE /* The number of bytes in a char. */ #undef SIZEOF_CHAR /* The number of bytes in a int. */ #undef SIZEOF_INT /* The number of bytes in a long. */ #undef SIZEOF_LONG /* The number of bytes in a short. */ #undef SIZEOF_SHORT /* Define if you have the header file. */ #undef HAVE_SIGNAL_H /* Define if you have the header file. */ #undef HAVE_STDIO_H /* Define if you have the header file. */ #undef HAVE_STRING_H /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION aps-0.15/src/include/protocols.h0000644000000000000000000000246007030513455012264 /* protocols.h */ #ifndef _NETINET_PROTOCOLS_H #define _NETINET_PROTOCOLS_H #define IP_ICMP 1 #define IP_IGMP 2 #define IP_GGP 3 #define IP_ST 5 #define IP_TCP 6 #define IP_UCL 7 #define IP_EGP 8 #define IP_IGP 9 #define IP_BBN_RCC_MON 10 #define IP_NVP_II 11 #define IP_PUP 12 #define IP_ARGUS 13 #define IP_EMCON 14 #define IP_XNET 15 #define IP_CHAOS 16 #define IP_UDP 17 #define IP_MUX 18 #define IP_DCN_MEAS 19 #define IP_HMP 20 #define IP_PRM 21 #define IP_XNS_IDP 22 #define IP_TRUNK1 23 #define IP_TRUNK2 24 #define IP_LEAF1 25 #define IP_LEAF2 26 #define IP_RDP 27 #define IP_IRTP 28 #define IP_ISO_TP4 29 #define IP_NETBLT 30 #define IP_MFE_NSP 31 #define IP_MERIT_INP 32 #define IP_SEP 33 #define IP_3PC 34 #define IP_CFTP 62 #define SAT_EXPAK 64 #define IP_RVD 66 #define IP_IPPC 67 #define IP_SAT_MON 69 #define IP_VISA 70 #define IP_IPCV 71 #define IP_BR_SAT_MON 76 #define IP_SUN_ND 77 #define IP_WB_MON 78 #define IP_WB_EXPAK 79 #define IP_ISO_IP 80 #define IP_VMTP 81 #define IP_SECURE_VMTP 82 #define IP_VINES 83 #define IP_TTP 84 #define NSFNET_IGP 85 #define IP_DGP 86 #define IP_TCF 87 #define IP_IGRP 88 #define IP_OSPFIGP 89 #define IP_SPRITE_RPG 90 #define IP_LARP 91 #endif /* _NETINET_PROTOCOLS_H*/ aps-0.15/src/include/linux_if_ether.h0000644000000000000000000000026107030525244013240 // this may not be defined in some dists // normaly can be found in /usr/include/linux/if_ether.h #define ETH_P_ALL 0x0003 /* Every packet (be careful!!!) */ aps-0.15/src/include/portlist.aps0000644000000000000000000002174407040427461012464 # APS - Portlist ## If add entries to this file mention the maximum length for text is 25 ## characters and the maximum portnumber is 17999 !!! ## If you have added or changed entries in this file that might ## be useful for other APS-users you may mail me these or even the updated file. 1 tcpmux 2 compressnet 3 compressnet 5 rje 7 echo 9 discard 11 systat 13 daytime 17 qotd 18 msp 19 chargen 20 ftp-data 21 ftp 23 telnet 25 smtp 27 nsw-fe 29 msg-icp 31 msg-auth 33 dsp 37 time 38 rap 39 rlp 41 graphics 42 nameserver 43 nicname 44 mpm-flags 45 mpm 46 mpm-snd 47 ni-ftp 48 auditd 49 login 50 re-mail-ck 51 la-maint 52 xns-time 53 domain-name-service 54 xns-ch 55 isi-gl 56 xns-auth 58 xns-mail 61 ni-mail 62 acas 64 covia 65 tacacs-ds 66 sql*net 67 bootps 68 bootpc 69 tftp 70 gopher 71 netrjs-1 72 netrjs-2 73 netrjs-3 74 netrjs-4 76 deos 78 vettcp 79 finger 80 www-http 81 hosts2-ns 82 xfer 83 mit-ml-dev 84 ctf 85 mit-ml-dev 86 mfcobol 88 kerberos 89 su-mit-tg 90 dnsix 91 mit-dov 92 npp 93 dcp 94 objcall 95 supdup 96 dixie 97 swift-rvf 98 tacnews 99 metagram 100 newacct 101 hostname 102 iso-tsap 103 gppitnp 104 acr-nema 300 Comm. 105 csnet-ns 106 3com-tsmux 107 rtelnet 108 snagas 109 pop2 110 pop3 111 sunrpc 112 mcidas 113 auth 114 audionews 115 sftp 116 ansanotify 117 uucp-path 118 sqlserv 119 nntp 120 cfdptkt 121 erpc 122 smakynet 123 ntp 124 ansatrader 125 locus-map 126 unitary 127 locus-con 128 gss-xlicen 129 pwdgen 130 cisco-fna 131 cisco-tna 132 cisco-sys 133 statsrv 134 ingres-net 135 loc-srv 136 profile 137 netbios-ns 138 netbios-dgm 139 netbios-ssn 140 emfis-data 141 emfis-cntl 142 bl-idm 143 imap2 144 news 145 uaac 146 iso-tp0 147 iso-ip 148 cronus 149 aed-512 512 AED 150 sql-net 151 hems 152 bftp 153 sgmp 154 netsc-prod 155 netsc-dev 156 sqlsrv 157 knet-cmp 158 pcmail-srv 159 nss-routing 160 sgmp-traps 161 snmp 162 snmptrap 163 cmip-man 164 cmip-agent 165 xns-courier 166 s-net 167 namp 168 rsvd 169 send 170 print-srv 171 multiplex 172 cl/1 173 xyplex-mux 174 mailq 175 vmnet 176 genrad-mux 177 xdmcp 178 nextstep 179 bgp 180 ris 181 unify 182 audit 183 ocbinder 184 ocserver 185 remote-kis 186 kis 187 aci 188 mumps 189 qft 190 gacp 191 prospero 192 osu-nms 193 srmp 194 irc 195 dn6-nlm-aud 196 dn6-smm-red 197 dls 198 dls-mon 199 smux 200 src 201 at-rtmp 202 at-nbp 203 at-3 204 at-echo 205 at-5 206 at-zis 207 at-7 208 at-8 209 tam 210 z39.50 914 Z39.50 211 914c/g 212 anet 213 ipx 214 vmpwscs 215 softpc 216 atls 217 dbase 218 mpp 219 uarps 220 imap3 221 fln-spx 222 rsh-spx 223 cdc 243 sur-meas 245 link 246 dsp3270 344 pdap 345 pawserv 346 zserv 347 fatserv 348 csi-sgwp 371 clearcase 372 ulistserv 373 legent-1 374 legent-2 375 hassle 376 nip 377 tnETOS 378 dsETOS 379 is99c 380 is99s 381 hp-collector 382 hp-managed-node 383 hp-alarm-mgr 384 arns 385 ibm-app 386 asa 387 aurp 388 unidata-ldm 389 ldap 390 uis 391 synotics-relay 392 synotics-broker 393 dis 394 embl-ndt 395 netcp 396 netware-ip 397 mptn 398 kryptolan 400 work-sol 401 ups 402 genie 403 decap 404 nced 405 ncld 406 imsp 407 timbuktu 408 prm-sm 409 prm-nm 410 decladebug 411 rmt 412 synoptics-trap 413 smsp 414 infoseek 415 bnet 416 silverplatter 417 onmux 418 hyper-g 419 ariel1 420 smpte 421 ariel2 422 ariel3 423 opc-job-start 424 opc-job-track 425 icad-el 426 smartsdp 427 svrloc 428 ocs_cmu 429 ocs_amu 430 utmpsd 431 utmpcd 432 iasd 433 nnsp 434 mobileip-agent 435 mobilip-mn 436 dna-cml 437 comscm 438 dsfgw 439 dasp 440 sgcp 441 decvms-sysmgt 442 cvc_hostd 443 https 444 snpp 445 microsoft-ds 446 ddm-rdb 447 ddm-dfm 448 ddm-byte 449 as-servermap 450 tserver 513 login 514 cmd 515 printer 517 talk 518 ntalk 519 utime 520 efs 525 timed 526 tempo 530 courier 531 conference 532 netnews 533 netwall 539 apertus-ldp 540 uucp 541 uucp-rlogin 543 klogin 544 kshell 550 new-rwho 554 ?rts-proxy(real-audio)? 555 dsf 556 remotefs 560 rmonitor 561 monitor 562 chshell 564 9pfs 565 whoami 570 meter 571 meter 600 ipcserver 607 nqs 606 urm 608 sift-uft 609 npmp-trap 610 npmp-local 611 npmp-gui 634 ginad 666 mdqs 704 elcsd 709 entrustmanager 729 netviewdm1 730 netviewdm2 731 netviewdm3 741 netgw 742 netrcs 744 flexlm 747 fujitsu-dev 748 ris-cm 749 kerberos-adm 750 rfile 751 pump 752 qrh 753 rrh 754 tell 758 nlogin 759 con 760 ns 761 rxe 762 quotad 763 cycleserv 764 omserv 765 webster 767 phonebook 769 vid 770 cadlock 771 rtip 772 cycleserv2 773 submit 774 rpasswd 775 entomb 776 wpages 780 wpgs 786 concert 800 mdbs_daemon 801 device 996 xtreelic 997 maitrd 998 busboy 999 garcon 1000 cadlock 1023 1000/udp 1024 Reserved 1025 blackjack 1030 iad1 1031 iad2 1032 iad3 1067 instl_boots 1068 instl_bootc 1080 socks 1083 ansoft-lm-1 1084 ansoft-lm-2 1090 ?pna-proxy? 1155 nfa 1222 nerv 1248 hermes 1346 alta-ana-lm 1347 bbn-mmc 1348 bbn-mmx 1349 sbook 1350 editbench 1351 equationbuilder 1352 lotusnote 1353 relief 1354 rightbrain 1355 edge 1356 cuillamartin 1357 pegboard 1358 connlcli 1359 ftsrv 1360 mimer 1361 linx 1362 timeflies 1363 ndm-requester 1364 ndm-server 1365 adapt-sna 1366 netware-csp 1367 dcs 1368 screencast 1369 gv-us 1370 us-gv 1371 fc-cli 1372 fc-ser 1373 chromagrafx 1374 molly 1375 bytex 1376 ibm-pps 1377 cichlid 1378 elan 1379 dbreporter 1380 telesis-licman 1381 apple-licman 1382 udt_os 1383 gwha 1384 os-licman 1385 atex_elmd 1386 checksum 1387 cadsi-lm 1388 objective-dbc 1389 iclpv-dm 1390 iclpv-sc 1391 iclpv-sas 1392 iclpv-pm 1393 iclpv-nls 1394 iclpv-nlc 1395 iclpv-wsm 1396 dvl-activemail 1397 audio-activmail 1398 video-activmail 1399 cadkey-licman 1400 cadkey-tablet 1401 goldleaf-licman 1402 prm-sm-np 1403 prm-nm-np 1404 igi-lm 1405 ibm-res 1406 netlabs-lm 1407 dbsa-lm 1408 sophia-lm 1409 here-lm 1410 hiq 1411 af 1412 innosys 1413 innosys-acl 1414 ibm-mqseries 1415 dbstar 1416 novell-lu6.2 1417 timbuktu-srv1 1418 timbuktu-srv2 1419 timbuktu-srv3 1420 timbuktu-srv4 1421 gandalf-lm 1422 autodesk-lm 1423 essbase 1424 hybrid 1425 zion-lm 1426 sas-1 1427 mloadd 1428 informatik-lm 1429 nms 1430 tpdu 1431 rgtp 1432 blueberry-lm 1433 ms-sql-s 1434 ms-sql-m 1435 ibm-cics 1436 sas-2 1437 tabula 1438 eicon-server 1439 eicon-x25 1440 eicon-slp 1441 cadis-1 1442 cadis-2 1443 ies-lm 1444 marcam-lm 1445 proxima-lm 1446 ora-lm 1447 apri-lm 1448 oc-lm 1449 peport 1450 dwf 1451 infoman 1452 gtegsc-lm 1453 genie-lm 1454 interhdl_elmd 1455 esl-lm 1456 dca 1457 valisys-lm 1458 nrcabq-lm 1459 proshare1 1460 proshare2 1461 ibm_wrless_lan 1462 world-lm 1463 nucleus 1464 msl_lmd 1465 pipes 1466 oceansoft-lm 1467 csdmbase 1468 csdm 1469 aal-lm 1470 uaiact 1471 csdmbase 1472 csdm 1473 openmath 1474 telefinder 1475 taligent-lm 1476 clvm-cfg 1477 ms-sna-server 1478 ms-sna-base 1479 dberegister 1480 pacerforum 1481 airs 905 Wilson 1482 miteksys-lm 1483 afs 1484 confluent 1485 lansource 1486 nms_topo_serv 1487 localinfosrvr 1488 docstor 1489 dmdocbroker 1490 insitu-conf 1491 anynetgateway 1492 stone-design-1 1493 netmap_lm 1494 ica 1495 cvc 1496 liberty-lm 1497 rfx-lm 1498 watcom-sql 1499 fhc 1500 vlsi-lm 1501 sas-3 1502 shivadiscovery 1503 imtc-mcs 1504 evb-elm 1505 funkproxy 1524 ingreslock 1525 orasrv 1526 pdap-np 1527 tlisrv 1529 coauthor 1600 issd 1650 nkd 1651 proshareaudio 1652 prosharevideo 1653 prosharedata 1654 prosharerequest 1655 prosharenotify 1661 netview-aix-1 1662 netview-aix-2 1663 netview-aix-3 1664 netview-aix-4 1665 netview-aix-5 1666 netview-aix-6 1986 licensedaemon 1987 tr-rsrb-p1 1988 tr-rsrb-p2 1989 tr-rsrb-p3 1990 stun-p1 1991 stun-p2 1992 stun-p3 1993 snmp-tcp-port 1994 stun-port 1995 perf-port 1996 tr-rsrb-port 1997 gdp-port 1998 x25-svc-port 1999 tcp-id-port 2000 callbook 2001 dc 2002 globe 2004 mailbox 2005 berknet 2006 invokator 2007 dectalk 2008 conf 2009 news 2010 search 2011 raid-cc 2012 ttyinfo 2013 raid-am 2014 troff 2015 cypress 2016 bootserver 2017 cypress-stat 2018 terminaldb 2019 whosockami 2020 xinupageserver 2021 servexec 2022 down 2023 xinuexpansion3 2024 xinuexpansion4 2025 ellpack 2026 scrabble 2027 shadowserver 2028 submitserver 2030 device2 2032 blackboard 2033 glogger 2034 scoremgr 2035 imsldoc 2038 objectmanager 2040 lam 2041 interbase 2042 isis 2043 isis-bcast 2044 rimsl 2045 cdfunc 2046 sdfunc 2047 dls 2048 dls-monitor 2049 shilp 2064 ?dnetc-update? 2065 dlsrpn 2067 dlswpn 2201 ats 2500 rtsserv 2501 rtsclient 2564 hp-3000-telnet 3000 HP 3306 ?mysql? 2784 www-dev 3049 NSWS 3128 ?squid? 3129 ?squid? 3130 ?squid? 3264 ccmail 3333 dec-notes 3984 mapper-nodemgr 3985 mapper-mapethd 3986 mapper-ws_ethd 3421 bmap 3900 udt_os 4132 nuts_dem 4133 nuts_bootp 4343 unicall 4444 krb524 4672 rfa 5000 commplex-main 5001 commplex-link 5002 rfe 5010 telelpathstart 5011 telelpathattack 5050 mmcc 5145 rmonitor_secure 5190 aol 5236 padl2sim 5300 hacl-hb 5301 hacl-gs 5302 hacl-cfg 5303 hacl-probe 5304 hacl-local 5305 hacl-test 6000 x11 6111 sub-process 6141 meta-corp 6142 aspentec-lm 6143 watershed-lm 6144 statsci1-lm 6145 statsci2-lm 6146 lonewolf-lm 6147 montage-lm 6558 xdsxdm 7000 afs3-fileserver 7001 afs3-callback 7002 afs3-prserver 7003 afs3-vlserver 7004 afs3-kaserver 7005 afs3-volser 7006 afs3-errors 7007 afs3-bos 7008 afs3-update 7009 afs3-rmtsys 7010 ups-onlinet 7070 ?real-audio? 7100 font-service 7200 fodms 8080 ?proxy? 9535 man 13568 ?ns-transfer? 17007 isode-dua aps-0.15/src/include/aps_types.h0000644000000000000000000000531107075716201012250 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ #include // s_aps_cnt is used to sum up the counters for different packet formats // exactly this struct with the size of STRCTSZE_CNTR is set as a shared-memory segment // for read write access (should be root because aps normaly does not start with user permissions !) // NUM_CNTRS is the numbers of values from type int in s_aps_cntr !! #define NUM_CNTRS 34 // STRCTSZE_CNTR will contain the size of the struct (is used for unions) #define STRCTSZE_CNTR NUM_CNTRS*SIZEOF_INT #undef TRUE #define TRUE 1 #undef FALSE #define FALSE 0 typedef struct { unsigned int udp_ip; // not splitted down until now unsigned int tcp_ip; // not splitted down until now unsigned int icmp_ip_echo_req; // ICMP ECHO unsigned int icmp_ip_echo_rep; unsigned int icmp_ip_unre_net; // ICMP UNREACHEBLE unsigned int icmp_ip_unre_host; unsigned int icmp_ip_unre_proto; unsigned int icmp_ip_unre_port; unsigned int icmp_ip_unre_frag_need; unsigned int icmp_ip_unre_src_route; unsigned int icmp_ip_unre_unknown; // Nr,10 (from 0) unsigned int icmp_ip_source_quench; unsigned int icmp_ip_redir_tonet;// ICMP REDIRECT unsigned int icmp_ip_redir_tohost; unsigned int icmp_ip_redir_tos_net; unsigned int icmp_ip_redir_tos_host; unsigned int icmp_ip_redir_unknown; unsigned int icmp_ip_exc_time_limit; // ICMP ??? unsigned int icmp_ip_dtgr_param_prob; // Nr,18 (from 0) unsigned int icmp_ip_time_req; unsigned int icmp_ip_time_rep; unsigned int icmp_ip_info_req; unsigned int icmp_ip_info_rep; unsigned int icmp_ip_addr_mask_req; unsigned int icmp_ip_addr_mask_rep; unsigned int icmp_ip_unknown; // UNKNOWN ICMP-TYPES unsigned int rarp_req; // Nr,26 (from 0) unsigned int rarp_rep; unsigned int arp_req; unsigned int arp_rep; unsigned int smb; unsigned int loop; unsigned int ipx; // Nr,16 (from 0) unsigned int unknown; }s_aps_cntr; typedef union { unsigned int N[NUM_CNTRS]; }a_un_cntrs; aps-0.15/src/include/user_config.h0000644000000000000000000000346407056216713012555 /* * * APS - Advanced Packet Sniffer * * Copyright (C) 1999 Christian Schulte * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * */ /* * PLEASE EDIT THIS FILE AND ALTER IT TO YOUR NEEDS !! */ // -------- PATH where to install the portlist.aps // // portlist.aps contains a number of combinations of so called // well-known-ports and their names. The names are displayed additionally // for better/faster readabillity of the APS-output // // DEFAULT "usr/local/include/aps" # define INCLUDE_INST_DIR "/usr/local/include/aps" // -------- PATH to the ProcessInformationFile "aps_xxxx.pif" // // the xxxx in the filename is used to separate different aps processes on one system // if you start the first process it will be 0000. When you start another aps process while // the first one is running this will get it to 0001. // // the first line contains the process ID // the second one contains the APS-Version // the third line contains the shmem ID // // DEFAULT "/var/run" #define PIF_PATH "/var/run" aps-0.15/src/include/lansi.h0000644000000000000000000000065307065123105011345 /* _little_ ANSI support ... */ #define BOLD printf("\x1B[1m") #define REV printf("\x1B[7m") #define RED printf("\x1B[31m") #define GREEN printf("\x1B[32m") #define BLUE printf("\x1B[34m") #define CYAN printf("\x1B[36m") #define YELLOW printf("\x1B[33m") #define MAGENTA printf("\x1B[35m") #define BEEP printf("\x7") #define BGBLUE printf("\x1B[44m") #define NORMAL printf("\x1B[0m") #define CLEANS printf("\x1B[2J")