achilles-2/0042755000175000001440000000000007332610360011510 5ustar mrdusersachilles-2/AUTHORS0100644000175000001440000000007107305567104012560 0ustar mrdusersPrimary Author: Matthew Danish achilles-2/COPYING0100644000175000001440000003545107226470677012567 0ustar mrdusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS achilles-2/ChangeLog0100640000175000001440000000112107332607307013253 0ustar mrdusers0.0.1 (05/01/2000): * Initial release 0.0.2 (05/09/2000): * Added PNG screenshot support 0.0.3 (05/10/2000): * Ported to Solaris 0.0.4 (10/04/2000): * Bit of a delay, got back to work; * Ported to Win32 (Cygwin) 0.0.5 (01/08/2001): * Added autoconf support 1 (05/31/2001): * Did away with silly version numbers and opted for a single digit. * Fixed Debian/alpha build by replacing 'unsigned int' with 'png_size_t' in screenshot.cc 2 (08/03/2001): * Updated config.{sub,guess} * Added 'using namespace std;' for g++ 3.0's benefit * Fixed configure.in to work on hppa, arm. achilles-2/INSTALL0100644000175000001440000000031207226470572012543 0ustar mrdusersQuick way: ./configure && make && make install See ./configure --help for more options Should be able to ignore any warnings related to platform-specific libs, unless it pertains to your platform :) achilles-2/Makefile.am0100644000175000001440000000057707226463024013555 0ustar mrdusersbin_PROGRAMS = achilles achilles_SOURCES = universe.cc angle.cc braininfo.cc color.cc energy.cc gene.cc hebbian.cc id.cc idserver.cc license.cc main.cc opengl.cc org.cc orglist.cc quicksort.cc screenshot.cc vector.cc world.cc angle.h confdefs.h gene.h idserver.h orglist.h vector.h braininfo.h defines.h hebbian.h opengl.h quicksort.h world.h color.h energy.h id.h org.h universe.h achilles-2/Makefile.in0100644000175000001440000003047007332607016013560 0ustar mrdusers# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : CXX = @CXX@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ bin_PROGRAMS = achilles achilles_SOURCES = universe.cc angle.cc braininfo.cc color.cc energy.cc gene.cc hebbian.cc id.cc idserver.cc license.cc main.cc opengl.cc org.cc orglist.cc quicksort.cc screenshot.cc vector.cc world.cc angle.h confdefs.h gene.h idserver.h orglist.h vector.h braininfo.h defines.h hebbian.h opengl.h quicksort.h world.h color.h energy.h id.h org.h universe.h ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = PROGRAMS = $(bin_PROGRAMS) DEFS = @DEFS@ -I. -I$(srcdir) -I. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ achilles_OBJECTS = universe.o angle.o braininfo.o color.o energy.o \ gene.o hebbian.o id.o idserver.o license.o main.o opengl.o org.o \ orglist.o quicksort.o screenshot.o vector.o world.o achilles_LDADD = $(LDADD) achilles_DEPENDENCIES = achilles_LDFLAGS = CXXFLAGS = @CXXFLAGS@ CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ DIST_COMMON = README ./stamp-h.in AUTHORS COPYING ChangeLog INSTALL \ Makefile.am Makefile.in NEWS acconfig.h aclocal.m4 config.guess \ config.h.in config.sub configure configure.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best DEP_FILES = .deps/angle.P .deps/braininfo.P .deps/color.P \ .deps/energy.P .deps/gene.P .deps/hebbian.P .deps/id.P .deps/idserver.P \ .deps/license.P .deps/main.P .deps/opengl.P .deps/org.P .deps/orglist.P \ .deps/quicksort.P .deps/screenshot.P .deps/universe.P .deps/vector.P \ .deps/world.P SOURCES = $(achilles_SOURCES) OBJECTS = $(achilles_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .cc .o .s $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): configure.in cd $(srcdir) && $(ACLOCAL) config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: $(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h 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: 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 .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: achilles: $(achilles_OBJECTS) $(achilles_DEPENDENCIES) @rm -f achilles $(CXXLINK) $(achilles_LDFLAGS) $(achilles_OBJECTS) $(achilles_LDADD) $(LIBS) .cc.o: $(CXXCOMPILE) -c $< tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --srcdir=.. --prefix=$$dc_install_base \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) here=`cd $(top_builddir) && pwd`; \ top_distdir=`cd $(distdir) && pwd`; \ distdir=`cd $(distdir) && pwd`; \ cd $(top_srcdir) \ && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu Makefile @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) -include $(DEP_FILES) mostlyclean-depend: clean-depend: distclean-depend: -rm -rf .deps maintainer-clean-depend: %.o: %.c @echo '$(COMPILE) -c $<'; \ $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-cp .deps/$(*F).pp .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm .deps/$(*F).pp %.lo: %.c @echo '$(LTCOMPILE) -c $<'; \ $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ < .deps/$(*F).pp > .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm -f .deps/$(*F).pp %.o: %.cc @echo '$(CXXCOMPILE) -c $<'; \ $(CXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-cp .deps/$(*F).pp .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm .deps/$(*F).pp %.lo: %.cc @echo '$(LTCXXCOMPILE) -c $<'; \ $(LTCXXCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ < .deps/$(*F).pp > .deps/$(*F).P; \ tr ' ' '\012' < .deps/$(*F).pp \ | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ >> .deps/$(*F).P; \ rm -f .deps/$(*F).pp 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-binPROGRAMS install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-binPROGRAMS uninstall: uninstall-am all-am: Makefile $(PROGRAMS) config.h all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ mostlyclean-compile mostlyclean-tags mostlyclean-depend \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ clean-depend clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ distclean-tags distclean-depend distclean-generic \ clean-am distclean: distclean-am -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-depend 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 -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir mostlyclean-depend \ distclean-depend clean-depend maintainer-clean-depend 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: achilles-2/Makefile.solaris0100644000175000001440000000764607305570041014634 0ustar mrdusers# ************** WARNING: # This is an old Makefile, pre-autoconf. You should attempt to use # the autoconf generated Makefile before fiddling with this one # ***************************************************************** # Briefly scan these (an oxymoron indeed!), and edit them to your system's # settings # Please read the _whole_ file or you will not be able to compile # ***************************************************************** # If your compiler is not g++, put the proper one here CC = g++ # If your remove without warnings command is something different.. change RM = rm -f # Put the location of your X11 libraries here (if applicable; not for win32) LOC_XLIBS = /usr/X11R6/lib # Put the location of your SDL libraries here LOC_SDL_LIBS = /usr/lib # Put the location of your SDL header files here LOC_SDL_HEADERS = /usr/include/SDL # Put the location of your OpenGL header files here LOC_GL_HEADERS = /usr/include/GL # Put the location of your OpenGL library files here LOC_GL_LIBS = /usr/X11R6/lib # ***************************************************************** # ***************************************************************** # Uncomment these if your system supports zlib and libpng, # And you want PNG screenshot support PNG_CCFLAGS = -DPNG_SCREENSHOT PNG_LDFLAGS = -lpng -lz # ***************************************************************** # Uncomment the section that is relevant for your system # Leave the others commented # ***************************************************************** # Uncomment these for a Linux system # CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) # LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_XLIBS) -L$(LOC_GL_LIBS) -lSDL -lGLU -lGL -lXmu -lXi -lX11 -lm $(PNG_LDFLAGS) # ***************************************************************** # ***************************************************************** # Uncomment these for a Solaris system CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_XLIBS) -L$(LOC_GL_LIBS) -lSDL -lglut -lGLU -lGL -lXmu -lXi -lX11 -lm $(PNG_LDFLAGS) -lposix4 # ***************************************************************** # ***************************************************************** # Uncomment these for a Win32 system (Cygwin) # CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) # LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_GL_LIBS) -lSDL -lglut32 -lglu32 -lopengl32 -lm $(PNG_LDFLAGS) # ***************************************************************** # READ BELOW AND COMMENT OUT THE LINES BELOW: "COMMENT THIS OUT" # Everything else should be just fine as it is # ***************************************************************** # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # comments are lines that start with '#' # COMMENT THESE LINES OUT (everything from here to DONE) #comment_this: # @echo "*******************************************************" # @echo "YOU DIDN'T FOLLOW INSTRUCTIONS AND READ THE Makefile" # @echo "BEFORE COMPILING DID YOU? PLEASE DO THAT BEFORE" # @echo "PROCEEDING." # @echo "*******************************************************" # @exit # DONE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # You should not need to edit anything below this FILES = main universe opengl orglist org idserver id vector world gene angle \ braininfo hebbian energy color quicksort license screenshot CCFILES = $(foreach FILE,$(FILES),$(FILE).cc) OFILES = $(foreach FILE,$(FILES),$(FILE).o) PROGNAME = achilles all: $(PROGNAME) $(PROGNAME): $(OFILES) $(CC) -o $(PROGNAME) $(OFILES) $(LDFLAGS) .cc.o: $(CC) $(CCFLAGS) -c $< -o $@ clean: $(RM) $(PROGNAME) $(PROGNAME).dep core $(OFILES) dep: depend depend: $(CC) $(CCFLAGS) -MM $(CCFILES) > $(PROGNAME).dep -include $(PROGNAME).dep # ***************************************************************** achilles-2/Makefile.win320100644000175000001440000000764507305570064014126 0ustar mrdusers# ************** WARNING: # This is an old Makefile, pre-autoconf. You should attempt to use # the autoconf generated Makefile before fiddling with this one # ***************************************************************** # Briefly scan these (an oxymoron indeed!), and edit them to your system's # settings # Please read the _whole_ file or you will not be able to compile # ***************************************************************** # If your compiler is not g++, put the proper one here CC = g++ # If your remove without warnings command is something different.. change RM = rm -f # Put the location of your X11 libraries here (if applicable; not for win32) LOC_XLIBS = /usr/X11R6/lib # Put the location of your SDL libraries here LOC_SDL_LIBS = /usr/lib # Put the location of your SDL header files here LOC_SDL_HEADERS = /usr/include/SDL # Put the location of your OpenGL header files here LOC_GL_HEADERS = /usr/include/GL # Put the location of your OpenGL library files here LOC_GL_LIBS = /usr/X11R6/lib # ***************************************************************** # ***************************************************************** # Uncomment these if your system supports zlib and libpng, # And you want PNG screenshot support PNG_CCFLAGS = -DPNG_SCREENSHOT PNG_LDFLAGS = -lpng -lz # ***************************************************************** # Uncomment the section that is relevant for your system # Leave the others commented # ***************************************************************** # Uncomment these for a Linux system # CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) # LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_XLIBS) -L$(LOC_GL_LIBS) -lSDL -lGLU -lGL -lXmu -lXi -lX11 -lm $(PNG_LDFLAGS) # ***************************************************************** # ***************************************************************** # Uncomment these for a Solaris system # CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) # LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_XLIBS) -L$(LOC_GL_LIBS) -lSDL -lglut -lGLU -lGL -lXmu -lXi -lX11 -lm $(PNG_LDFLAGS) -lposix4 # ***************************************************************** # ***************************************************************** # Uncomment these for a Win32 system (Cygwin) CCFLAGS = $(PNG_CCFLAGS) -O2 -Wall -I$(LOC_SDL_HEADERS) -I$(LOC_GL_HEADERS) LDFLAGS = -L$(LOC_SDL_LIBS) -L$(LOC_GL_LIBS) -lSDL -lglut32 -lglu32 -lopengl32 -lm $(PNG_LDFLAGS) # ***************************************************************** # READ BELOW AND COMMENT OUT THE LINES BELOW: "COMMENT THIS OUT" # Everything else should be just fine as it is # ***************************************************************** # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # comments are lines that start with '#' # COMMENT THESE LINES OUT (everything from here to DONE) #comment_this: # @echo "*******************************************************" # @echo "YOU DIDN'T FOLLOW INSTRUCTIONS AND READ THE Makefile" # @echo "BEFORE COMPILING DID YOU? PLEASE DO THAT BEFORE" # @echo "PROCEEDING." # @echo "*******************************************************" # @exit # DONE # !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! # You should not need to edit anything below this FILES = main universe opengl orglist org idserver id vector world gene angle \ braininfo hebbian energy color quicksort license screenshot CCFILES = $(foreach FILE,$(FILES),$(FILE).cc) OFILES = $(foreach FILE,$(FILES),$(FILE).o) PROGNAME = achilles all: $(PROGNAME) $(PROGNAME): $(OFILES) $(CC) -o $(PROGNAME) $(OFILES) $(LDFLAGS) .cc.o: $(CC) $(CCFLAGS) -c $< -o $@ clean: $(RM) $(PROGNAME) $(PROGNAME).dep core $(OFILES) dep: depend depend: $(CC) $(CCFLAGS) -MM $(CCFILES) > $(PROGNAME).dep -include $(PROGNAME).dep # ***************************************************************** achilles-2/NEWS0100644000175000001440000000261207305576674012226 0ustar mrdusersNews? Nothing particularly special, really. I have changed the version numbers to something more sane, being that they were arbitrarily stuck at 0.0.x for over a year, and I couldn't decide what consituted a major version shift. In any case, a scientific application like this versions differently from other, utility software. As more tests and experiments are added, increasing the version number simply indicates to people that there is a version out there that is newer, with more features perhaps. It's not about creating a "major version branch" with specific functionality and releasing "minor revisions" to fix bugs. There's no target functionality in this program, it simply exists to be fiddled with, to amuse or to learn. All this being said, the program has not undergone any major revision in the past year. I have been busy, have had other concerns. I have had a few people voice their interest in helping out, and a friend of mine has managed to port this to Mac OS X (yay!), and that will be incorporated into the next version once I sort things out. With my declining interest in associating myself with C or C++, I doubt that this current codebase is going to be much altered by myself; however, I often toy with plans to rewrite the whole mess in Common LISP or Scheme--where the incredible flexibility of LISP will make life a lot easier on me. But, alas.. Matthew Danish May 31st, 2001 achilles-2/README0100640000175000001440000000627707305567471012411 0ustar mrdusersAchilles 1 ~~~~~~~~~~ Achilles is a simulation of Darwinian evolution in an extremely simplified virtual world, that permits freely interacting virtual organisms to fight, mate, and feed, learning as they go with Hebbian neural networks. A note on the version number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The former version numbers were: 0.0.1, through 0.0.5. I have written a bit more about the change in version number in the file "NEWS" and in the "ChangeLog". What you need to install ~~~~~~~~~~~~~~~~~~~~~~~~ If you're running Debian, 'achilles' is available! Currently (05/31/2001) it is in unstable and testing, with a new version to fix the alpha build. Hopefully it will be in the Debian "woody" release, when that rolls out! For everyone else: Very simply, to install this, you need OpenGL, GLU, GLUT and SDL If you want the ability to take PNG screenshots, you will need zlib and libpng in addition. OpenGL is http://www.opengl.org but a common free "unofficial" implementation of it is Mesa3D at http://www.mesa3d.org libpng is http://www.libpng.org/pub/png/libpng.html zlib is ftp://ftp.freesoftware.com/pub/infozip/zlib/zlib.html GLU and GLUT as of now come with Mesa3D zlib and libpng are usually included with most Linux distributions The zlib library is named libz.so SDL is Simple Directmedia Layer and is at http://www.devolution.com/~slouken/projects/SDL/ Platforms ~~~~~~~~~ Right now I've only got it running on Linux/x86 but it should be trivial to port, to any platform that is supported by SDL, and it can be fairly easily converted to GLUT only which would make it extremely portable.. but SDL is a much nicer library than GLUT in my opinion. 1: Fixed for Debian/Alpha 0.0.4: Ported to Win32 0.0.3: Ported to Solaris Installation ~~~~~~~~~~~~ ./configure && make && make install Should be able to ignore any warnings related to platform-specific libs, unless it pertains to your platform :) If that does not work on the Solaris or Win32 platforms, I have included the old Makefiles for those platforms. Take a look at them and maybe give them a shot: make -f Makefile.win32 or make -f Makefile.solaris Command-line Options ~~~~~~~~~~~~~~~~~~~~ achilles [ -v | -h | -x | -z | -f | ] -v - Show current version -h - Show options and default settings -x - The X-dimension width of the world -z - The Z-dimension length of the world -f - The minimum amount of food in the world - The minimum number of organisms in the world Suggested options: achilles -x 16 -z 16 -f 10 10 Feel free to experiment - thats what its meant for! Usage while running ~~~~~~~~~~~~~~~~~~~ Arrow keys control rotation around the Y axis and moving forward and back. Page up/down controls position on the Y axis (up or down) 'p' pauses the program (and greatly increases the framerate!) 's' takes a screenshot, saves it as screenshot.png, so remember to rename it! 'ESC' quits the program Contact ~~~~~~~ Web Page: http://achilles.sourceforge.net/ Any comments, questions, patches and changes should be submitted to Matthew Danish mdanish@andrew.cmu.edu If you have come up with a port to any other platform I'd be happy to hear and incorporate it into the main source tree. Thank you achilles-2/acconfig.h0100644000175000001440000000006307226463024013431 0ustar mrdusers#define PACKAGE "achilles" #define VERSION "0.0.5" achilles-2/aclocal.m40100644000175000001440000001045707332607014013354 0ustar mrdusersdnl aclocal.m4 generated automatically by aclocal 1.4-p4 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # 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([,]))]) # 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)]) achilles-2/angle.cc0100644000175000001440000000455107226463024013112 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"angle.h" #include"vector.h" #include #include"defines.h" AngleClass::AngleClass() : angle(0) {} AngleClass::AngleClass(double _angle) { Angle(_angle); } AngleClass::AngleClass(VectorClass &v) { Angle((180/MY_PI) * double(atan2(v.X(),v.Z()))); } AngleClass::~AngleClass() {} double AngleClass::Angle() { return angle; } double AngleClass::Angle(double _angle) { angle=_angle; while(angle>=360) angle-=360; while(angle<0) angle+=360; return angle; } VectorClass AngleClass::Vector() { VectorClass v(sin(MY_PI/180*angle),0,cos(MY_PI/180*angle)); return v; } bool AngleClass::operator ==(AngleClass &a) { if(angle == a.angle) return true; else return false; } bool AngleClass::operator !=(AngleClass &a) { return !(*this == a); } bool AngleClass::operator ==(double a) { if(angle == a) return true; else return false; } bool AngleClass::operator !=(double a) { return !(*this == a); } AngleClass operator +(AngleClass &a,AngleClass &b) { AngleClass c(a.angle + b.angle); return c; } AngleClass operator +(AngleClass &a,double b) { AngleClass c(a.angle + b); return c; } AngleClass operator -(AngleClass &a,AngleClass &b) { AngleClass c(a.angle - b.angle); return c; } AngleClass operator -(AngleClass &a,double b) { return (a + (-b)); } AngleClass & AngleClass::operator +=(AngleClass &a) { Angle(Angle()+a.angle); return *this; } AngleClass & AngleClass::operator +=(double a) { Angle(Angle()+a); return *this; } AngleClass & AngleClass::operator -=(AngleClass &a) { Angle(Angle()-a.angle); return *this; } AngleClass & AngleClass::operator -=(double a) { Angle(Angle()-a); return *this; } achilles-2/angle.h0100644000175000001440000000274407226463024012756 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ANGLE_H_756834 #define ANGLE_H_756834 class VectorClass; class AngleClass { private: double angle; public: AngleClass(); AngleClass(double); AngleClass(VectorClass &); ~AngleClass(); double Angle(); double Angle(double); VectorClass Vector(); bool operator ==(AngleClass &); bool operator !=(AngleClass &); bool operator ==(double); bool operator !=(double); friend AngleClass operator +(AngleClass &,AngleClass &); friend AngleClass operator +(AngleClass &,double); friend AngleClass operator -(AngleClass &,AngleClass &); friend AngleClass operator -(AngleClass &,double); AngleClass & operator +=(AngleClass &); AngleClass & operator +=(double); AngleClass & operator -=(AngleClass &); AngleClass & operator -=(double); }; #endif achilles-2/bootstrap0100755000175000001440000000016307226463024013453 0ustar mrdusers#! /bin/sh aclocal -I config \ && autoheader \ && automake --gnu --add-missing \ && autoconf achilles-2/braininfo.cc0100644000175000001440000000252507226463024013772 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"braininfo.h" BrainInfoClass::BrainInfoClass(long _num_neurodes, long _num_layers, long _num_inputs, long _num_outputs, double _td) : num_neurodes(_num_neurodes), num_layers(_num_layers), num_inputs(_num_inputs), num_outputs(_num_outputs), td(_td) {} BrainInfoClass::~BrainInfoClass() {} long BrainInfoClass::NumNeurodes() { return num_neurodes; } long BrainInfoClass::NumLayers() { return num_layers; } long BrainInfoClass::NumInputs() { return num_inputs; } long BrainInfoClass::NumOutputs() { return num_outputs; } double BrainInfoClass::TopoDist() { return td; } achilles-2/braininfo.h0100644000175000001440000000205607226463024013633 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef BRAININFO_H_787543 #define BRAININFO_H_787543 class BrainInfoClass { private: long num_neurodes,num_layers,num_inputs,num_outputs; double td; public: BrainInfoClass(long,long,long,long,double); ~BrainInfoClass(); long NumNeurodes(); long NumLayers(); long NumInputs(); long NumOutputs(); double TopoDist(); }; #endif achilles-2/color.cc0100644000175000001440000000231707226463024013140 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"color.h" ColorClass::ColorClass() { r=g=b=0; } ColorClass::ColorClass(double _r,double _g,double _b) { R(_r); G(_g); B(_b); } ColorClass::~ColorClass() {} double ColorClass::R() { return r; } double ColorClass::G() { return g; } double ColorClass::B() { return b; } double ColorClass::R(double _r) { if(_r>1) _r=1; return (r=_r); } double ColorClass::G(double _g) { if(_g>1) _g=1; return (g=_g); } double ColorClass::B(double _b) { if(_b>1) _b=1; return (b=_b); } achilles-2/color.h0100644000175000001440000000175207226463024013004 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef COLOR_H_85679 #define COLOR_H_85679 class ColorClass { private: double r,g,b; public: ColorClass(); ColorClass(double,double,double); ~ColorClass(); double R(); double G(); double B(); double R(double); double G(double); double B(double); }; #endif achilles-2/conf.h0100644000175000001440000000015207226463024012604 0ustar mrdusers#ifndef __CONF_H__53894 #define __CONF_H__53894 #ifdef HAVE_CONFIG_H #include"config.h" #endif #endif achilles-2/config/0042755000175000001440000000000007226463114012762 5ustar mrdusersachilles-2/config/install-sh0100740000175000001440000001272007174726150014761 0ustar mrdusers#!/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 achilles-2/config/mkinstalldirs0100740000175000001440000000133307174726154015565 0ustar mrdusers#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id: mkinstalldirs,v 1.1 2000/03/23 03:23:41 robflynn 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 achilles-2/config/missing0100740000175000001440000001420207174726157014360 0ustar mrdusers#! /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 achilles-2/config.guess0100755000175000001440000011237607332575665014057 0ustar mrdusers#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-07-19' # 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 . # Please send patches to . # # 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 build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi dummy=dummy-$$ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int dummy(){}" > $dummy.c ; for c in cc gcc c89 ; do ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; if test $? = 0 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; rm -f $dummy.c $dummy.o $dummy.rel ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) 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 # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # Netbsd (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # Determine the machine/vendor (is the vendor relevant). case "${UNAME_MACHINE}" in amiga) machine=m68k-unknown ;; arm32) machine=arm-unknown ;; atari*) machine=m68k-atari ;; sun3*) machine=m68k-sun ;; mac68k) machine=m68k-apple ;; macppc) machine=powerpc-apple ;; hp3[0-9][05]) machine=m68k-hp ;; ibmrt|romp-ibm) machine=romp-ibm ;; *) machine=${UNAME_MACHINE}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE}" in i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit 0 ;; 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 .data \$Lformat: .byte 37,100,45,37,120,10,0 # "%d-%x\n" .text .globl main .align 4 .ent main main: .frame \$30,16,\$26,0 ldgp \$29,0(\$27) .prologue 1 .long 0x47e03d80 # implver \$0 lda \$2,-1 .long 0x47e20c21 # amask \$2,\$1 lda \$16,\$Lformat mov \$0,\$17 not \$1,\$18 jsr \$26,printf ldgp \$29,0(\$26) mov 0,\$16 jsr \$26,exit .end main EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null if test "$?" = 0 ; then case `./$dummy` in 0-0) UNAME_MACHINE="alpha" ;; 1-0) UNAME_MACHINE="alphaev5" ;; 1-1) UNAME_MACHINE="alphaev56" ;; 1-101) UNAME_MACHINE="alphapca56" ;; 2-303) UNAME_MACHINE="alphaev6" ;; 2-307) UNAME_MACHINE="alphaev67" ;; 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-unknown-sysv4 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 ;; *:OS/390:*:*) echo i370-ibm-openedition exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; SR2?01:HI-UX/MPP:*:* | SR8000: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*: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*:OpenBSD:*:*) echo m68k-unknown-openbsd${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 ;; 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 #include /* for printf() prototype */ 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 eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy \ && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax 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 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${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 ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 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 eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${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=${UNAME_VERSION}.${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 BSD 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:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) case "${HPUX_REV}" in 11.[0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; esac ;; esac fi ;; esac if [ "${HP_ARCH}" = "" ]; then sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #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 eval $set_cc_for_build (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi rm -f $dummy.c $dummy fi ;; esac echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-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 eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $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:*:* | *3000*: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} | sed -e 's/\.[^.]*$/.X/' 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/ \ -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3D:*:*:*) echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY-2:*:*:*) echo cray2-cray-unicos exit 0 ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/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:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`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*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 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 ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit 0 ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in big) echo mips-unknown-linux-gnu && exit 0 ;; little) echo mipsel-unknown-linux-gnu && exit 0 ;; esac ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit 0 ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit 0 ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev67 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit 0 ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit 0 ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit 0 ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit 0 ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit 0 ;; i*86:Linux:*:*) # 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_supported_targets=`cd /; ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit 0 ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit 0 ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit 0 ;; esac # Determine whether the default compiler is a.out or elf cat >$dummy.c < #ifdef __cplusplus #include /* for printf() prototype */ 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-pc-linux-gnu\n", argv[1]); # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif # else printf ("%s-pc-linux-gnulibc1\n", argv[1]); # endif #else printf ("%s-pc-linux-gnuaout\n", argv[1]); #endif return 0; } EOF eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 rm -f $dummy.c $dummy test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 ;; i*86:DYNIX/ptx:4*:*) # 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. 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.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; i*86:*:5:[78]*) case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 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 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit 0 ;; pc:*:*:*) # Left here for compatibility: # 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]??A:*: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.*:* | m68*:LynxOS:3.0*:*) 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]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-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 ;; *:Darwin:*:*) echo `uname -p`-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) if test "${UNAME_MACHINE}" = "x86pc"; then UNAME_MACHINE=pc fi echo `uname -p`-${UNAME_MACHINE}-nto-qnx exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[KW]:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit 0 ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit 0 ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit 0 ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit 0 ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit 0 ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit 0 ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit 0 ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit 0 ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit 0 ;; *:ITS:*:*) echo pdp10-unknown-its 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) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # 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 eval $set_cc_for_build $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $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 cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: achilles-2/config.h.in0100644000175000001440000000365007332607016013536 0ustar mrdusers/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ /* Define to empty if the keyword does not work. */ #undef const /* Define if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define if you have the header file. */ #undef HAVE_GL_GL_H /* Define if you have the header file. */ #undef HAVE_GL_GLU_H /* Define if you have the header file. */ #undef HAVE_SDL_H /* Define if you have the header file. */ #undef HAVE_SDL_SDL_H /* Define if you have the header file. */ #undef HAVE_LIMITS_H /* Define if you have the GL library (-lGL). */ #undef HAVE_LIBGL /* Define if you have the GLU library (-lGLU). */ #undef HAVE_LIBGLU /* Define if you have the SDL library (-lSDL). */ #undef HAVE_LIBSDL /* Define if you have the X11 library (-lX11). */ #undef HAVE_LIBX11 /* Define if you have the Xi library (-lXi). */ #undef HAVE_LIBXI /* Define if you have the Xmu library (-lXmu). */ #undef HAVE_LIBXMU /* Define if you have the Xv library (-lXv). */ #undef HAVE_LIBXV /* Define if you have the Xxf86dga library (-lXxf86dga). */ #undef HAVE_LIBXXF86DGA /* Define if you have the Xxf86vm library (-lXxf86vm). */ #undef HAVE_LIBXXF86VM /* Define if you have the glu32 library (-lglu32). */ #undef HAVE_LIBGLU32 /* Define if you have the m library (-lm). */ #undef HAVE_LIBM /* Define if you have the opengl32 library (-lopengl32). */ #undef HAVE_LIBOPENGL32 /* Define if you have the png library (-lpng). */ #undef HAVE_LIBPNG /* Define if you have the posix4 library (-lposix4). */ #undef HAVE_LIBPOSIX4 /* Define if you have the pthread library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define if you have the z library (-lz). */ #undef HAVE_LIBZ /* Name of package */ #undef PACKAGE /* Version number of package */ #undef VERSION achilles-2/config.sub0100755000175000001440000006630507332575665013522 0ustar mrdusers#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. timestamp='2001-06-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 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. # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit 0 ;; --version | -v ) echo "$version" ; exit 0 ;; --help | --h* | -h ) echo "$usage"; exit 0 ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit 0;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ | pyramid | mn10200 | mn10300 | tron | a29k \ | 580 | i960 | h8300 \ | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ | we32k | ns16k | clipper | i370 | sh | sh[34] \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ | v850 | c4x \ | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ | pj | pjl | h8500 | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. # FIXME: clean up the formatting here. vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | xmp-* | ymp-* \ | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ | hppa2.0n-* | hppa64-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ | mipstx39-* | mipstx39el-* | mcore-* \ | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ | [cjt]90-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) ;; # 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-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; 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 ;; [cjt]90) basic_machine=${basic_machine}-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; 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 ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; 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 ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; 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 ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=t3e-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; 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 ;; windows32) basic_machine=i386-pc os=-windows32-msvcrt ;; 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 ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh3 | sh4) basic_machine=sh-unknown ;; sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; c4x*) basic_machine=c4x-none os=-coff ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto*) os=-nto-qnx ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -macos* | -mpw* | -magic* | -mmixware* | -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|'` ;; -opened*) os=-openedition ;; -wince*) os=-wince ;; -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 ;; -nsk*) os=-nsk ;; # 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[0-9]* | -*MiNT | -MiNT[0-9]*) 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*-rebel) os=-linux ;; arm*-semi) os=-aout ;; pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; *-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 ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; -vxsim* | -vxworks*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: achilles-2/configure0100755000175000001440000027577207332607017013443 0ustar mrdusers#! /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 --with-x use the X Window System" # 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=hebbian.cc # 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 config $srcdir/config; 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 config $srcdir/config" 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. # 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:561: 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:614: 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:671: 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=achilles VERSION=0.0.5 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:717: 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:730: 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:743: 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:756: 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:769: 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 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:788: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$ac_prog" break fi done IFS="$ac_save_ifs" fi fi CXX="$ac_cv_prog_CXX" if test -n "$CXX"; then echo "$ac_t""$CXX" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$CXX" && break done test -n "$CXX" || CXX="gcc" echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo "configure:820: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 ac_ext=C # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cxx_cross cat > conftest.$ac_ext << EOF #line 831 "configure" #include "confdefs.h" int main(){return(0);} EOF if { (eval echo configure:836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cxx_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_cxx_cross=no else ac_cv_prog_cxx_cross=yes fi else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 ac_cv_prog_cxx_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_cxx_works" 1>&6 if test $ac_cv_prog_cxx_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 ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo "configure:862: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 cross_compiling=$ac_cv_prog_cxx_cross echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 echo "configure:867: checking whether we are using GNU C++" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+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_gxx=yes else ac_cv_prog_gxx=no fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS="${CXXFLAGS+set}" ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS= echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 echo "configure:895: checking whether ${CXX-g++} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then ac_cv_prog_cxx_g=yes else ac_cv_prog_cxx_g=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS="$ac_save_CXXFLAGS" elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo "configure:928: 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:949: \"$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:966: \"$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:983: \"$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 # If we find X, set shell vars x_includes and x_libraries to the # paths, otherwise set no_x=yes. # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 echo "configure:1012: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then withval="$with_x" : fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then # Both variables are already set. have_x=yes else if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=NO ac_x_libraries=NO rm -fr conftestdir if mkdir conftestdir; then cd conftestdir # Make sure to not put "make" in the Imakefile rules, since we grep it out. cat > Imakefile <<'EOF' acfindx: @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && test -f $ac_im_libdir/libX11.$ac_extension; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case "$ac_im_incroot" in /usr/include) ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; esac case "$ac_im_usrlibdir" in /usr/lib | /lib) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; esac fi cd .. rm -fr conftestdir fi if test "$ac_x_includes" = NO; then # Guess where to find include files, by looking for this one X11 .h file. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" { (eval echo configure:1079: \"$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* # We can compile using X headers with no special include directory. ac_x_includes= else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* # Look for the header file in a standard set of common directories. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in \ /usr/X11/include \ /usr/X11R6/include \ /usr/X11R5/include \ /usr/X11R4/include \ \ /usr/include/X11 \ /usr/include/X11R6 \ /usr/include/X11R5 \ /usr/include/X11R4 \ \ /usr/local/X11/include \ /usr/local/X11R6/include \ /usr/local/X11R5/include \ /usr/local/X11R4/include \ \ /usr/local/include/X11 \ /usr/local/include/X11R6 \ /usr/local/include/X11R5 \ /usr/local/include/X11R4 \ \ /usr/X386/include \ /usr/x386/include \ /usr/XFree86/include/X11 \ \ /usr/include \ /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ /usr/local/x11r5/include \ /usr/lpp/Xamples/include \ \ /usr/openwin/include \ /usr/openwin/share/include \ ; \ do if test -r "$ac_dir/$x_direct_test_include"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest* fi # $ac_x_includes = NO if test "$ac_x_libraries" = NO; then # Check for the libraries. test -z "$x_direct_test_library" && x_direct_test_library=Xt test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. ac_x_libraries= else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* LIBS="$ac_save_LIBS" # First see if replacing the include by lib works. # Check X11 before X11Rn because it is often a symlink to the current release. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ /usr/X11/lib \ /usr/X11R6/lib \ /usr/X11R5/lib \ /usr/X11R4/lib \ \ /usr/lib/X11 \ /usr/lib/X11R6 \ /usr/lib/X11R5 \ /usr/lib/X11R4 \ \ /usr/local/X11/lib \ /usr/local/X11R6/lib \ /usr/local/X11R5/lib \ /usr/local/X11R4/lib \ \ /usr/local/lib/X11 \ /usr/local/lib/X11R6 \ /usr/local/lib/X11R5 \ /usr/local/lib/X11R4 \ \ /usr/X386/lib \ /usr/x386/lib \ /usr/XFree86/lib/X11 \ \ /usr/lib \ /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ /usr/local/x11r5/lib \ /usr/lpp/Xamples/lib \ /lib/usr/lib/X11 \ \ /usr/openwin/lib \ /usr/openwin/share/lib \ ; \ do for ac_extension in a so sl; do if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f conftest* fi # $ac_x_libraries = NO if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then # Didn't find X anywhere. Cache the known absence of X. ac_cv_have_x="have_x=no" else # Record where we found X for the cache. ac_cv_have_x="have_x=yes \ ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" fi fi fi eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then echo "$ac_t""$have_x" 1>&6 no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes \ ac_x_includes=$x_includes ac_x_libraries=$x_libraries" echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. cat >> confdefs.h <<\EOF #define X_DISPLAY_MISSING 1 EOF X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 echo "configure:1261: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_nospace=no fi rm -f conftest* if test $ac_R_nospace = yes; then echo "$ac_t""no" 1>&6 X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_R_space=no fi rm -f conftest* if test $ac_R_space = yes; then echo "$ac_t""yes" 1>&6 X_LIBS="$X_LIBS -R $x_libraries" else echo "$ac_t""neither works" 1>&6 fi fi LIBS="$ac_xsave_LIBS" esac fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 echo "configure:1326: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" else echo "$ac_t""no" 1>&6 fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 echo "configure:1367: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" else echo "$ac_t""no" 1>&6 fi fi # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 echo "configure:1415: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+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 gethostbyname(); 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_gethostbyname) || defined (__stub___gethostbyname) choke me #else gethostbyname(); #endif ; return 0; } EOF if { (eval echo configure:1443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_gethostbyname=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo "configure:1464: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" else echo "$ac_t""no" 1>&6 fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says simon@lia.di.epfl.ch: it contains # gethostby* variants that don't use the nameserver (or something). # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 echo "configure:1513: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+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 connect(); 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_connect) || defined (__stub___connect) choke me #else connect(); #endif ; return 0; } EOF if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_connect=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 echo "configure:1562: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" else echo "$ac_t""no" 1>&6 fi fi # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 echo "configure:1605: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+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 remove(); 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_remove) || defined (__stub___remove) choke me #else remove(); #endif ; return 0; } EOF if { (eval echo configure:1633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_remove=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 echo "configure:1654: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" else echo "$ac_t""no" 1>&6 fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 echo "configure:1697: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+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 shmat(); 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_shmat) || defined (__stub___shmat) choke me #else shmat(); #endif ; return 0; } EOF if { (eval echo configure:1725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_shmat=no" fi rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then echo "$ac_t""yes" 1>&6 : else echo "$ac_t""no" 1>&6 fi if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 echo "configure:1746: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" else echo "$ac_t""no" 1>&6 fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS="$LDFLAGS" test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 echo "configure:1798: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" else echo "$ac_t""no" 1>&6 fi LDFLAGS="$ac_save_LDFLAGS" fi LIBS=$X_LIBS echo $ac_n "checking for main in -lposix4""... $ac_c" 1>&6 echo "configure:1844: checking for main in -lposix4" >&5 ac_lib_var=`echo posix4'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lposix4 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo posix4 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "configure: warning: If this is Solaris, you need libposix4" 1>&2 fi echo $ac_n "checking for main in -lz""... $ac_c" 1>&6 echo "configure:1888: checking for main in -lz" >&5 ac_lib_var=`echo z'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo z | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 echo "configure:1931: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lpng""... $ac_c" 1>&6 echo "configure:1974: checking for main in -lpng" >&5 ac_lib_var=`echo png'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpng $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 echo "configure:2017: checking for main in -lpthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6 echo "configure:2060: checking for main in -lX11" >&5 ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo X11 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lXi""... $ac_c" 1>&6 echo "configure:2103: checking for main in -lXi" >&5 ac_lib_var=`echo Xi'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo Xi | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for main in -lXmu""... $ac_c" 1>&6 echo "configure:2146: checking for main in -lXmu" >&5 ac_lib_var=`echo Xmu'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXmu $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo Xmu | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for glEnable in -lopengl32""... $ac_c" 1>&6 echo "configure:2189: checking for glEnable in -lopengl32" >&5 ac_lib_var=`echo opengl32'_'glEnable | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lopengl32 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo opengl32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "configure: warning: If this is Win32, you need opengl32" 1>&2 fi echo $ac_n "checking for gluPerspective in -lglu32""... $ac_c" 1>&6 echo "configure:2237: checking for gluPerspective in -lglu32" >&5 ac_lib_var=`echo glu32'_'gluPerspective | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lglu32 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo glu32 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "configure: warning: If this is Win32, you need glu32" 1>&2 fi echo $ac_n "checking for glEnable in -lGL""... $ac_c" 1>&6 echo "configure:2285: checking for glEnable in -lGL" >&5 ac_lib_var=`echo GL'_'glEnable | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lGL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo GL | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "configure: warning: If this is Linux, you need libGL" 1>&2 fi echo $ac_n "checking for gluPerspective in -lGLU""... $ac_c" 1>&6 echo "configure:2333: checking for gluPerspective in -lGLU" >&5 ac_lib_var=`echo GLU'_'gluPerspective | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lGLU $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo GLU | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 echo "configure: warning: If this is Linux, you need libGLU" 1>&2 fi echo $ac_n "checking for XDGAOpenFramebuffer in -lXxf86dga""... $ac_c" 1>&6 echo "configure:2381: checking for XDGAOpenFramebuffer in -lXxf86dga" >&5 ac_lib_var=`echo Xxf86dga'_'XDGAOpenFramebuffer | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXxf86dga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo Xxf86dga | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for XF86VidModeQueryVersion in -lXxf86vm""... $ac_c" 1>&6 echo "configure:2428: checking for XF86VidModeQueryVersion in -lXxf86vm" >&5 ac_lib_var=`echo Xxf86vm'_'XF86VidModeQueryVersion | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXxf86vm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo Xxf86vm | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for XvQueryExtension in -lXv""... $ac_c" 1>&6 echo "configure:2475: checking for XvQueryExtension in -lXv" >&5 ac_lib_var=`echo Xv'_'XvQueryExtension | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lXv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo Xv | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for SDL_SetVideoMode in -lSDL""... $ac_c" 1>&6 echo "configure:2522: checking for SDL_SetVideoMode in -lSDL" >&5 ac_lib_var=`echo SDL'_'SDL_SetVideoMode | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" LIBS="-lSDL $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* LIBS="$ac_save_LIBS" fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_lib=HAVE_LIB`echo SDL | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <&6 fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo "configure:2570: 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:2583: \"$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:2650: \"$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 GL/gl.h GL/glu.h SDL/SDL.h SDL.h limits.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo "configure:2677: 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:2687: \"$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 echo $ac_n "checking for working const""... $ac_c" 1>&6 echo "configure:2715: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } ; return 0; } EOF if { (eval echo configure:2769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=no fi rm -f conftest* fi echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF #define const EOF fi trap '' 1 2 15 cat > 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 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%@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%@CXX@%$CXX%g s%@CPP@%$CPP%g s%@X_CFLAGS@%$X_CFLAGS%g s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%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 > 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 achilles-2/configure.in0100644000175000001440000000253707332607012014023 0ustar mrdusersdnl Process this file with autoconf to produce a configure script. AC_INIT(hebbian.cc) AC_CONFIG_AUX_DIR(config) AM_CONFIG_HEADER(config.h) AM_INIT_AUTOMAKE(achilles,0.0.5) dnl Checks for programs. AC_PROG_CXX dnl AM_PROG_LIBTOOL AC_PATH_XTRA LIBS=$X_LIBS dnl LIBS='-L/usr/X11R6/lib' dnl Checks for libraries. (some are for various platforms and expected to fail) AC_CHECK_LIB(posix4, main,, [AC_MSG_WARN([If this is Solaris, you need libposix4])]) AC_CHECK_LIB(z, main) AC_CHECK_LIB(m, main) AC_CHECK_LIB(png, main) AC_CHECK_LIB(pthread, main) AC_CHECK_LIB(X11, main) AC_CHECK_LIB(Xi, main) AC_CHECK_LIB(Xmu, main) AC_CHECK_LIB(opengl32,glEnable,, [AC_MSG_WARN([If this is Win32, you need opengl32])]) AC_CHECK_LIB(glu32,gluPerspective,, [AC_MSG_WARN([If this is Win32, you need glu32])]) AC_CHECK_LIB(GL,glEnable,,[AC_MSG_WARN([If this is Linux, you need libGL])]) AC_CHECK_LIB(GLU,gluPerspective,,[AC_MSG_WARN([If this is Linux, you need libGLU])]) AC_CHECK_LIB(Xxf86dga, XDGAOpenFramebuffer) AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion) AC_CHECK_LIB(Xv, XvQueryExtension) AC_CHECK_LIB(SDL, SDL_SetVideoMode) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(GL/gl.h GL/glu.h SDL/SDL.h SDL.h limits.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_SUBST(PACKAGE) AC_OUTPUT(Makefile) achilles-2/defines.h0100644000175000001440000000542707332607100013277 0ustar mrdusers#ifndef DEFINES_H_98456 #define DEFINES_H_98456 #include #include"conf.h" #ifdef HAVE_LIBPNG #define PNG_SCREENSHOT #endif #define ACHILLES_VERSION 2 #define USER_SPEED 0.2 #define SCREEN_W 640 #define SCREEN_H 480 #define MISCEGENATION_RATE 0.05 #define DECAY_SPAN 100 #define ENERGY_LOSS_PER_TICK 0.008 #define DAMAGE_PER_HIT 10 #define ENERGY_PER_DAMAGE 0.2 #define ORGANISM_LIVE 0 #define ORGANISM_FOOD 1 #define FIGHT_THRESHOLD 10000 #define REPRODUCTION_THRESHOLD 1 //#define LEARNING_CONSTANT 0.5 #define ALPHA_COEFFICIENT -1 #define EVO_FLOOR_Y 0 //#define FLOOR_BLOCKS_X 4 //#define FLOOR_BLOCKS_Z 4 #define FLOOR_QUAD_SIZE 4 #define WORLD_X (FLOOR_BLOCKS_X-1)*FLOOR_QUAD_SIZE #define WORLD_Y 1000 #define WORLD_Z (FLOOR_BLOCKS_Z-1)*FLOOR_QUAD_SIZE struct GeneLimitStruct { long min,max; }; #define NUM_GENES 17 #define GENE_SIZE_X 0 #define GENE_SIZE_Y 1 #define GENE_SIZE_Z 2 #define GENE_STRENGTH 3 #define GENE_MAXSPEED 4 #define GENE_COLOR 5 #define GENE_MUTATE_RATE 6 #define GENE_LIFESPAN 7 #define GENE_ENERGY_TO_OFFSPRING 8 #define GENE_NUM_NEURODES 9 #define GENE_NUM_LAYERS 10 #define GENE_NUM_INPUTS 11 #define GENE_NUM_OUTPUTS 12 #define GENE_TOPO_DIST 13 #define GENE_REACH 14 #define GENE_METABOLISM 15 #define GENE_LC 16 #define MAX_VOLUME 100 #define MIN_VOLUME 1 #define MIN_SIDE_LEN 1 #define MAX_SIDE_LEN 5 #define MIN_STRENGTH 1 #define MAX_STRENGTH 256 // scaled of course #define MIN_MAXSPEED 1 #define MAX_MAXSPEED 256 #define MIN_COLOR 0 #define MAX_COLOR 255 #define MIN_MUTATE_RATE 1 #define MAX_MUTATE_RATE 256 #define MIN_LIFESPAN 1000 #define MAX_LIFESPAN 100000 #define MIN_NUM_NEURODES 10 #define MAX_NUM_NEURODES 500 #define MIN_NUM_LAYERS 3 #define MAX_NUM_LAYERS 150 #define MIN_NUM_INPUTS 10 #define MAX_NUM_INPUTS 50 #define MIN_NUM_OUTPUTS 10 #define MAX_NUM_OUTPUTS 50 #define MIN_TOPO_DIST 0 #define MAX_TOPO_DIST 100 #define MIN_ECAP 1 #define MAX_ECAP 256 #define MIN_REACH 4 #define MAX_REACH 8 #define MIN_METABOLISM 1 #define MAX_METABOLISM 100 #define MIN_LC 1 #define MAX_LC 100 const GeneLimitStruct GeneLimits[]={ { MIN_SIDE_LEN, MAX_SIDE_LEN }, { MIN_SIDE_LEN, MAX_SIDE_LEN }, { MIN_SIDE_LEN, MAX_SIDE_LEN }, { MIN_STRENGTH, MAX_STRENGTH }, { MIN_MAXSPEED, MAX_MAXSPEED }, { MIN_COLOR, MAX_COLOR }, { MIN_MUTATE_RATE, MAX_MUTATE_RATE }, { MIN_LIFESPAN, MAX_LIFESPAN }, { MIN_ECAP, MAX_ECAP }, { MIN_NUM_NEURODES, MAX_NUM_NEURODES }, { MIN_NUM_LAYERS, MAX_NUM_LAYERS }, { MIN_NUM_INPUTS, MAX_NUM_INPUTS }, { MIN_NUM_OUTPUTS, MAX_NUM_INPUTS }, { MIN_TOPO_DIST, MAX_TOPO_DIST }, { MIN_REACH, MAX_REACH }, { MIN_METABOLISM, MAX_METABOLISM }, { MIN_LC, MAX_LC } }; #define SCALE(x,a,b,c,d) long(double(d - c)/double(b - a) * double(x) + double(c - a)) #define MY_PI 3.14159265358979323846 #endif achilles-2/energy.cc0100644000175000001440000000426307226463024013315 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"energy.h" #include"vector.h" #include"defines.h" #include #include EnergyClass::EnergyClass() : food(0), health(0), fcap(0), hcap(0) {} EnergyClass::EnergyClass(VectorClass &s) : food(0), health(MIN_ECAP + (s.X() * s.Y() * s.Z() - MIN_VOLUME) * (MAX_ECAP - MIN_ECAP) / (MAX_VOLUME - MIN_VOLUME)), fcap(health), hcap(health) { #ifdef _DEBUG printf("HCAP: %f\n",hcap); #endif } EnergyClass::~EnergyClass() {} double EnergyClass::Food() { return food; } double EnergyClass::Health() { return health; } bool EnergyClass::SetCap(VectorClass &s) { hcap = fcap = MIN_ECAP + (s.X() * s.Y() * s.Z() - MIN_VOLUME) * (MAX_ECAP - MIN_ECAP) * (MAX_VOLUME - MIN_VOLUME); if(health > hcap) health = hcap; if(food > fcap) food = fcap; return true; } bool EnergyClass::TakeDamage(double dmg) { health-=dmg; if(health<=0) { health = 0; return false; // dead! } else return true; } bool EnergyClass::UseEnergy(double amt) { if(food-amt < 0) return false; // no can do.. else { food-=amt; return true; } } double EnergyClass::Regen(double meta) { double amt = (hcap-health)/hcap * (fcap-food)/fcap * food * meta; food-=amt; health+=amt; if(health>hcap) health=hcap; if(food<0) food=0; return amt; } bool EnergyClass::EatFood(double f) { food+=f; if(f>fcap) f=fcap; if(f<0) f=0; return true; } double EnergyClass::HealthCap() { return hcap; } double EnergyClass::FoodCap() { return fcap; } achilles-2/energy.h0100644000175000001440000000223607226463024013155 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ENERGY_H_3489564 #define ENERGY_H_3489564 #define ENERGY_PER_UNIT_VOLUME 1 class VectorClass; class EnergyClass { private: double food,health,fcap,hcap; public: EnergyClass(); EnergyClass(VectorClass &); ~EnergyClass(); double Health(); double Food(); bool SetCap(VectorClass &); bool TakeDamage(double); bool UseEnergy(double); double Regen(double); bool EatFood(double); double HealthCap(); double FoodCap(); }; #endif achilles-2/gene.cc0100644000175000001440000000674607332600427012750 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include"gene.h" #include"vector.h" #include #include"braininfo.h" #include"defines.h" #include GeneClass::GeneClass() { // randomly generate one int i; for(i=0;i DNA[0]*DNA[1]*DNA[2] || DNA[0]*DNA[1]*DNA[2] > MAX_VOLUME) return false; for(i=0;i DNA[i] || DNA[i] > GeneLimits[i].max) return false; } return true; } double GeneClass::Color() { return(double(DNA[GENE_COLOR]) / MAX_COLOR); } double GeneClass::MaxSpeed() { return(double(DNA[GENE_MAXSPEED]) / MAX_MAXSPEED); } double GeneClass::GetEnergyPcnt() { return(double(DNA[GENE_ENERGY_TO_OFFSPRING]) / MAX_ECAP); } double GeneClass::Metabolism() { return(double(DNA[GENE_METABOLISM]) / MAX_METABOLISM); } long GeneClass::Reach() { return(DNA[GENE_REACH]); } long GeneClass::Lifespan() { return(DNA[GENE_LIFESPAN]); } double GeneClass::GetStrength() { return(DNA[GENE_STRENGTH] * 2.0 / MAX_STRENGTH); } bool GeneClass::MakeViable() { int i,j; double tmp; do { j=0; for(i=0;i<3;i++) { if(DNA[i] < MIN_SIDE_LEN) DNA[i]=MIN_SIDE_LEN; if(DNA[i] > DNA[j]) j = i; } tmp = DNA[0] * DNA[1] * DNA[2]; } while(tmp > MAX_VOLUME && (DNA[j]=long(double(DNA[j])*double(MAX_VOLUME/tmp)))); for(i=0;i #include"vector.h" #include"braininfo.h" class GeneClass { private: vector DNA; public: GeneClass(); GeneClass(GeneClass &,GeneClass &); ~GeneClass(); VectorClass Size(); BrainInfoClass Brain(); bool IsViable(); bool MakeViable(); double Color(); double MaxSpeed(); double GetEnergyPcnt(); double Metabolism(); long Reach(); double GetStrength(); double Variance(GeneClass &); long Lifespan(); double MutationRate(); double LC(); }; #endif achilles-2/hebbian.cc0100644000175000001440000001303107332600427013403 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // Hebbian neural network simulator // This is a stand-alone class btw :) using namespace std; #include #include #include #include #include #include #include #include"hebbian.h" // Constructor for Class NeuralNet // Creates a neural network with n inner neurodes, n_layers layers, // ins number of inputs neurodes, and outs number of output neurodes // td is the topological distortion factor, the chance that a given // input to a given neurode will be randomly mapped // if it is 1, all inputs will be randomly mapped, if it is 0, no inputs // will be randomly mapped. NeuralNet::NeuralNet(int n,int n_layers,int ins,int outs,float _td) { int remainder=n % n_layers; n+=(n_layers-remainder); inner=new Neurode[n]; input=new float[ins]; output=new Neurode[outs]; layers=n_layers; num_inner=n; num_out=outs; num_in=ins; num_per_layer=n/n_layers; td=_td; int i,j; for(i=0;i &list) { if((signed int)list.size()!=num_in) return 0; for(int i=0;i &list) { for(int i=0;inum_inner=num_inner; nn->num_layers=layers; nn->num_input=num_in; nn->td=td; return nn; } */ /* TEST */ /* int main(int argc, char *argv[]) { NeuralNet nn(10,3,3,3,1.0); float *tmp; int i,active=1; short random_inputs=0; while(active) { tmp=new float[nn.NumInputs()]; for(i=0;i> tmp[i]; } getchar(); } if(!nn.SetInputs(tmp,nn.NumInputs())) { cout << "Error with SetInput()" << endl; return 1; } delete tmp; if(!nn.RunNet()) { cout << "Error with RunNet()" << endl; return 1; } tmp=new float[nn.NumOutputs()]; if(!nn.GetOutputs(tmp,nn.NumOutputs())) { cout << "Error with GetOutputs()" << endl; return 1; } for(i=0;i struct NeuralNetStruct; struct Neurode { float *weights; int *inputs; int num_inputs; float output; }; class NeuralNet { private: Neurode *inner,*output; float *input,td; int layers,num_inner,num_out,num_in,num_per_layer; public: NeuralNet(int,int,int,int,float); ~NeuralNet(); int RunNet(); float RunNeurode(int); int NumInputs(); int SetInputs(vector &); int NumOutputs(); int GetOutputs(vector &); int Learn(float,float); NeuralNetStruct *NewNeuralNetStruct(); }; #endif achilles-2/id.cc0100644000175000001440000000217107226463024012414 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"id.h" #include IdClass::IdClass(IdToken &token) : timestamp(token.timestamp), mod(token.mod) {} IdClass::~IdClass() {} bool IdClass::String(char *s) { sprintf(s,"%ld.%d",timestamp,mod); return true; } bool IdClass::operator ==(IdClass &i) { if(i.timestamp == timestamp && i.mod == mod) return true; else return false; } bool IdClass::operator !=(IdClass &i) { return !(*this == i); } achilles-2/id.h0100644000175000001440000000176507226463024012266 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ID_H_348346 #define ID_H_348346 struct IdToken { long timestamp; short mod; }; class IdClass { private: long timestamp; short mod; public: IdClass(IdToken &); ~IdClass(); bool String(char *); bool operator ==(IdClass &); bool operator !=(IdClass &); }; #endif achilles-2/idserver.cc0100644000175000001440000000223507226463024013644 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"idserver.h" #include"id.h" #include IdServerClass::IdServerClass() : last_timestamp(0), last_mod(0) {} IdServerClass::~IdServerClass() {} IdToken *IdServerClass::GetToken() { IdToken *token=new IdToken; token->timestamp=time(NULL); token->mod=0; if(token->timestamp == last_timestamp) token->mod = last_mod+1; else last_mod = 0; last_timestamp = token->timestamp; last_mod = token->mod; return token; } achilles-2/idserver.h0100644000175000001440000000166207226463024013511 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef IDSERVER_H_34845 #define IDSERVER_H_34845 struct IdToken; class IdServerClass { private: long last_timestamp; short last_mod; public: IdServerClass(); ~IdServerClass(); IdToken *GetToken(); }; #endif achilles-2/license.cc0100640000175000001440000000073607305567700013447 0ustar mrdusers#include #include"defines.h" bool ShowLicense() { cout << "Achilles " << ACHILLES_VERSION << ", Copyright (C) 2000 Matthew Danish" << endl; cout << "Achilles comes with ABSOLUTELY NO WARRANTY; for details" << endl; cout << "read the included file 'COPYING'. This is free software, and" << endl; cout << "you are welcome to redistribute it under certain conditions," << endl; cout << "read the file 'COPYING' for information." << endl; return true; } achilles-2/main.cc0100644000175000001440000000502607332600427012744 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include #include #include"universe.h" #include #include #include"defines.h" int FLOOR_BLOCKS_X=6; int FLOOR_BLOCKS_Z=6; int NUM_ORGANISMS=3; int NUM_FOOD=3; bool ShowLicense(); bool ShowUsage(char *); bool ShowUsage(char *pn) { printf("Usage: %s [ -x | -z | | -v | -h]\n",pn); printf("\n-v prints the version.\n-h prints this help.\nRest are self explanatory.\nKeys\n~~~~\nYou start off in the middle of the \"world\"\nThe arrow keys move you around, up and down are forward and back,\nand right and left will turn you with respect to the y axis.\nPageUp moves you up the y axis and PageDown moves you down it.\nESC quits.\n"); printf("Defaults are: \n-x %d\n-z %d\n-f %d\nand initial creatures: %d\n",FLOOR_BLOCKS_X,FLOOR_BLOCKS_Z,NUM_FOOD,NUM_ORGANISMS); return true; } int main(int argc, char *argv[]) { srand(time(NULL)); int i; ShowLicense(); cout << endl << endl; for(i=1;iMainLoop(); delete univ; return 0; } achilles-2/opengl.cc0100644000175000001440000002003207332600427013276 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include"opengl.h" #include #include //#include #include #include #include"org.h" #include"vector.h" #include"gene.h" #include"defines.h" #include"universe.h" extern int FLOOR_BLOCKS_Z,FLOOR_BLOCKS_X,NUM_FOOD,NUM_ORGANISMS; OpenGLClass::OpenGLClass(int argc, char **argv) { if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) { fprintf(stderr, "Unable to initialize SDL: %s\n", SDL_GetError()); exit(1); } if ( (surface=SDL_SetVideoMode(SCREEN_W, SCREEN_H, 0, SDL_OPENGL)) == NULL ) { fprintf(stderr, "Unable to create OpenGL screen: %s\n", SDL_GetError()); SDL_Quit(); exit(2); } SDL_WM_SetCaption("Achilles", NULL); InitGL(SCREEN_W,SCREEN_H); } bool OpenGLClass::InitGL(int W,int H) { GLfloat LightAmbient[]= { 0.2f, 0.2f, 0.2f, 1.0f }; GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f }; GLfloat LightPosition[]= { 0.0f, 0.0f, 2.0f, 1.0f }; glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_DECAL); glEnable(GL_TEXTURE_2D); glViewport(0, 0, W, H); glClearColor(0.0f, 0.0f, 0.0f, 0.0f); glClearDepth(1.0); glDepthFunc(GL_LESS); glEnable(GL_DEPTH_TEST); glEnable(GL_NORMALIZE); glShadeModel(GL_SMOOTH); glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f,(GLfloat)W/(GLfloat)H,0.1f,100.0f); glMatrixMode(GL_MODELVIEW); glLightfv(GL_LIGHT1, GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT1, GL_DIFFUSE, LightDiffuse); glLightfv(GL_LIGHT1, GL_POSITION,LightPosition); glEnable(GL_LIGHT1); glEnable(GL_LIGHTING); glEnable(GL_COLOR_MATERIAL); return true; } OpenGLClass::~OpenGLClass() { SDL_Quit(); } bool OpenGLClass::Clear() { glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); return true; } bool OpenGLClass::SwapBuffers() { SDL_GL_SwapBuffers(); return true; } bool OpenGLClass::Transform(double xpos,double ypos,double zpos,double yrot) { GLfloat transmatrix[16]={1,0,0,0, 0,1,0,0, 0,0,1,0, -xpos,-ypos,-zpos,1}; glLoadIdentity(); glRotatef(360.0-yrot,0,1,0); glMultMatrixf(transmatrix); return true; } bool OpenGLClass::DrawLandscape(double xsize,double ysize,double zsize) { int u,v; glPushMatrix(); glColor3f(0.0,0.5,0.0); glNormal3f(0.0,1.0,0.0); for(u=-FLOOR_BLOCKS_Z/2-1;u<=FLOOR_BLOCKS_Z/2;u++) { glBegin(GL_QUAD_STRIP); for(v=(int)-FLOOR_BLOCKS_X/2-1;v<=FLOOR_BLOCKS_X/2;v++) { glVertex3f(v*FLOOR_QUAD_SIZE,EVO_FLOOR_Y,(u+1)*FLOOR_QUAD_SIZE); glVertex3f(v*FLOOR_QUAD_SIZE,EVO_FLOOR_Y,(u)*FLOOR_QUAD_SIZE); } glEnd(); } glPopMatrix(); return true; } bool OpenGLClass::DrawOrganism(OrganismClass *o) { double w=o->Size().X(),h=o->Size().Y(),d=o->Size().Z(); #ifdef _DEBUG cout << "OGL Pos: " << o->Pos().X() << " "; cout << o->Pos().Y() << " "; cout << o->Pos().Z() << endl; #endif glPushMatrix(); glTranslated(o->Pos().X(),o->Pos().Y()+h/2,o->Pos().Z()); glRotated(o->Heading().Angle(),0,1,0); glColor3d(o->Color().R(),o->Color().G(),o->Color().B()); /* glBegin(GL_QUADS); // top glNormal3f(0,1,0); glTexCoord2f(0,0); glVertex3f( -w/2, h/2, d/2); glTexCoord2f(0,1); glVertex3f( -w/2, h/2, -d/2); glTexCoord2f(1,1); glVertex3f( w/2, h/2, -d/2); glTexCoord2f(1,0); glVertex3f( w/2, h/2, d/2); // front glNormal3f(0,0,1); glTexCoord2f(0,1); glVertex3f( -w/2, h/2, d/2); glTexCoord2f(1,1); glVertex3f( w/2,h/2, d/2); glTexCoord2f(1,0); glVertex3f(w/2,-h/2, d/2); glTexCoord2f(0,0); glVertex3f(-w/2,-h/2, d/2); // back glNormal3f(0,0,-1); glTexCoord2f(0,1); glVertex3f( w/2, h/2, -d/2); glTexCoord2f(1,1); glVertex3f(-w/2,h/2,-d/2); glTexCoord2f(1,0); glVertex3f(-w/2,-h/2, -d/2); glTexCoord2f(0,0); glVertex3f(w/2,-h/2, -d/2); // right glNormal3f(1,0,0); glTexCoord2f(0,1); glVertex3f(w/2,h/2, d/2); glTexCoord2f(1,1); glVertex3f(w/2,h/2,-d/2); glTexCoord2f(1,0); glVertex3f(w/2,-h/2, -d/2); glTexCoord2f(0,0); glVertex3f(w/2,-h/2, d/2); // left glNormal3f(-1,0,0); glTexCoord2f(0,1); glVertex3f(-w/2,h/2,-d/2); glTexCoord2f(1,1); glVertex3f(-w/2,h/2,d/2); glTexCoord2f(1,0); glVertex3f(-w/2,-h/2,d/2); glTexCoord2f(0,0); glVertex3f(-w/2,-h/2,-d/2); // bottom glNormal3f(0,-1,0); glTexCoord2f(0,1); glVertex3f(-w/2,-h/2,d/2); glTexCoord2f(1,1); glVertex3f(w/2,-h/2,d/2); glTexCoord2f(1,0); glVertex3f(w/2,-h/2,-d/2); glTexCoord2f(0,0); glVertex3f(-w/2,-h/2,-d/2); glEnd();*/ glBegin(GL_QUAD_STRIP); glNormal3d(0.0,1.0,0.0); glVertex3d(-w/2,h/2,-d/2); glVertex3d(w/2,h/2,-d/2); glVertex3d(-w/2,h/2,d/2); glVertex3d(w/2,h/2,d/2); glNormal3d(0.0,0.0,1.0); glVertex3d(-w/2,-h/2,d/2); glVertex3d(w/2,-h/2,d/2); glNormal3d(0.0,-1.0,0.0); glVertex3d(-w/2,-h/2,-d/2); glVertex3d(w/2,-h/2,-d/2); glEnd(); glBegin(GL_QUAD_STRIP); glNormal3d(1.0,0.0,0.0); glVertex3d(w/2,-h/2,d/2); glVertex3d(w/2,h/2,d/2); glVertex3d(w/2,-h/2,-d/2); glVertex3d(w/2,h/2,-d/2); glNormal3d(0.0,0.0,-1.0); glVertex3d(-w/2,-h/2,-d/2); glVertex3d(-w/2,h/2,-d/2); glNormal3d(-1.0,0.0,0.0); glVertex3d(-w/2,-h/2,d/2); glVertex3d(-w/2,h/2,d/2); glEnd(); glPopMatrix(); return true; } bool OpenGLClass::DrawStack(stack &s) { EventStack es; while(!s.empty()) { es=s.top(); s.pop(); glPushMatrix(); #ifdef _DEBUG cout << "Stack: " << es.a.X() << " "; cout << es.a.Y() << " "; cout << es.a.Z() << endl; #endif glColor3d(es.color.R(),es.color.G(),es.color.B()); glTranslated(es.a.X(),es.a.Y(),es.a.Z()); VectorClass distv = es.b - es.a; glBegin(GL_TRIANGLES); glNormal3d(distv.Z(),0,-distv.X()); glVertex3d(0,-0.25,0); glVertex3d(distv.X(),distv.Y(),distv.Z()); glVertex3d(0,0.25,0); glEnd(); glPopMatrix(); } return true; } bool OpenGLClass::CheckInput(double &xpos,double &ypos,double &zpos,double &yrot, int &done, int &pause) { Uint8 *keys; SDL_Event event; while ( SDL_PollEvent(&event) ) { if ( event.type == SDL_QUIT ) { done = 1; } if ( event.type == SDL_KEYDOWN ) { if ( event.key.keysym.sym == SDLK_ESCAPE ) { done = 1; } } } keys=SDL_GetKeyState(NULL); #define piover180 MY_PI/180 if ( keys[SDLK_UP] == SDL_PRESSED ) { xpos -= (double)sin(yrot*piover180) * USER_SPEED; zpos -= (double)cos(yrot*piover180) * USER_SPEED; } if ( keys[SDLK_DOWN] == SDL_PRESSED ) { xpos += (double)sin(yrot*piover180) * USER_SPEED; zpos += (double)cos(yrot*piover180) * USER_SPEED; } if ( keys[SDLK_LEFT] == SDL_PRESSED ) { yrot += 4.0; } if ( keys[SDLK_RIGHT] == SDL_PRESSED ) { yrot -= 4.0; } if ( keys[SDLK_PAGEUP] == SDL_PRESSED ) { ypos += USER_SPEED; } if ( keys[SDLK_PAGEDOWN] == SDL_PRESSED ) { ypos-= USER_SPEED; } if ( keys[SDLK_p] == SDL_PRESSED ) { if(pause == 0) pause = 2; if(pause == 1) pause = -1; } if ( keys[SDLK_p] != SDL_PRESSED) { if(pause == 2) pause = 1; if(pause == -1) pause = 0; } if ( !took_screenshot && keys[SDLK_s] == SDL_PRESSED) { took_screenshot=1; Screenshot("screenshot.png"); } if ( took_screenshot && keys[SDLK_s] != SDL_PRESSED) { took_screenshot=0; } return true; } bool OpenGLClass::Screenshot(char *filename) { bool PNGScreenShot(char *); return PNGScreenShot(filename); } achilles-2/opengl.h0100644000175000001440000000255007226463024013147 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef OPENGL_H_67548 #define OPENGL_H_67548 #include #include"conf.h" #ifdef HAVE_SDL_SDL_H #include #else #include #endif class OrganismClass; struct EventStack; class OpenGLClass { private: SDL_Surface *surface; bool took_screenshot; public: OpenGLClass(int,char **); ~OpenGLClass(); bool InitGL(int,int); bool DrawLandscape(double,double,double); bool Transform(double,double,double,double); bool DrawOrganism(OrganismClass *); bool SwapBuffers(); bool Clear(); bool DrawStack(stack &); bool CheckInput(double &,double &,double &,double &,int &,int &); bool Screenshot(char *); }; #endif achilles-2/org.cc0100644000175000001440000000554307332600427012613 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include #include"org.h" #include"id.h" #include"energy.h" #include"hebbian.h" #include"defines.h" OrganismClass::OrganismClass(IdToken *token, VectorClass *_position, AngleClass *_heading, GeneClass *_genes) : id(new IdClass(*token)), position(*_position), heading(*_heading), genes(*_genes) { delete token; delete _position; delete _heading; delete _genes; size.X(genes.Size().X()); size.Y(genes.Size().Y()); size.Z(genes.Size().Z()); lifespan = long(double(genes.Lifespan()) * (2 - genes.Metabolism())); energy = new EnergyClass(size); brain = new NeuralNet(genes.Brain().NumNeurodes(), genes.Brain().NumLayers(), genes.Brain().NumInputs(), genes.Brain().NumOutputs(), genes.Brain().TopoDist()); Type(ORGANISM_LIVE); } OrganismClass::~OrganismClass() { delete id; delete energy; delete brain; } IdClass & OrganismClass::Id() { return *id; } VectorClass & OrganismClass::Pos() { return position; } AngleClass & OrganismClass::Heading() { return heading; } NeuralNet & OrganismClass::Brain() { return *brain; } EnergyClass & OrganismClass::Energy() { return *energy; } GeneClass & OrganismClass::Genes() { return genes; } VectorClass & OrganismClass::Size() { return size; } ColorClass & OrganismClass::Color() { return color; } short OrganismClass::Type() { return type; } short OrganismClass::Type(short t) { if(t==ORGANISM_LIVE) { color.R(0); color.G(0); color.B(genes.Color()*3/4 + 1/4); } else if(t==ORGANISM_FOOD) { color.R(1); color.G(1); color.B(0); lifespan = DECAY_SPAN; } else return type; type=t; return type; } bool OrganismClass::Lifetick() { if(type==ORGANISM_LIVE) { // Regenerate some health Energy().Regen(Genes().Metabolism()); if(!--lifespan) { Type(ORGANISM_FOOD); Energy().TakeDamage(Energy().Health()); return false; } if(Energy().TakeDamage(Genes().Metabolism() * ENERGY_LOSS_PER_TICK * Energy().HealthCap())==false) { Type(ORGANISM_FOOD); return false; } } else { if(--lifespan<=0) return false; } return true; } achilles-2/org.h0100644000175000001440000000274307226463024012456 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ORG_H_86534 #define ORG_H_86534 #include"vector.h" #include"angle.h" #include"gene.h" #include"color.h" class NeuralNet; class EnergyClass; class IdClass; struct IdToken; class OrganismClass { private: VectorClass size; NeuralNet *brain; EnergyClass *energy; IdClass *id; VectorClass position; AngleClass heading; GeneClass genes; ColorClass color; short type; long lifespan; public: OrganismClass(IdToken *token,VectorClass *_position,AngleClass *_heading,GeneClass *_genes); ~OrganismClass(); IdClass & Id(); VectorClass & Pos(); AngleClass & Heading(); NeuralNet & Brain(); EnergyClass & Energy(); GeneClass & Genes(); VectorClass & Size(); ColorClass & Color(); bool Lifetick(); short Type(); short Type(short); }; #endif achilles-2/orglist.cc0100644000175000001440000000775207332600427013513 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include #include"orglist.h" #include"id.h" #include"org.h" OrganismListClass::OrganismListClass() { cur=start=end=new OrganismListStruct; cur->next = cur->prev = NULL; } OrganismListClass::~OrganismListClass() { while(start->next) { cur=start->next->next; delete start->next->o; delete start->next; start->next=cur; } delete start; } bool OrganismListClass::IsEmpty() { if(start == end) return true; else return false; } bool OrganismListClass::Append(OrganismClass *o) { while(cur->next) cur=cur->next; cur->next = new OrganismListStruct; if(!cur->next) return false; cur->next->prev = cur; cur = cur->next; cur->next = NULL; end = cur; cur->o = o; return true; } bool OrganismListClass::Prepend(OrganismClass *o) { cur=new OrganismListStruct; if(!cur) { cur=start; return false; } cur->o = o; cur->next = start->next; cur->prev = start; if(cur->next) cur->next->prev = cur; else end = cur; start->next = cur; return true; } OrganismClass *OrganismListClass::First() { if(IsEmpty()) return NULL; return start->next->o; } OrganismClass *OrganismListClass::Last() { if(IsEmpty()) return NULL; return(end->o); } OrganismClass *OrganismListClass::Next() { if(IsEmpty()) return NULL; if(!cur->next) return NULL; cur=cur->next; return(cur->o); } OrganismClass *OrganismListClass::Prev() { if(IsEmpty()) return NULL; if(!cur->prev) return NULL; if(cur->prev==start) return NULL; cur=cur->prev; return(cur->o); } bool OrganismListClass::Rewind() { cur=start; return true; } OrganismClass *OrganismListClass::N(int n) { int i=0; OrganismListStruct *tmp=start; while(tmp->next) { tmp=tmp->next; if(n==i++) { cur=tmp; return cur->o; } } return NULL; } OrganismClass *OrganismListClass::Cur() { if(!cur) return NULL; if(cur==start) return NULL; return(cur->o); } OrganismClass *OrganismListClass::Id(IdClass &id) { if(IsEmpty()) return NULL; OrganismListStruct *tmp=start; while(tmp->next) { tmp=tmp->next; if(id == tmp->o->Id()) { cur=tmp; return (cur->o); } } return NULL; } bool OrganismListClass::Pop() { if(IsEmpty()) return false; OrganismListStruct *tmp = start->next; start->next=start->next->next; if(start->next) { start->next->prev=start; if(tmp == cur) cur=start->next; } else { cur = end = start; } delete tmp; return true; } bool OrganismListClass::Dequeue() { if(IsEmpty()) return false; end=end->prev; delete end->next; end->next=NULL; return true; } bool OrganismListClass::Remove(int n) { int i=0; OrganismListStruct *tmp=start; while(tmp->next) { tmp=tmp->next; if(n==i++) { if(tmp == end) end = tmp->prev; tmp->prev->next=tmp->next; if(tmp->next) tmp->next->prev=tmp->prev; cur=tmp->prev; delete tmp; return true; } } return false; } bool OrganismListClass::Remove(IdClass &id) { OrganismListStruct *tmp=start; while(tmp->next) { tmp=tmp->next; if(id == tmp->o->Id()) { if(tmp == end) end = tmp->prev; tmp->prev->next=tmp->next; if(tmp->next) tmp->next->prev=tmp->prev; cur=tmp->prev; delete tmp; return true; } } return false; } achilles-2/orglist.h0100644000175000001440000000263407226463024013351 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef ORGLIST_H_85445 #define ORGLIST_H_85445 class OrganismClass; class IdClass; struct OrganismListStruct { OrganismClass *o; OrganismListStruct *next,*prev; }; class OrganismListClass { private: OrganismListStruct *cur,*start,*end; public: OrganismListClass(); ~OrganismListClass(); bool IsEmpty(); bool Append(OrganismClass *); bool Prepend(OrganismClass *); OrganismClass *First(); OrganismClass *Last(); OrganismClass *Next(); OrganismClass *Prev(); bool Rewind(); OrganismClass *N(int); OrganismClass *Cur(); OrganismClass *Id(IdClass &); bool Pop(); // remove from start bool Dequeue(); // remove from end bool Remove(int); bool Remove(IdClass &); }; #endif achilles-2/quicksort.cc0100640000175000001440000000306507332600427014041 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include #include #include"quicksort.h" void QuickSortOList(vector &list) { vector hilist,lowlist; OList tmp; int partition = 0,i,len = list.size(); if(len == 2) { if(list[0].dist > list[1].dist) { tmp = list[0]; list[0] = list[1]; list[1] = tmp; } return; } if(len < 2) return; while(!hilist.size() || !lowlist.size()) { hilist.clear(); lowlist.clear(); for(i=0;i= len) return; } QuickSortOList(lowlist); QuickSortOList(hilist); for(i=0;i<(signed int)lowlist.size();i++) { list[i]=lowlist[i]; } for(i=0;i<(signed int)hilist.size();i++) { list[i+lowlist.size()]=hilist[i]; } } achilles-2/quicksort.h0100640000175000001440000000172207226463024013703 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef QUICKSORT_H_789345 #define QUICKSORT_H_789345 #include"vector.h" #include"angle.h" #include"color.h" struct OList { VectorClass distv; double dist; AngleClass heading; ColorClass color; }; void QuickSortOList(vector &); #endif achilles-2/screen1.png0100640000175000001440000002333107226463024013554 0ustar mrdusersPNG  IHDRK IDATxOWbE = >eq9tp0F`ޜ 7 {px[p!"́rz}ZĹEG9Z Pr^{y4;?ׯZDJCJ4wKsU7/CO'Rl.㒺 `~8 &I9U`p2\myc'l0H{i *`Ǥ?l0cVcpk0}CƠҤMҀ` '5m9`{JZ& apL"% `)09HZ]9  á0ycpVIwN&o@Z9'ۿ670slڦ#? 03R&}?Dٷ<7]GУʾ]DoJ~MvR~;~i'U[骲o2KI3.mu3cx|LdJozjciG >b +h-Wjy}&lTkЋRopUkq.p왎[cݜmN_W6?$]ݝǓϲU7Hi5CS.T0a-G˾+[=ymF9&:5կx4i;1 tRޒ.m|xխ:~]~-c4dÞDtUwzl,t^G32  qhl9L=9[;jg}n-] XOh[|9[H 1iO~['f{]zwup6}(;/[9qTTVcM:gmN  N(?*br,OkV>6=Ѐ$cp9k׀W2d^SƾʷvzɃO2J7ԛg74x(1?6\qMހDevЪKL5/s`_ x"56LH)O˔ݶHܣ=Lٷ2z'R~mbKm`T ހ,oü4z)ˌ)T)79o_+kUiIoR4`[<ᒤbkՐ?w` 1~z~Ӊyq|2|\z,n(=xmm{Vr6[ـ,o!M7;nU1F4̴WȚog.@D槻üϢ[p>'O7&jXWcV k?5]怛菔J2uF~Ţl؋=>bog&,ZoUJ5~1vj'`xN7H4S3۾y.mR IbVi#oBoo`f&i-Vil<[6\ (^w]I ]5-X}:eX ɠ/Dx#}:c$nJߋD[?a^~yn兔lޑrϾ; 3rwf^YpeƷnd\Glq{v_ L4Qj6+W{ 8<6`r|l76/ò,:o[c4KB?O}}In%ik4m9`<^Iffؽ;}YlUDB/72Onų:9d[|5:QT^>G3kf+uMgjyQ,e>k_'1<]]ǸNzjOQˮUpiLe4[:7`ѷF<ǔ&R9ÿ̳E'>!ϔ鿖놏cBay)sˣ@nꬡb!ͷ_`kŧ͛V>f,1exIoW[dgG7V '힛.[-[nhec19lu-sLYjNx(S|O qoGA[_(Lï?Ug/v}peWo9`ݴY~eG~x9{<չź9SufLMVZqq=q#f8pbuNm˃2U*Ͷˑ̭r+v%9\  qn1- *51 3ͤt;;:]eK%9mHiCONs,^&Rf=E<8i(v6XYqRs\WP@w֡e;6"cXMFoW];x*t2"]l稲&d3ĉ_?߷ <1o9U{0ٜ76)Z-`ǣD_r sTQС]9?x]C6(ܑNsKry2.DpYH!InQFZ~I1sW۝<}K/cD+>I=ߞU/(f?;:ɿE"'<#sUwwm–1 ~1g,,iN,qeGA~vcǀK=S$!bI W`y+& 4C|$14KȚkVZ_?%r99C|$EA6$WwE. tHl$M֎?oO &J+*nu[|o<=uB? bEQSm,(kZu9HRֺ?e{Fs!oGROI4V9Еfkg;|l.݉Cv26C\4g2ym~w}"ޯ5ص|*Hly=t|bNƖm 3=?W@]b=gŞ/I=ݯH>eJ``va:p:HխBekvW%W֙٥o/vkİu օ(ov^#0cٮDYD#37.\Irt{>k)M4[e߯xۚ5V_n|hkG.\i/]I-Ꝺ!y]u>d߯|L:~gzXek Qb}ޥ٫Xd}ޏu;ex?:mM $uz"Z/aFZI6L$g88=gVoֻO({:gHIq Qt(F>,Og0 :W= -KVܯsq r O XMS}Mp0^ܲr+Iʾt[Mok1˱'ZoxoBJڟ9|l6]cxυ<ԇ;9Qe1엑,k/GL~e̎9Dp\~&O|)s,2%ɪ|m8G![9yilGAk_3 yi)Hs总-~pa lttKa+Yg+LkAd G׀yAsG }û{Qо2;1Ck׭p.-߯s߀EZ[}3{aܯ|8c;*ץ~.E=Nϰ롧ܯ|2_L}2W>k+0Y] 6CȾ2sǖ/OCrjUI%݀Rˌ\O}[*FߎKV^Rc4`,qWh\Oư.5fL 8Yki{yCqJk )h#w{$Rg8@@sb5I|4|*HsܾtW$s-hQi4:}=%Ʀ7{1f"c:&;,rW(Mb. s8 گLYܐ'wVj˶l*C'.Ԋf;'x5`>ҫmƠ,T;R68 /#ܴdGՃ7Jq<6 q[c}HL2z_nj|q n^VѶaEFq5/%skDHYyÊOnU/=[-FU! =>SgK^U̗GͧT,w{6|iIP#c>İL^hǒ eXԀm5]_K1w_&M xcO yCaՆk򊦡"=X)?z[zQЯQgR{2S{k\l/1[WZ_㳮hg #Lh֛8s;3﹫.6Ԁvb=xeG^|YۙwkIL)q)J0],怳ҕ)+ }Yٝ`S•cp_]/[c<]s;cObv6$ɸsZuםH*w_ӵ%Q1o,"ˍ{W0hϢ$0`'6=D]>oDZ{}Ճ;,i"je{S6JcCy^d{ !ɪ >E1F19(Wj6l7O}=~oǒq2ɔUg8|E[[$Ӻj;~{oýTa#JF{p}='PzBO֍\7lۏ6+G_d"}IDATQНi6}غ݃r+i>2Sư*/kz: MlwJi vkfLj2+zMï w⛑qzB_l4>n胪\~LVE+}հG<Ir_W{t[glVK#_>}-!&8<_؀~C65K jkJd۬i}RyَvMa\{ul:}tS^/:* x+}жk T1$wiGr^A$̋[ .6]j{x0oՀ5$t:8Ȓ=l$S.^n3F2TJ,^I(S=) m.y8*EHg.*q`ns`}_/0@.z)eعa<\Sh( ʬ Ҷ_рʩwl.h8LBh5'FPJ5w.{4`nESG~yB*+n|=.^warwguo-UV6]@w4?+i :~@iLJ1k^H݇^{pz(P/)4A$}WS}ş׿?ϗ5e~g?9N_m;;3ctuS5y&{VM)"HYJmö{M_TRڶ7t~Vfpg K $|i†>㻟277OUfî;DX!Ye_H8VW#o*[4YHbwnYJOX pZua/qI/~ari7#o;ӀSQG^-mV*[|Cv{O1gV&]RdqMN& mJc.؀ۏsrO-ފKa%%ݵ X:% ]K`kb=| ݓ䝛BV*tԣg.PHJ޳Ϣ+g G~[<7]_9sꭷ}TN{?/Yاy+N:i@<;n<<'@YWR1=5Զ:d [[ǔ:NX@f<<~ؿ+ᝰ?϶wѽՇ/"ܹ@jҷ)Ob?}|'[@'$Kiހwɗ?^2kwNVŒp&׺}35O y<,$)oe7J$vn?+/.+w&izn m4F䧅rgoT箝ɗ?^2Wʪ&[doٍnUO=յ˵4tGjt2$Mu/k/3Iղl|o[{6wd́UC?brk]M}$23a^Nx[ccM#/d/SNS}rTH7ژ|j:\M8_Uݞ'oRF}=9xfy,ѿ7xnVoN XҜ_m-c},JT5-z1/'e{ensIx~ٳ{2<;'t!M߲󯃓/dg$_.{X5zFOGמ=wOfр~笶Xa,n|%8#9LP{M__0?kMڭIm˼Zq9N8 cL受 d0MziV㖺r>GFsOf^J~z6`֛[6v2u24TXaRFJpFr8&[.in _??>p=w2d4?=x)KpF > 5=MMK V\Ow>[;Q.:pOl~tu4)M0}/ڹvu|C=s418/ ~rˢ4O>؟?^238m1S#_N<[֛WV̾=;Ǵl;M[_nwxIIS!9wzO%ڦټkkkT4a4'yv;q#/_ [ lj!Rj%8ݡTtz^K]i{=@oO_j gv9ey\J?//dg$a=u}[0X1Uʠ>P]k3aq=u}j9)lU%#  pzV*m$CZ- Y\ORwӸׁp<@KpFXT=笻Ğt_BmK- װ_NZAR7P4w8UM`JK2]:O; ׏kVZ{PK*F> 8TN}9㷢ZO%jr?i*,> :ck xa%6)S0֒v{56/ڛ2f0 X}ɗ{ x .p߈߀Le C#6p ǎ?e3AiӀ'}7/ *C*]^~j?|Fn2>k/3as 'bXܞs9~I!oZm8}OeբFфɭLK{Erv'mmOq8R/~D48.G4{$vuTkkϸg~{Wh}h4jnߣGɧM;rh1;DZNڀoeekKlD5`cBioS ãzӕ}f J'&($ٺҘL{5l x>ǖkICq2l8#ܚ[ܾ-6T*2 `W,O>6݀Ox?pZ1z ?+/xH-: 4>ֱJ57k:HNxvjy Ke}Ft+;RQNOжMOё=}`Zܬfp_ηSl79Tq6z [WX?9H xnxq*7c@Üp:-}k8Jso=|rS{Wn;icR;C-I~5qoLKs3o71LapusGw.tJImLr3N+fn99Los1 .,Z!3ڱ vޣ)Ӛ[12+g]=;Ӱ{]oF0m61S`>Kpi"29 \_#Ӟo&X9:VNlF0m61vYMg)rۆsɧid8w__2RL4KaeطR,au*l͖QIo_^ONnڜq ?|CN6h|r C)n?pz0Jp=߀OM2rNeꭘ_Ҁh7ক7|f+ߨ<|I2VI(SZr LQ2 8}*<ـ鸖I{&Ptpe7g׀Lg<ߎzK$m;뒾/nql_E2[ X5}Ӱisʮ=6jz7ൾb9FҀJӀG,Q4p x{ H+Sn'e&:rOUd X>}Ϥ/9f8XNgheNu;)xirj{^鶦͝v{lB4O9{r28g.p쬽ö5N ;fUmٯvK 0dc{WpXN~ogR> !mMᮼ\Hlot1<ۻa)WRGd_~l~Y %{`߾z&k#>8^pL#K@SJ~ILcu|@4YK3W/yNiGC$icgveo[6z >{V:iQ~䩡܀%16|EJ(6[𺆍^C}|zBݷOJ6'hmMpsWשeds~`% ϰkhܢ3{n4}l>ys~{r8 I.(ǸNT<ؿeؕaͧlx!.J}#mJڜg?= H=klr5 x&0U{bd0?OӭK#ٸE[6oW}u=3\o>4uk"c:ng([ؘ3kvz Ә+lܢ9nRzg<.$}SI=fՀW P|ᚍccv\ۗFq濉ӷZ[$R쇭l`*Z@ 'g3zit =̵/w#lܢo-ZK1sV2T~6`Ѐzuenؾ4[t辒 ܨf)qaol}iٙM7pTO-ˮ܍ۗFqÿj-]Tn*YHeʜU$G\M,%nA3΍ 4O۲lN]O}i$8#;Ѐwt3}tʮk3l]3f9Y4`L(\3ΝJ0ϰKK#ٸŁ+Y7M%Y޼;noKi-!>,0Lz!x$>qy .]qij]Kѻ73嗝]vg}?k&Sz-^|55{ߕp2xu ce7sxDgҲ˺ub|z '&Fq+Elkwz?67+;5`.q,U8GOiz$ b}5'&Ft?W*.be[W'ngm7qto<Հɹph+ˁ*f<:}MロF hTӌp09<Nƙ!2v3Χ1}vC ׬Cd^o;~hfw(JvusIg3;N x+;,ݖikۏs:}ߙ&O 5gu[}}_9 W׍69׎LԪ[ƪҀgǟsu3)M0v _mxKv9jn.;iu37Rv6"%Ye,7KvLEo?̆ rItvO x#m9EO6.?}S>J 8T:}O_sy\C;ظM7;k7*5w<\_ywfltioA};&X/l)Lp֚ 6ej6`P4Tʹ7Z_Oӷj.kazN1<[8g=sMsZ2A#igz^ˏ{fZBv.e,[u3c!:MA?8L׺fln2g x8cE=/Zپ!->zCX o 8T*cue$ >8L_h\k0C;G.genu[g54O9l8 IDATrWjڶhM#ـo8ņ 8u^L5[%]z[ 8FNwvdOq&}?2h=X,z鯢{__V?վ$Yߋpudp\Zl^D 8z5ʻŚ 8FNZџ7^Kп$ֿ;.a}۟Ukêv|e]v!'KLр\rηx -|΋z%X'e%{/fT6} ='_wL#'h)ӭ\k&:~jwzRQB|T1xk+ϩגNںxNQ+w-Ҁ3#b{i<3黊-Ü>/9ԀdA OlY]Jfpl4׭kN~ϗLߕ6`hwˁ>Ic'2uyDu6_۽AN0Rkwe 8FWۀCʭtoq7V5Y՚JU@u6O Q\L2ӽ Zd/^\}QϾ& liTpX^>=~N5 svz28,9g߀17x )р޽߭o~s[+o߯UVʾޜR^|_[7`ΘـE,SOX _#lܖv"Ln|^ђ]uv͹7,bfpkzOW~^䢲PQVRyeܱTi9<~xYk~>Jx W\~S蒶ҕC h;v{.~ײ{c?{O[ ;/.Ή֜)/]d +w>zx7=w}go[Vi _F&}LgsR^4/矑X^\}OR}ɞg߻. Fοs-قv{v~M=d轠qäHwt%۱ S9/d³jo˿Y%i7Z7^<qSx}.Tހ_H
jj#Z_Y=&_*LN*Y֕4`[h^(x/pW;O;V g%Okқ4ڀ c~'b2hLpj%;o ̞?] Nnp{!4`,A.rn;EԀϗ}~ɲқ'{_ŏu_^g804`JgoNӕ哷MOqsD>|OE=SVh\F9MmDkЀϸ39i5`זr4mˏq{Fv|xʾoЋ'rc͜c~N|[leytY{qVwgs[nJSo#LmlzҀ3#o'[NoK=롷IVgIZʛ:zx>'"8jl7{N:Q5gӦW\ di9H4J9|^HIS c`@,?_~Ϋa`ȿh$>.$OMam;klwTr84NS9o,I+d ߡ97(ʈ!mg_sb9;MԿ?$IZ26HsLܿIH#Wɏb$9w_ ]9G$=Ƞke(iUAgp$Y@0l(碜w$I!p3؃I$ ණۆ$IrىA+d>Prؚ$J2Id `'Q^|aW%82I9[ xz*/2Z2'T&ILa灩\M>r-& { $IOzH"I#s-oNh2GɷGG$I&hNhӀ `%9' x>/e$3,4^{4(H"#i+Ycj$'_D2K0rrئdgp(z&1)ϓ!Qd" f#]mc>(r@$20q1E@B\`*H 0R7Q0F2I0Le 7+ Hd#9Q X0Κ20 [/ PکQf &GQrFԭ\C"' ` cte O4``u<E9bd(LIENDB`achilles-2/screen3.png0100640000175000001440000001521107226463024013554 0ustar mrdusersPNG  IHDRKPIDATx?$ Bw6=)HM87,0XÑp$Y ĎoY fC`HMAWUOU=UTy;f ƳGE>㩗u?y#V1M~ߌy_N\b'Gױ:{o@ O>YMGb*OZЬn?o7׽|ZN֫PO5s*E^ bX7":.?:8G?k&YuV&Lv߭73x;WW)qO " #-<)W7Vu5-_γוxV7#gUMV GomC`jM 9/VP?Vަ @7^|S\OǣMu, <5lMx]pÒhƳ‘t8fa9 84`W7"2s9pu9өgqqy>_8?k th6W3}!|񻈷Y 7V牣U>ffmg4B w6~C'AӜ89ux3NGmhg1ߊx}Cow/[6N|7咽ms|4`˔+p6fj~Tȣ߫x*V{ԋPۀo۷Ϯ'iUNNhJGyop{7wNSC6ЀKW=Hsh vԀ)E;Fxtث(LmNd fr3"f/#V $_}?G[Xo|?SqFQۀwL|n8?Ӏmͽ_}%lqt$W5ny/.n>HTmH_t[e|m,/Q^댈y?{ݭo*~t?[@hJ` ÝN{T&"b⣟/ƿB;[}~;_7mYZ{qjPO;^9V]gwj1uG^Siv__ɻ}FlǙFhPA&} x*M66 ^vv'n|vtgxp;gWy=>^<%t.V'yzM]ۉ/.Zmn^d=9'nɹ96xgm7^iU0___uVy͹6Aͭ0$>~;VWWe1N]>nfvQˡgvLܸV2M٪9 -5Ǒ}a‰gyv؉;f6ݪlkcNˋ 89F5.~5ῶ9J\s]ȸ]O^Ls7e{ݯgRspb_|.yEYrߍ[ts5.ш xO~Ҝ<5U>b&d ی?pջO)^U)cyw}<"zM 8b}$\'i? 0$g~5ޱ3evӍ69LY Zx:EMoJxߵwp3xvtrm 7WЀΔ>aT/<_w`;s瞭;W^9Yh cj3 zyNzd2S|ܸmܽxu!Z\ȂْNe5gAUӺYМ0szRgS/_]ʪ8|xMMO'ۀ'V~pi'jul!bzWoHۀ'GΡOj|#tV q'[2"6Ogr.96*qs>4>^N>?t5c?#V57O%%C e瀧^/ ϻ/?e|fjxu󻭖Y{x8++2+hi[nCIgo{.Q~L5﹌cM*_yA;>={S0c͛Gs\}0Vрlpޱ2M1[ ԀتL{'iߍ̚]-[ez홟Ou;[U}ӧKsQ<ԀhKuG%?g[wdED5^FމxɫUJ'gq7˹G-^~mg Xj[{.1Ga-Sw+$%FH htFm\Uoy+B߭Κֻiqcs1D'1u\"➶˅5}k)*a9hhv~ kms )bVevn0ү|rM!̛LlƇM*W2K{ӷf=2%쟗Ip}=zdHnǻˑ:y=\0Ը1IGfl9'K>{~ljzozsLSiW^v9&VʑU ~yl#VqN|*w|+v/]"{WfJs0Y%u#y7g-sbx;qUFZ{^]}wFO&YX&ٳAfk̉ [|77 Ϩ7oZ׀V g3뭎u5V jmPɽ^ŧY5<60Q0ٻzs<pgfxg+'qpO[Z:h|M\seLpzF]cߛaoNmm!a\̔k8ӗg{K[΋hwY[vh1|F0Jĩ4iyz77 x 㔓nJxv0sW +]^WӘ3iN$T[Lzқh{skoqT27`2+xWu ncқӌ/*{ǝ7k MӀO>1]3|s™܀Ϟ۩7GSo܀ԛˡgS٦qy}2SZfƼNm9pk5\qncoNe}5LҀ)lS|A}]y1GܺU&mV\%W[w,sNzqE5i1m|7hћws[ݕ+,&iNzq\ܕ0ccZ”\ωJQX7Ncֆ,&i2 ^sɃlj `mt)=xܘWh_VրeaTԋ>v˾-y⯲&?Mkm5D?yPIYk|Mz)Gp3eY35ھ?'O+q%TgO^m}p[KUL{y%O}HyMKN5 '?^o=w97 49(akk[-yre'.ɷ_Z/s4\y9^+9|Ɉ4`9^lx؀nM~㋚rĦ;JW>~;xlwJ9fjSQ/0}qՀzc./r]i\rW܀^y$DrnX'd ]tkSaGQ_?{ޕ~67WWM옳̙D,e9UBWN?;z35c~T+J2<9c]11g)[r֕gpǮ\߀M_y Y< X\1rUvYR_WY2^j[^RrB>5 @%GL 8GRY|\^0Y:pH9'%LN9 0^ϥnGhx0R+A,P J0ka&)_ vUS%lLJiGgy+$uِ )G%( 2MOL(+6`(}06`65)ed%<ֻ٩rԀ٘Փry4?v<IENDB`achilles-2/screen4.png0100640000175000001440000002370507226463024013564 0ustar mrdusersPNG  IHDRK IDATxO$i~[9!{OicŇ>l]Z eն >bi|0^fw0L Vs`u06H 2/>fCFx߈~j"##2OFV0=+S}(R+/HR?QJ賈/uHt된WV/K}pPCU~n}+(DIOHSr8Ve-Sbڝp Pm252+y-Sb-Ӏfpٚ.v5ถ4)v4` p%ы kG^ ~uj}C Y͵ԀR[3ԀK`}TvPJ||~og$l$Z6~Vy9L(՟gɲH)?\+d h  #Zi_Mhz-Ue<2!jрiaf7ZC|}؆ Ӄ1#CɊ@h41pZ[c+飱:O;EF[-zVXK0 8<>_V}:w[}o!ʖM-]>]f2]Muk9~??!W.螮\v130699%ONqt 2<iVJNYcslY_*Ɯ.*1rI';+ؽ ac%i4{>rJKWmx z^gV?nwnك4  aÓ u߀2XJKYq= kׯ_@gyVG))>끒w} wco3YN'՘klk|ztt<.>SϿ,ߖSD}Jڀx cE u oG⢧^\/l?o|-XIzzM7.v]>ibрi{V-ď @xP-|(Iw mSl{8!gZ )ӵ%~|J-xʻGgW,mueJWC1h:goxG7sgOueS=I-ϫ汤S%3;kҙ0oL:lG̟8٧4`pxI4<7sY[38}79׊j~w qfءM7r-FkҺkӳƠghs+rbP=JE6븥-Q2ӀK=6fnw_|=ѹ/ۛnTyy&t>{th=?ђ#˨KWw7WLCvo J h8m->Ӏ˭45T= XEʯu{S:K;lbgj繹SpP0 7$TZH*w׌Yyf-_uZG/=t&>Ӏ˥03C-kHyP&\{Viן Q}X[W.s̬rjMN(JڌKWc1dIXx O#G `)7>Ӫ7*]kKy?s[U.5۷l;/w1;rҀ {!g<|>WsokMA+9+%+hlUΗ 29r^[uZ$ipiuG>҃U&wЇūmʝoQ~X2i^~鷾O;CҀf{my_ 39\:z,5Sӣ3Rޚ7/Y_~Ls|~>!쵭=0P[d}>ٻi Rs3YUwU8U9V6_Z4Z^C}SY嗛;^1K~qWKNl;HrDwοw9~s>|5NH9 J09Gޟ|<,)oc'8"YoЀi%IrWs\(;m!99r x2D4 xy!̋5X"dl:7mn!L4/2;l^Tb \ 8xi'F^E"509Ld|~C;S#S-u;Wےs/hneUho->i$Ys.@o̷(^.i4.QǛiٳ4`Sfp47]5?r-teK׶4`n)tvL x*K~v9ԩLT[O0PGu^A2 x 8DI?^#!6xQ= S2r{!RvO^z>}!œii]m~Lηuyl7Ocť wZsozQw|ϑcpf -d v9 M^y_rDҀ^fے _|]"sa3р{>i@n!'r<7YLvnj ֡wُg wɋv4cHv!i{&m1ض6lX1hxcW4`lNzohjd(1 x gFadHpKǧ(r:AE3.|w{e.ܛ>׏~1I4𹥧?_[o[]$uQܮcPX,e-a}Go &b7%p6HX}˻Go w :`r|B]:~y܌kgMʘT$Im~iehMg8n֞[>1A& xhrkR1;Y<3Qla8nҀM2;lHgЀ;-ewklvVu\pgߏ\-cvztf jKZmn;]>#˾"7gUg8nҀM2;l4`xK77?.+?#gUg8nWҀ^fǒ\C#Q3#Y׾"QVuḹ@{fev,.ik[fTEd&dM_c- DI$%҂y 5ӭQ͋7/N ~`&=޾gYfے#ˋSv\M(}YokIऻXb))VoS><˗|G'I_L%ߝr]Yq~l#]5*Y{9m޷ [4H{]D'2gUKÖt?WDZlh}ng\2.]//'{c1˔tk˗CoWoos dWmUlNk\~2ЀfEj7зƥ*:ӈ}+ynI4WGQ!M ur:08j3Zpx 8i~uȘgQрЀΊs)6e5}ۆ/hNٶdK0qk)L.?'y~o;ҴBlq^n/ki-2`9tٜn[vxȦG\eНul /kі}ɆfӔtQr>J.>6y.?rrOWBH,p=Q'Dzst4U#gEjZN[Fdo 8;^IdZj >pp\,܀覮3p-o.h=hZH 8=W;f3.5 גgo\ 8>m˗t9iMޏM& x@5Na[5Kw.ksl7ne)рCJ4b:kgXEZM̶^kkEyҹ_ll Yfےy? {_5e]g\:9\ɎE5@3}La[r <%可ep2<Ul[5=]KgqG2<q -?pKãH$ xHՎwaUy 7Y3QGrA^,+݋o3a!W4`S1֖o95kz};&& #T{VwfatVQ-{[G]Dn'yR/tՀPq˶*6ffr&7`[y_JL#gmKNZ[Vpmu۝uR5m )GwyBW/)рYn{3o7Pn!̤UBut$4`ghWd̖a|IcV5`2uL:3ۛch wR_l.pl쿏:-{Ӑ49 ;he}RVm=4͖nH-fK.PKրwk̳miء\xY6`ml:0l]-‘{) wIoVo@,"E3)ZUj{£$Ϲ-8*Sng]]Qr|Ms;ږcμ:>S;K}pڴin; XG.sz\XgnZWi4u$VJP8ZaVy&K_Ƀ԰e :It?]ԀSkA5QN-v]5`f:SzwtufbL[2Ԏw-#IDAT.hoSw/֚pK jxM6`.$a!}5 }n囮;$91CZAhg*S|3.K] `>ka#ڤ\]~셷]:[Ƚex8|j'Z 8w8 \$-,3)}]jk9_:Zknz>{q3U! Й6T{ߣ'_eXo,I4]t{;+ m82zqSM6t{cI#,9}#cNV6o>nOh$fp |Fހۀic&i T0[.m90) #֊K;̵ `2NkާN[]oW[6Mb6b8o#W8S_^C=łlKlzE4]$\V3iKL?goSrP~羷Ic& '?5-'mٺnUfN'5'7\\[nSF~Ed4`E'5'Ic3p 67`_mu_-Z4<ڍno=5gM `&5 4rjS|kp{#OS#2%]8+,5pue- tّ p{vwA ,I.^^Y1/} X-`-JO\=՘ew#i%ϖ v f嶿 ϭ45 +RSF 8!>S. bimw p3)Ѐs-kN~~fa_Zp,Ks{)g}4້Ҁ _ĺ>_i0 ؛iUxHv[h!!F"T cx" x+SVjF `3x4cve=Y?I&n1ji[|`dzN^P]K1{2F³l$( I3pk} BxK$9.lm-c}z\;^~D$IZVЀ@QCx>H$IehcQ, +!$ hcU8w}! =B*R$igD,YEۺz# I%Cۺ@b1,% U#$&fEvi8$Irˤ׬E$I^%4` I"I^w}I$7׫E^gu]$U_6i{=$IM4lºJ3$IrK9+ffD&,xgfRn2a{, |Ҁð,q$Op`{BN}#$w'4iA g ّ4 }&}&$$INH3Hpب=64థUX҉$IGRNJP9lҀWLJ 6ikCO% xxw4ILr==qi7XF'n-i+G:i+v{#O0 *4ୠ  & xs4͡ HnxdwҀ7 aogTan[JQ HI>%BIENDB`achilles-2/screen5.png0100640000175000001440000002273607226463024013570 0ustar mrdusersPNG  IHDRK IDATx?#y'G xp\ b*)JC,Ul+.␤J+8U,F,)>w2*`U"_Cr8);/|`jMƽ|OL؇ Ln<,/e}?yp$78 ]6OňeDV9рh~3/0p }mK/B!ԛľ4```m 8A77Z{0!imAwͫqn< i|8,w1SoN Ӹߝꢏ=5TQ0xx]pN\ԀGgO20 px8!480<|/Ae2w??u=<ٓL ӸoDodpy34[Ԁىf,n[ߜzFg4QwX`Ni 4897,Y[Ӊ?/Syf>?v;a6a_р/.nnfsW{.<ֽykW4f=?mc0LcYjM_N׀W{<|&Zl}/n*/"&.uvlJ+͸ԕܯ7?DXjNzGpRfMlɶ'46}#Yْy<)l$qyeάYDEs4BqX Y".򼈸b^fUnS\_ڪyF_eïwo mfy|[o0=pD\9+[='mºqfy|nm2Bʧo5Dk,#?ҼX꧅W.wY\RJZ6JVZ~p/^mnf4=2jٳ}Q ?˖rO4ʒ^[hY\T2?=ʽv=_MӖSl\|-7- `HGFcp$: ?8+gQY~M^{j7Wj}m]9o뮜s77- ;jΧB]DW\i{#vzWk[r x9z\'ӏ㓏GGG7B,w][hnG-6րKKfM׷ְ5`HUͳAK7UGKpǒls;:Ȳ|nLJOWSR{4֮e4|؀u*׷a7_,x3bQ*n~o޳'9}4#j׫_-DnU֙[ _M]t\}gJ-<~57qM\fe.MDV[CaE\ e{*[۶m^DDEӻ嫵E0{~|wG١yUD{9, /Ks}5i>4wlQƹrJY^ryU^Ytչ.Mh}QlWMX#|tJ5]%S3[rY}ך 4`ئ}r/イ|jܸ}1ٳ\C3gg,rzZZZgy]_s^8d-ߦ-|g)cnNǀO>Wz̤/FtMnnU ӻcS7-刬0AG |}O^}ݲS{>i ;ރwn;ɹ|^ts d`XC;؛+W*R7,v4^y3ٛ}|ז^fNhõΎVmfـwO#mTdVav.KpK-^|6+˻kgMR;=1_LR{8cucu_ x;|ҀW#7qgϚ>\yO;Zֹ9vɧk:wS5AŨG6ߍ|sO7E~ dmξ^-p{)[/ɧq^wm3';nwjr/_%c67]wl}Ye\mk=o=lXYhsZ?r3չ>Ǐۖ\e]J>})\K\~IHLdseK׀1?B\jw^ ?-oE'wd2Q>2EDe.ޕ?)/~Lqko"zcޜ([6rYUDe7]m,_bW?|ڛ7}KΏ(7rǔM87 ^oyukrX?v߿%}y۸>orGag`c%GݚO.xt:u{OoFit{_lhڳ~K_U.}[x_Oy/HNCv4Yď'cMvb'|5o5zpûC:8w [#f-{m2oVbWk-4㭙^-#\bm=¿Y[qnuCHy$SY5`u#ހcc;M ?귞ˈ;C~zW7-0)q[FgxtR^c^߃ hickQDϺ>ߴ(hS!_˟ ~w-~g9]VgI)7vJv2_,bkjhL|ivt6͆wzG5rv8i|s3ZkM6on͒5n݃CԀYf-ܦހkG=jnn>n3_o:%|;@ xu\uc"*GvA蝳lgKa>u65`us3\ր#";vRq8~ڀ}wG`u^N7s:oW&[c"^Ķ8q羗KaFр]HnO',\!#"e۷jm{=._-fjYOߎT2vSsf)sX>oڄ6Gxm[G.̋BZ!j둽Zxy;M޵N'ote϶7`(U~%܀97>&i- z6jvvpuݻ 8?Wm]j &}%ڶ-lMݽ6tJr}'J 賓׀c1(ds ݆k ݴ/+slsp[l%O׀Gu Yp߁b5`c9<ܬ.z5EWUV6ݷ_# I(Zs.-pyzpр3#d6|yJusGֳHaw-7;ʛo*/ڳ7pir,;+5Yɑ'kLomyކmQH XBp*FƜawQpۚ ?BjR p bdcN>Gj9`n]is 8 H9r&3~%"9-}O׀{ ݭ)GdԯD#mWNԀ\zw]p46Mp?RݧAyBy'|:S&jSݹM؀kLCMgpfq0rߜQlp966\Tj4hضL&7M9#`֙=/Ske{mrtK'M{|9}lp 5ز=}3_ G4jҀw#[:$'N S˹7f<`Ͱzkz5`9}kI븙^EM xmSo=9Lm35Z;pxW>La>z>?;CHNҀcӆmƸjW?=| ͐g4eK3S{lsq!pѱpwܒ)<塙15 K-n= owݒ)<䁙1ϵ:gnr }w=\y\3Ssm!w30I|ntGw]l5pɤG5`g s؀Cg` uW.}C4ʖhNSl!wI""٪=pӵW˖nIpeK4`YIp z-jk&p^mok˦k7W <e א⡶Rmsgs6]peffXi GmH9.Q&ڹ5JzHo\apq.ߴG )<9 >׿ܑ6SZw}esmkkܳ}GlHa?#79 րk9n356z6wkηюЀSZX x)gqe9n MҀ\ ݮ |mi=|R6l6l1I^4„opø08|F ۖ5`l:PR7GOj>[?ۖsiL/XSΪ3pr;r߹5erh[̨ۿͪ3r] OG5~.tz]C}k3LfT)$ 8p] 82noװG؀틨;̰ROgێ؀4ݷ/kLSͣ6> ^j)N9hN1Etʵ >>fրVr[3nUvvߙ5`{sPf| Sm-j%?L 8t%mFmC|rk3_l|Ϻr\JǍ(]Ipҩ4`{s0Xf* ɭl|uL ۀ+Y3InX:=р9^SY5MҀcΝnwr}J4ISoyK5_4ր6ivkuGylЀ^:Nᵤ<_4ط; qQ\bٯwW4lp % p]Ow|3h<#ē]$9Sx',gw 6s|Qȶ4cR&\uĵ4ח[Wywy݈Ȟ#눋ooNl1/6=?+_fͫkYATxamI/=~{GK[ŽFo)'=ـw#5 fN.4S7Ȟ3kn3`*/5 O ?_]436hNՇm^z ,6}'WY[E\yf xǞ<ԀO26|{f׀O".69x&р$'wNl'5|7_=ֳE[W=ހsܽ߀1)O2599B~[7ʱNp[y$'3ThS9sx|ho,tIDAT=WM߸ڷx,6iQs [oә^OalٿVO$_uwM#c\4|Rw$1=`SN >w'GNS.'7'yJa/}B3$ nwm3軻J;H>Cj~=p7SIa$ɷ@z5~Fnw/~x}zs%ݪrܽ hkyy@m4;Nuܛ1=0Il39WZ6E]S{m7 UރCgހY(?Wzp[n `?ǺL![1㫗=s=y|n s½`N=e;x|h |OO3-a:#ĕcdWԀ <;uYno$r|w:#JL_%n)o/'yJᖟ~LakΗ_M KVuj] OM>g)Rʶ<%)ܞ0&}!3Y qr ֎0u-( nS 3 4R5``4Nә& CLzJ,'g&}{U00p秾*iN>3䀙#jn[Xf=M> $gc J.pMӼeig 䑓~|&H){&g(gހ)'ߧH){f {D|ZRI|^RI2 ?=IENDB`achilles-2/screenshot.cc0100640000175000001440000000565107305560731014200 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include"defines.h" #ifdef PNG_SCREENSHOT #include #endif /* * Thanks go to Andreas Umbach and the creators of glTron for the code * to write a PNG screenshot in SDL/OpenGL * */ #ifdef PNG_SCREENSHOT static FILE *_fp; #endif bool PNGScreenShot(char *filename) { #ifdef PNG_SCREENSHOT void user_write_data(png_structp png_ptr,png_bytep data, png_size_t length); void user_flush_data(png_structp png_ptr); unsigned char *data; png_structp png_ptr; png_infop info_ptr; png_byte **row_pointers; int colortype; int width, height; int i; width = SCREEN_W; height = SCREEN_H; data = new unsigned char[width * height * 3]; glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, data); _fp = fopen(filename, "wb"); if(!_fp) { fprintf(stderr, "can't open %s for writing\n", filename); return 0; } png_ptr = png_create_write_struct /* (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr, user_error_fn, user_warning_fn); */ (PNG_LIBPNG_VER_STRING, 0, 0, 0); if (!png_ptr) return 0; info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr, (png_infopp)NULL); return 0; } /* png_init_io(png_ptr, _fp); */ png_set_write_fn(png_ptr, 0, user_write_data, user_flush_data); colortype = PNG_COLOR_TYPE_RGB; png_set_IHDR(png_ptr, info_ptr, width, height, 8, colortype, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_write_info(png_ptr, info_ptr); /* get pointers */ row_pointers = (png_byte**) new (png_byte*)[height]; for(i = 0; i < height; i++) row_pointers[i] = data + (height - i - 1) * 3 * width; png_write_image(png_ptr, row_pointers); png_write_end(png_ptr, info_ptr); png_destroy_write_struct(&png_ptr, &info_ptr); delete row_pointers; delete data; fclose(_fp); fprintf(stderr, "Wrote screenshot to %s\n", filename); #endif return 1; } #ifdef PNG_SCREENSHOT void user_write_data(png_structp png_ptr, png_bytep data, png_size_t length) { fwrite(data, length, 1, _fp); } void user_flush_data(png_structp png_ptr) { fflush(_fp); } #endif achilles-2/stamp-h.in0100644000175000001440000000001207332607366013411 0ustar mrduserstimestamp achilles-2/universe.cc0100644000175000001440000003613207332600427013662 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using namespace std; #include #include #include #include"universe.h" #include"opengl.h" #include"world.h" #include"orglist.h" #include"idserver.h" #include"id.h" #include"angle.h" #include"vector.h" #include"gene.h" #include"org.h" #include"unistd.h" #include"energy.h" #include"hebbian.h" #include"defines.h" #include"quicksort.h" /* * universe.cc * * Contains the UniverseClass member functions * UniverseClass contains all the objects that are * related to the simulation * * Note: all code surrounded by #ifdef _DEBUG .... * #endif is code capable of being turned on and * off for debugging purposes * (or any purposes for that matter) */ double abs_d(double); float abs_f(float); int SortOListFunc(OList *,OList *); extern int FLOOR_BLOCKS_Z,FLOOR_BLOCKS_X,NUM_FOOD,NUM_ORGANISMS; /* * Some Utility functions */ int SortOListFunc(const void *a, const void *b) { OList *ao = (OList *) a; OList *bo = (OList *) b; if(ao->dist < bo->dist) return -1; else if(ao->dist == bo->dist) return 0; else return 1; } double abs_d(double n) { return (n > 0 ? n : -n); } float abs_f(float n) { return (n > 0 ? n : -n); } UniverseClass::UniverseClass(int argc, char **argv) { done = 0; ogl = new OpenGLClass(argc,argv); world = new WorldClass(argc,argv); orglist = new OrganismListClass; idserver = new IdServerClass; } UniverseClass::~UniverseClass() { delete ogl; delete world; delete orglist; delete idserver; } bool UniverseClass::MainLoop() { OrganismClass *o; int i; IdToken *token; VectorClass *pos; AngleClass *heading; GeneClass *genes; /* * This section creates the initial organisms and food */ for(i=0;iGetToken(); // Get a random position in the world pos = world->NewPosition(); // Choose 0 degrees as the initial direction heading = new AngleClass(0); // Stir up some new genes! genes = new GeneClass; // Throw it all in the pot and cook up an organism o = new OrganismClass(token,pos,heading,genes); // Put it on the list to keep track of it orglist->Append(o); // If we've created all the organisms, do food instead if(i>=NUM_ORGANISMS) o->Type(ORGANISM_FOOD); // Make it into food instead! else // otherwise give it full energy to start o->Energy().EatFood(o->Energy().FoodCap()); } int frames = 0; long start_time = time(NULL); long cur_time = start_time; while(!done) { Update(); frames++; cur_time=time(NULL); if(cur_time-start_time >= 5) { printf("Frames per second: %f\n", double(double(frames)/double(cur_time-start_time))); start_time=cur_time; frames=0; } } return true; } bool UniverseClass::Update() { orglist->Rewind(); OrganismClass *o; vector foodlist,livelist; IdToken *token; VectorClass *pos; AngleClass *heading; GeneClass *genes; if(!pause) { while((o=orglist->Next())) { // If the Organism has gone off to never-never land if(isnan(o->Pos().X()) || isnan(o->Pos().Z())) { orglist->Remove(o->Id()); // get rid of it continue; } if(o->Type()==ORGANISM_LIVE) livelist.push_back(o); if(o->Type()==ORGANISM_FOOD) { if(!o->Lifetick()) { // check if food has decayed orglist->Remove(o->Id()); } else foodlist.push_back(o); } } // Check to see if the number of organisms have fallen below a certain // amount and if they have, to add a new organism randomly // (and print a silly message too!) if((signed int)livelist.size() < NUM_ORGANISMS) { cout << "New guy!" << endl; token = idserver->GetToken(); pos = world->NewPosition(); heading = new AngleClass(0); genes = new GeneClass; o = new OrganismClass(token,pos,heading,genes); orglist->Append(o); o->Energy().EatFood(o->Energy().FoodCap()/2); } // Same as above, but for food instead if((signed int)foodlist.size() < NUM_FOOD) { cout << "More food!" << endl; token = idserver->GetToken(); pos = world->NewPosition(); heading = new AngleClass(0); genes = new GeneClass; o = new OrganismClass(token,pos,heading,genes); orglist->Append(o); o->Type(ORGANISM_FOOD); } int i; for(i=0;i<(signed int)livelist.size();i++) { if(livelist[i]->Type()==ORGANISM_LIVE) { UpdateOrganism(livelist[i],foodlist,livelist.size()); livelist[i]->Lifetick(); } } livelist.clear(); foodlist.clear(); } UpdateDraw(); return true; } bool UniverseClass::UpdateOrganism(OrganismClass *o,vector foodlist,int org_count) { int i; vector inputs,outputs; OrganismClass *tmp,*mate=NULL; #ifdef OLD_LOOP float last_min=0,min_limit=0,dist=0; #endif VectorClass distv,dims; ColorClass color; AngleClass heading; // Start by giving some inputs to the neural network inputs.push_back(float(rand())/RAND_MAX*2.0-1.0); inputs.push_back(o->Energy().Health()); inputs.push_back(o->Energy().Food()); #ifndef OLD_LOOP // alternative to below orglist->Rewind(); vector olist; VectorClass headingvect=o->Heading().Vector(); while((tmp=orglist->Next())) { OList ol; if(tmp!=o) { ol.distv = (tmp->Pos() - o->Pos()); if(ol.distv.Dot(headingvect) > 0) { ol.dist = ol.distv.Magnitude(); ol.color = tmp->Color(); ol.heading = ol.distv; ol.heading-=o->Heading(); olist.push_back(ol); } } } long reallen = olist.size(); QuickSortOList(olist); i=0; while(iBrain().NumInputs()) { inputs.push_back((float)olist[i].dist); inputs.push_back((float)olist[i].heading.Angle()); inputs.push_back((float)olist[i].color.R()); inputs.push_back((float)olist[i].color.G()); inputs.push_back((float)olist[i].color.B()); i++; } #else // This loop finds the closest organisms and gives their // position, direction, and color to the inputs of this guy's // neural network, until there are no more input spots left // (note: this _needs_ optimizing!) // (note: the above code optimizes this, this will be removed soon) while((signed int)(inputs.size() + 5) < o->Brain().NumInputs()) { color.R(0); color.G(0); color.B(0); heading=0; last_min=0; orglist->Rewind(); while((tmp=orglist->Next())) { if(tmp == o) continue; distv=(tmp->Pos() - o->Pos()); dist=distv.Magnitude(); VectorClass headingvect=o->Heading().Vector(); if((!last_min || distmin_limit && distv.Dot(headingvect) > 0) { last_min=dist; color=tmp->Color(); heading = distv; heading-=o->Heading(); } } min_limit=(last_min>min_limit ? last_min : min_limit); inputs.push_back((float)last_min); inputs.push_back((float)heading.Angle()); inputs.push_back((float)color.R()); inputs.push_back((float)color.G()); inputs.push_back((float)color.B()); } #endif // Any inputs left over? fill em with 0 #ifndef OLD_LOOP while((signed int)inputs.size() < o->Brain().NumInputs()) inputs.push_back(0); #else while((signed int)inputs.size()Brain().NumInputs()) inputs.push_back(float(rand())/RAND_MAX*2.0-1.0); #endif #ifdef _NN_DEBUG printf("Num Inputs: %d\n",inputs.size()); for(i=0;i<(signed int)inputs.size();i++) printf("%f ",inputs[i]); printf("\n"); getchar(); #endif o->Brain().SetInputs(inputs); o->Brain().RunNet(); o->Brain().GetOutputs(outputs); #ifdef _NN_DEBUG printf("Num Outputs: %d\n",inputs.size()); for(i=0;i<(signed int)outputs.size();i++) printf("%f ",outputs[i]); printf("\n"); getchar(); #endif o->Brain().Learn(o->Genes().LC(),ALPHA_COEFFICIENT); // Change the heading according to the output of the neural network o->Heading()+=double(((int)outputs[1] % 20)/10 * (double)o->Genes().MaxSpeed()); VectorClass dir((double)(o->Genes().MaxSpeed() * double((int)(outputs[0]) % 10)/10.0)/2,(double)outputs[1]); #ifdef _DEBUG printf("%f %f %f\n",dir.X(),dir.Y(),dir.Z()); #endif // ditto for the position world->ChangePosition(o->Pos(),dir); // Set the Aggressive coloration o->Color().R(double(( abs_d(outputs[3]) > FIGHT_THRESHOLD ? FIGHT_THRESHOLD : abs_d(outputs[3]) ) / (FIGHT_THRESHOLD))); // Find out if this organism is near to any food, and whether or not // it needs that food for(i=0;i<(signed int)foodlist.size();i++) { if(o->Energy().Food() != o->Energy().FoodCap()) { if(foodlist[i]) { distv=foodlist[i]->Pos() - o->Pos(); long bounds = o->Genes().Reach(); distv.X(abs_d(distv.X()) - bounds - o->Size().X()); distv.Z(abs_d(distv.Z()) - bounds - o->Size().Z()); if(distv.X() <= 0 && distv.Z() <= 0) { double amt_food=(1-double(bounds/MAX_REACH)) * foodlist[i]->Energy().HealthCap() * (1+o->Genes().Metabolism()); #ifdef _DEBUG_FOOD printf("Food Eaten: %f\n",amt_food); #endif EventStack es; es.a = o->Pos(); es.b = foodlist[i]->Pos(); es.a.Y(o->Size().Y()/2); es.b.Y(foodlist[i]->Size().Y()/2); es.color.R(1); es.color.G(1); es.color.B(0); foodstack.push(es); o->Energy().EatFood(amt_food); orglist->Remove(foodlist[i]->Id()); foodlist[i]=NULL; break; } } } else break; } orglist->Rewind(); // Find if there are any Organisms nearby this one while((mate=orglist->Next())) { if(mate==o) continue; // if its the same one distv = mate->Pos() - o->Pos(); // get the vector between them distv.X(abs_d(distv.X())-o->Size().X()-o->Genes().Reach()); distv.Z(abs_d(distv.Z())-o->Size().Z()-o->Genes().Reach()); #ifdef _DEBUG char s[30]; o->Id().String(s); printf("%s: %f %f %f\n",s,distv.X(),distv.Y(),distv.Z()); #endif if(distv.X() <= 0 && distv.Z() <= 0) { // if close enough vector mate_outputs; mate->Brain().GetOutputs(mate_outputs); // Fight or mate, they decide! #ifdef _DEBUG cout << "Fight: " << outputs[3] << " " << mate_outputs[3] << endl; cout << "Mate: " << outputs[2] << " " << mate_outputs[2] << endl; #endif if(abs_f(mate_outputs[3]) * abs_f(outputs[3]) > FIGHT_THRESHOLD*FIGHT_THRESHOLD * NUM_ORGANISMS/org_count ) { Fight(o,mate); } else if (org_count < NUM_ORGANISMS+2*NUM_FOOD && abs_f(mate_outputs[2]) * abs_f(outputs[2]) > REPRODUCTION_THRESHOLD * org_count/NUM_ORGANISMS) { Mate(o,mate); } break; } } #ifdef _DEBUG printf("%f\n",(double)o->Genes().MaxSpeed()); #endif return true; } bool UniverseClass::Fight(OrganismClass *o1, OrganismClass *o2) { // fight yourself? maybe some other time... if(o1==o2) return false; // sorry, no playing with food if(o1->Type() != ORGANISM_LIVE || o2->Type() != ORGANISM_LIVE) return false; if(o1->Genes().Variance(o2->Genes()) < MISCEGENATION_RATE) { // yea its for mating but wahtever return false; } // calculate damage done and energy needed to do it double damage = DAMAGE_PER_HIT * o1->Genes().GetStrength() * (MAX_REACH - o1->Genes().Reach()) / MAX_REACH; double energy_used = damage * ENERGY_PER_DAMAGE * o1->Genes().Metabolism(); #ifdef _DEBUG_FIGHT char s1[30],s2[30]; o1->Id().String(s1); o2->Id().String(s2); printf("%s does %f damage to %s\n",s1,damage,s2); #endif // if ya don't got enough energy you can't do any damage... if(o1->Energy().Food() < energy_used) return false; // Use it if you got it o1->Energy().UseEnergy(energy_used); cout << "Fight!" << endl; // makes those little flashes between organisms :) EventStack es; es.a = o1->Pos(); es.b = o2->Pos(); es.a.Y(o1->Size().Y()/2); es.b.Y(o2->Size().Y()/2); es.color.R(1); es.color.G(0); es.color.B(0); fightstack.push(es); // Take that! if(!o2->Energy().TakeDamage(damage)) { o2->Type(ORGANISM_FOOD); // Uh oh, he died cout << "Kill!" << endl; } #ifdef _DEBUG_FIGHT printf("%s has %f health left.\n",s2,o2->Energy().Health()); fflush(stdout); #endif return true; } bool UniverseClass::Mate(OrganismClass *o1, OrganismClass *o2) { if(o1==o2) return false; // no asexuals allowed // no necrophilia either.. if(o1->Type() != ORGANISM_LIVE || o2->Type() != ORGANISM_LIVE) return false; // find the costs double o1_spend=o1->Energy().FoodCap() * o1->Genes().GetEnergyPcnt()/2; double o2_spend=o2->Energy().FoodCap() * o2->Genes().GetEnergyPcnt()/2; // if only humans could do this... if(o1_spend > o1->Energy().Food()) return false; if(o2_spend > o2->Energy().Food()) return false; // spend the energy o1->Energy().UseEnergy(o1_spend); o2->Energy().UseEnergy(o2_spend); // spread the word cout << "Mate." << endl; // show a flash EventStack es; es.a = o1->Pos(); es.b = o2->Pos(); es.a.Y(o1->Size().Y()/2); es.b.Y(o2->Size().Y()/2); es.color.R(0); es.color.G(0); es.color.B(1); matestack.push(es); // create an kiddie IdToken *token=idserver->GetToken(); VectorClass *position=new VectorClass(double(rand())/RAND_MAX*2.0-1.0+o1->Pos().X(),0,o2->Pos().Z()+double(rand())/RAND_MAX*2.0-1.0); AngleClass *heading=new AngleClass(0); // with the parent's genes used GeneClass *genes=new GeneClass(o1->Genes(),o2->Genes()); OrganismClass *o3 = new OrganismClass(token, position, heading, genes); orglist->Append(o3); // Give the new guy energy that mommy and daddy spent o3->Energy().EatFood(o1_spend + o2_spend); return true; } bool UniverseClass::UpdateDraw() { orglist->Rewind(); OrganismClass *o; PrepareDraw(); DrawLandscape(); ogl->DrawStack(fightstack); ogl->DrawStack(matestack); ogl->DrawStack(foodstack); while((o=orglist->Next())) { DrawOrganism(o); } Draw(); CheckKeys(); return true; } bool UniverseClass::PrepareDraw() { // clear the screen and transform the world! ogl->Clear(); return ogl->Transform(world->Pos().X(),world->Pos().Y(),world->Pos().Z(),world->Heading().Angle()); } bool UniverseClass::DrawLandscape() { return ogl->DrawLandscape(world->Size().X(),world->Size().Y(),world->Size().Z()); } bool UniverseClass::DrawOrganism(OrganismClass *o) { return ogl->DrawOrganism(o); } bool UniverseClass::Draw() { return ogl->SwapBuffers(); } bool UniverseClass::CheckKeys() { double xpos=world->Pos().X(); double ypos=world->Pos().Y(); double zpos=world->Pos().Z(); double yrot=world->Heading().Angle(); bool retval=ogl->CheckInput(xpos,ypos,zpos,yrot,done,pause); world->Pos().X(xpos); world->Pos().Y(ypos); world->Pos().Z(zpos); world->Heading().Angle(yrot); return retval; } achilles-2/universe.h0100644000175000001440000000312207226463024013517 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef UNIVERSE_H_87634 #define UNIVERSE_H_87634 #include #include #include"vector.h" #include"color.h" class WorldClass; class OpenGLClass; class OrganismListClass; class IdServerClass; class OrganismClass; struct EventStack { VectorClass a,b; ColorClass color; }; class UniverseClass { private: WorldClass *world; OpenGLClass *ogl; OrganismListClass *orglist; IdServerClass *idserver; int done,pause; stack fightstack,matestack,foodstack; public: UniverseClass(int,char **); ~UniverseClass(); bool MainLoop(); bool Update(); bool UpdateDraw(); bool UpdateOrganism(OrganismClass *,vector,int); bool DrawOrganism(OrganismClass *); bool PrepareDraw(); bool DrawLandscape(); bool CheckKeys(); bool Draw(); bool Mate(OrganismClass *,OrganismClass *); bool Fight(OrganismClass *,OrganismClass *); }; #endif achilles-2/vector.cc0100644000175000001440000000364407226463024013330 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"vector.h" #include #include"defines.h" VectorClass::VectorClass() : x(0),y(0),z(0) {} VectorClass::VectorClass(double _x,double _y,double _z) : x(_x),y(_y),z(_z) {} VectorClass::VectorClass(double mag,double angle) { x=mag*sin((MY_PI/180) * angle); y=0; z=mag*cos((MY_PI/180) * angle); } VectorClass::~VectorClass() {} double VectorClass::X() { return x; } double VectorClass::Y() { return y; } double VectorClass::Z() { return z; } double VectorClass::X(double _x) { return (x=_x); } double VectorClass::Y(double _y) { return (y=_y); } double VectorClass::Z(double _z) { return (z=_z); } bool VectorClass::operator ==(VectorClass &v) { if(x == v.x && y == v.y && z == v.z) return true; else return false; } bool VectorClass::operator !=(VectorClass &v) { return !(*this == v); } VectorClass operator -(VectorClass &a, VectorClass &b) { VectorClass v(a.x - b.x, a.y - b.y, a.z - b.z); return v; } double VectorClass::Magnitude() { return sqrt(x*x+y*y+z*z); } VectorClass & VectorClass::operator +=(VectorClass &a) { x+=a.X(); y+=a.Y(); z+=a.Z(); return *this; } double VectorClass::Dot(VectorClass &a) { return (a.X() * X() + a.Y() * Y() + a.Z() * Z()); } achilles-2/vector.h0100644000175000001440000000236107226463024013165 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef VECTOR_H_46768 #define VECTOR_H_46768 class VectorClass { private: double x,y,z; public: VectorClass(); VectorClass(double,double,double); VectorClass(double,double); ~VectorClass(); double X(); double Y(); double Z(); double X(double); double Y(double); double Z(double); double Magnitude(); bool operator ==(VectorClass &); bool operator !=(VectorClass &); VectorClass & operator +=(VectorClass &); friend VectorClass operator -(VectorClass &,VectorClass &); double Dot(VectorClass &); }; #endif achilles-2/world.cc0100644000175000001440000000462707226463024013157 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include"world.h" #include"vector.h" #include"defines.h" #include extern int FLOOR_BLOCKS_Z,FLOOR_BLOCKS_X,NUM_FOOD,NUM_ORGANISMS; WorldClass::WorldClass(int argc, char *argv[]) { size.X(WORLD_X); size.Y(WORLD_Y); size.Z(WORLD_Z); position.Y(1); position.Z(5); } WorldClass::~WorldClass() { } VectorClass &WorldClass::Size() { return size; } VectorClass &WorldClass::Pos() { return position; } AngleClass &WorldClass::Heading() { return heading; } VectorClass * WorldClass::NewPosition() { VectorClass *v; // v= new VectorClass(Size().X()/2-FLOOR_QUAD_SIZE/2,0,Size().Z()/2+FLOOR_QUAD_SIZE/2); // v= new VectorClass(-Size().X()/2-FLOOR_QUAD_SIZE/2,0,Size().Z()/2+FLOOR_QUAD_SIZE/2); // v= new VectorClass(Size().X()/2-FLOOR_QUAD_SIZE/2,0,-Size().Z()/2-FLOOR_QUAD_SIZE/2); // v= new VectorClass(-Size().X()/2-FLOOR_QUAD_SIZE/2,0,-Size().Z()/2-FLOOR_QUAD_SIZE/2); v=new VectorClass(double(rand())/RAND_MAX * Size().X() - Size().X()/2-FLOOR_QUAD_SIZE/2, 0, double(rand())/RAND_MAX * (Size().Z()+FLOOR_QUAD_SIZE) - Size().Z()/2-FLOOR_QUAD_SIZE/2); return v; } bool WorldClass::ChangePosition(VectorClass &p, VectorClass &d) { if(p.X() + d.X() > (FLOOR_BLOCKS_X/2)*FLOOR_QUAD_SIZE) d.X((FLOOR_BLOCKS_X/2)*FLOOR_QUAD_SIZE - p.X()); if(p.X() + d.X() < (-FLOOR_BLOCKS_X/2-1)*FLOOR_QUAD_SIZE) d.X((-FLOOR_BLOCKS_X/2-1)*FLOOR_QUAD_SIZE - p.X()); if(p.Z() + d.Z() > FLOOR_BLOCKS_Z/2*FLOOR_QUAD_SIZE) d.Z(FLOOR_BLOCKS_Z/2*FLOOR_QUAD_SIZE - p.Z()); if(p.Z() + d.Z() < (-FLOOR_BLOCKS_Z/2-1)*FLOOR_QUAD_SIZE) d.Z((-FLOOR_BLOCKS_Z/2-1)*FLOOR_QUAD_SIZE - p.Z()); p.X(p.X() + d.X()); p.Y(p.Y() + d.Y()); p.Z(p.Z() + d.Z()); return true; } achilles-2/world.h0100644000175000001440000000213407226463024013010 0ustar mrdusers/* Copyright (C) 2000 Matthew Danish This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WORLD_H_78344 #define WORLD_H_78344 #include"vector.h" #include"angle.h" class WorldClass { private: VectorClass size; VectorClass position; AngleClass heading; public: WorldClass(int,char **); ~WorldClass(); VectorClass &Size(); VectorClass &Pos(); AngleClass &Heading(); bool ChangePosition(VectorClass &,VectorClass &); VectorClass *NewPosition(); }; #endif