pax_global_header00006660000000000000000000000064114356354410014520gustar00rootroot0000000000000052 comment=10cb4a6f32098ba9eb6aa9d0007946b4d8ecd519 asciijump-1.0.2~beta/000077500000000000000000000000001143563544100145365ustar00rootroot00000000000000asciijump-1.0.2~beta/COPYING000066400000000000000000000431101143563544100155700ustar00rootroot00000000000000 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 How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. asciijump-1.0.2~beta/Makefile.in000066400000000000000000000146501143563544100166110ustar00rootroot00000000000000# :: Makefile.in for aciijump project, # GCCPREFIX = @ # comment this line to enable normal output << PACKAGE = asciijump VERSION = @PACKAGE_VERSION@ SHELL = /bin/sh prefix = @prefix@ exec_prefix = @exec_prefix@ sysconfdir = @sysconfdir@ bindir = @bindir@ datadir = @datadir@ mandir = @mandir@ vardir = @localstatedir@ CC = @CC@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ TAR = tar GZIP = gzip TAR_OPTIONS = GZIP_ENV = --best INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_DIR = @INSTALL@ -d srcdir = @srcdir@ top_srcdir = @top_srcdir@ subdir = VPATH = ${srcdir} ifeq (${subdir},) top_builddir = . else top_builddir = .. endif builddir = @builddir@ EXTRA_DIST = configure configure.ac config.h.in install-sh \ config.guess config.sub asciijump.png asciijump.desktop \ asciijump.spec COPYING README README-pl gfx hills include asciijump.6 CLEANFILES = ${SOURCES:.c=.da} DISTCLEANFILES = Makefile config.status config.log MAINTCLEANFILES = configure INCLUDES = -I. -I${top_srcdir}/include -I${top_builddir} DEFINES = -DVERSION=\"${VERSION}\" -DPACKAGE=\"${PACKAGE}\" \ -DDATADIR=\"${datadir}/${PACKAGE}\" -DVARDIR=\"${vardir}/games/asciijump/\" ALL_CFLAGS = ${INCLUDES} ${DEFINES} ${CFLAGS} -g LIBS = @LIBS@ ALL_LDFLAGS = ${LIBS} ${LDFLAGS} # colors color="" color_light="" color_reset="" # asciijump client ac_name = "asciijump" ac_src = $(wildcard scr*.c) \ cmdline.c\ wsys.c\ frame.c\ skier.c\ hill.c\ skin.c\ matrix.c\ intro.c\ main.c\ slang.c\ client.c\ cup.c ac_obj = $(addprefix bin/,${ac_src:.c=.o}) # asciijump eerver as_name = "aj-server" as_src = $(wildcard as*.c) as_obj = $(addprefix bin/,${as_src:.c=.o}) # object used in ac and as to other_src = xfnc.c other_obj = $(addprefix bin/,${other_src:.c=.o}) DISTFILES = ${ac_src} ${as_src} ${other_src} ${HEADERS} Makefile.in ${EXTRA_DIST} bin/%.o: %.c @echo @echo -n "$< .. " ${GCCPREFIX}${CC} ${ALL_CFLAGS} -c $< -o $@ @echo -n "ok"; all: bin ${ac_name} ${as_name} ${other_obj} @echo @ctags ${other_src} ${as_src} ${ac_src} include/* @echo "type: ${color}./${ac_name}${color_reset} to run asciijump client" @echo "type: ${color}./${as_name}${color_reset} to run asciijump server" bin: @[ -d bin ] || mkdir bin ac_info: @echo -n "${color}creating client ${color_light}{${color_reset}" ${ac_name}: ac_info ${other_obj} ${ac_obj} @${CC} ${ALL_LDFLAGS} -o $@ ${ac_obj} ${other_obj} @echo " ${color_light}} .. ${color}ok${color_reset}" @echo as_info: @echo -n "${color}creating server ${color_light}{${color_reset}" ${as_name}: as_info ${other_obj} ${as_obj} @${CC} ${ALL_LDFLAGS} -o $@ ${as_obj} ${other_obj} @echo " ${color_light}} .. ${color}ok${color_reset}" install: all ${INSTALL} -d ${DESTDIR}${datadir}/${ac_name} find gfx -type d ! -path '*CVS*' -exec \ ${INSTALL} -d ${DESTDIR}${datadir}/${PACKAGE}/{} \; find gfx -type f ! -path '*CVS*' -exec ${INSTALL_DATA} {} \ ${DESTDIR}${datadir}/${PACKAGE}/{} \; find hills -type d ! -path '*CVS*' -exec \ ${INSTALL} -d ${DESTDIR}${datadir}/${PACKAGE}/{} \; find hills -type f ! -path '*CVS*' -exec ${INSTALL_DATA} {} \ ${DESTDIR}${datadir}/${PACKAGE}/{} \; ${INSTALL} -d ${DESTDIR}${bindir}/ ${INSTALL_PROGRAM} ${ac_name} ${DESTDIR}${bindir}/ ${INSTALL_PROGRAM} ${as_name} ${DESTDIR}${bindir}/ ${INSTALL} -d $(DESTDIR)$(prefix)/share/applications ${INSTALL} -m 644 asciijump.desktop \ $(DESTDIR)$(prefix)/share/applications ${INSTALL} -d $(DESTDIR)$(prefix)/X11R6/share/pixmaps ${INSTALL} -m 644 asciijump.png $(DESTDIR)$(prefix)/X11R6/share/pixmaps ${INSTALL} -d $(DESTDIR)$(prefix)/share/pixmaps ${INSTALL} -m 644 asciijump.png $(DESTDIR)$(prefix)/share/pixmaps ${INSTALL} -d $(DESTDIR)$/$(mandir)/man6 ${INSTALL} -m 644 asciijump.6 $(DESTDIR)$/$(mandir)/man6 ${INSTALL} -d $(DESTDIR)$/$(vardir)/games ${INSTALL} -d -m 777 $(DESTDIR)$/$(vardir)/games/asciijump install-strip: ${MAKE} INSTALL_PROGRAM='${INSTALL_PROGRAM} -s' install uninstall: rm -f ${DESTDIR}${bindir}/${ac_name} rm -f ${DESTDIR}${bindir}/${as_name} rm -rf ${DESTDIR}${datadir}/${name} rm -f $(DESTDIR)$(prefix)/X11R6/share/applnk/Games/Arcade/asciijump.desktop rm -f $(DESTDIR)$(prefix)/share/applnk/Games/Arcade/asciijump.desktop rm -f $(DESTDIR)$(prefix)/X11R6/share/pixmaps/asciijump.png rm -f $(DESTDIR)$(prefix)/share/pixmaps/asciijump.png rm -f $(DESTDIR)/$(mandir)/man6/asciijump.6 distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} dist: test -z "${distdir}" || rm -rf "${distdir}" ${INSTALL_DIR} ${distdir} @list='${DISTFILES}'; for f in $$list; do \ if test -e ${srcdir}/$$f; then \ fn=${srcdir}/$$f; \ else \ fn=$$f; \ fi ; \ echo cp -pr $$fn ${distdir}/$$f ;\ cp -pr $$fn ${distdir}/$$f ;\ done find ${distdir} -type d -name 'CVS' | xargs rm -rf find ${distdir} -type d -name '.svn' | xargs rm -rf ${TAR} ${TAR_OPTIONS} -cf - ${PACKAGE}-${VERSION} | ${GZIP} ${GZIP_ENV} >${PACKAGE}-${VERSION}.tar.gz test -z "${distdir}" || rm -rf "${distdir}" distcheck: dist ${GZIP} -dfc ${PACKAGE}-${VERSION}.tar.gz | tar ${TAR_OPTIONS} -xf - cd ${PACKAGE}-${VERSION} && ./configure ${MAKE} -C ${PACKAGE}-${VERSION} all install dist DESTDIR=$(shell pwd)/${PACKAGE}-${VERSION} rm -rf ${PACKAGE}-${VERSION} @banner="${PACKAGE}-${VERSION}.tar.gz is ready for distribution." ;\ dashes=`echo "$$banner" | sed -e s/./=/g`; \ echo "$$dashes" ;\ echo "$$banner" ;\ echo "$$dashes" mostlyclean clean: rm -fr *~ ${ac_name} ${as_name} bin tags core test -z "${CLEANFILES}" || rm -rf ${CLEANFILES} distclean: clean rm -f Makefile test -z "${DISTCLEANFILES}" || rm -rf ${DISTCLEANFILES} maintainer-clean: distclean test -z "${MAINTCLEANFILES}" || rm -rf ${MAINTCLEANFILES} distdir = ${top_builddir}/${PACKAGE}-${VERSION}/${subdir} distdir: ${DISTFILES} ${INSTALL_DIR} ${distdir} @list='${DISTFILES}'; for f in $$list; do \ if test -e ${srcdir}/$$f; then \ fn=${srcdir}/$$f; \ else \ fn=$$f; \ fi ; \ echo cp -p $$fn ${distdir}/$$f ;\ cp -p $$fn ${distdir}/$$f ;\ done ${builddir}/Makefile: ${srcdir}/Makefile.in ${top_builddir}/config.status cd ${top_builddir} && ./config.status ## -- Dependencies -- ## ${top_builddir}/config.h: ${top_builddir}/config.status ## -- ${MAKE} control -- ## .PHONY: all bin install clean distclean mostlyclean \ uninstall maintainer-clean distdir dist distcheck .SUFFIXES: .SUFFIXES: .c .o .DEFAULT: all asciijump-1.0.2~beta/README000066400000000000000000000023751143563544100154250ustar00rootroot00000000000000:: asciijump, version 0.0.1 Wed Feb 12 03:52:21 CET 2003 :: asciijump is a small and funny ASCII-art game about ski jumping. r e q u i r e s : slang-devel i n s t a ll : Following sequence of shell commands should build, check and install this game: autoconf ./configure make all su make install Installation prefix defaults to /usr/local, see ./configure --help for info how to override it. l i c e n s e : gnu gpl v 2. a s c i i j u m p s e r v e r s i m p l e u s a g e : "invite" - this allow users to join in. "hill read random" - this add some random hills. when some users are connected, (check it by "user show *" ) type : "play" - to strat playing. type "help", or "'command' help" to get more info a u t h o r s: grzegorz moskal , michal moskal , przemek niezobrala t h a n k s : gergely nagy he was very helpfull and wrote "autostuff" rafal zawadzki manual page author. c o n t a c t : send bugreports, fixes wishes etc. to grzegorz moskal d o w n l o a d : please visit project home page: http://asciijump.prv.pl I h o p e y o u ` l l e n o j y t h e s h o w ; ) ! asciijump-1.0.2~beta/README-pl000066400000000000000000000036321143563544100160330ustar00rootroot00000000000000:: asciijump, version 0.0.1 Wed Feb 12 03:52:21 CET 2003 :: o p r o j e k c i e : Kiedys przyszlo mi do glowy szyderstwo, ze mozna by tak napisac skoki narciarskie w trybie textowym ;) k o m p i l a c j a : asciijump uzywa bibloteki slang, wiec potrzbna bedzie paczka slang-devel ;/ a s c i i j u m p s e r w e r : aby uruchomic serwer asciijump, nalezy w powoloce wpisac : ./aj-server n a j p r o s t s z e u z y c i e s e r w e r a : "hill read random;" - aby przeczytac losowe skocznie z tych rozprowadzanych z paczka (skladowanych w ${datadir}/asciijump) "hill add nazwa dlugosc" - aby dodac swoja. "invite" - aby pozwoilic gracza na dolanczanie sie do naszego serwera. po tym jak juz jest wystarczajaca ilosc ludzi piszemy: "play" - aby wystartowac gre. "user kick nazwa_gracza" - aby wyrzucic gracza. aby uzyskac szersza pomoc nalezy wpisac: "help" aby uzyskac szersza pomoc o komendzie nalezy wpisac: "nazwa_komendy help" k l a w i s z o l o g i a : w samym programie dostepny jest wielce obszerny help, ale napisze jeszcze kilka slow. w okienkach: enter - aby wejsc do pozycji menu. spacja - aby zaznaczyc pozycje menu - uzywane do zaznaczania skoczni i zawodnikow w trybie "world cup". na pagorku : enter - aby zaczac zjazd, wybic skoczka lub wyladowac. strzalki (prawo, lewo) - aby zmienic nachylenie skoczka Algorytm losowego przyznawania punktow sedziowskich, w duzej mierze zalezy od nachylenia skoczka w fazach lotu. d z i a l a n i e : wyglad skoczka czytany jest z katalgu: ${datadir}/asciijump/gfx skocznie (ich dlugosci i nazwy) czytane sa z katalogu : ${datadir}/asciijump/hills l i c e n c j a : gnu gpl wersja druga. a u t o r z y : grzegorz moskal, michal moskal i przemek niezobrala - algorytm rysowania skoczni. r o b a k i : komentarze, raporty o bledach, zyczenia itp. prosze wysylac pod adres: m i l y c h o d l o t o w ;) asciijump-1.0.2~beta/as_display.c000066400000000000000000000036561143563544100170440ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_DISPLAY_C #include "as_display.h" int as_allow_colored_prompt = 1; int as_debug = 0; void as_colored_prompt(char *prompt) { int c, h = 1, c2 = -1, h2 = 0; printf("\r"); if (as_allow_colored_prompt == 0) { if (strcmp(prompt, PROMPT) == 0) printf("%s",PROMPTPREFIX); printf("%s", prompt); return; } if (strcmp(prompt, ERR) == 0) { c = Black; h = 1; c2 = Red; } else if (strcmp(prompt, DEBUG) == 0) { c = Green; h = 1; c2 = Green; h2 = 0; } else if (strcmp(prompt, MSG) == 0) { c = Black; h = 1; c2 = White; h2 = 0; } else if (strcmp(prompt, PROMPT) == 0) { c = Cyan; c2 = None; h = 0; h2 = 0; printf("[%d;%dm%s", (h == 0), c, PROMPTPREFIX); } else if (strcmp(prompt, LOGO) == 0) { c = Black; h = 1; c2 = Brown; } else c = None; if (c2 == -1) c2 = c; printf("[%d;%dm%s[%d;%dm",h, c, prompt, h2, c2); fflush(stdout); } void as_display(char *prompt, char *fmt, ...) { va_list ap; char *s; int d; int arg = 0; if (strcmp(prompt, DEBUG) == 0 && as_debug == 0) return; va_start(ap, fmt); as_colored_prompt(prompt); for (; *fmt; fmt++) switch (*fmt) { case '%': arg = 1; continue; case 's': if (arg) { s = va_arg(ap, char *); printf("%s", s); arg = 0; } else putchar(*fmt); break; case 'd': if (arg) { d = va_arg(ap, int); printf("%d", d); arg = 0; } else putchar(*fmt); break; case '\n': printf("\n"); as_colored_prompt(prompt); break; default: putchar(*fmt); } va_end(ap); printf("\n"); if (strcmp(prompt, LOGO)) as_prompt(); } void as_eerr(char *text, int status) { printf("system error>> "); perror(text); printf("\n"); fflush(stdout); exit(status); } void as_prompt(void) { as_colored_prompt(PROMPT); fflush(stdout); } asciijump-1.0.2~beta/as_getline.c000066400000000000000000000036671143563544100170300ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_GETLINE_C #include "as_getline.h" char **as_argv; int as_argc; int as_current; #define INC 10 static void as_c_put(char **v, int c) { static int len, i; static char *word = 0; if (v == NULL) { word = xfree(word); len = 0; i = -1; return; } if (++i == len) { len = i*2+INC; word = xrealloc(word, sizeof(char) * (len+1)); *v = word; } word[i] = c; } static lex as_getword(char **v) { enum { NORMAL, STRING, WORD } state = NORMAL; int c; as_c_put(NULL, 0); *v = NULL; while ((c = getchar()) != EOF) { switch (state) { case NORMAL: switch (c) { case ';': return T_SEMI; case '\n': return T_NL; case '\t': case ' ': continue; case '"': state = STRING; continue; default : state = WORD; as_c_put(v, c); continue; } case STRING: switch (c) { case '"': as_c_put(v, '\0'); return T_WORD; case '\\': as_c_put(v, getchar()); continue; default: as_c_put(v, c); continue; } case WORD: switch (c) { case ';': case '\n': case '\t': case ' ': ungetc(c, stdin); as_c_put(v, '\0'); return T_WORD; default : as_c_put(v, c); continue; } } } return T_EOF; } int as_getline(void) { char *word; int len = 0; lex l; if (as_argc > 0) { while (--as_argc >= 0) xfree(as_argv[as_argc]); xfree(as_argv); } as_argv = NULL; as_argc = 0; as_current = 0; for (;;) { if (as_argc == len) { len = as_argc*2 + INC; as_argv = xrealloc(as_argv, sizeof(char*)*(len+1)); } switch ((l = as_getword(&word))) { case T_WORD: as_argv[as_argc++] = strdup(word); continue; case T_SEMI: case T_NL: as_argv[as_argc] = NULL; if (as_argc == 0 && l != T_NL) return T_ERROR; default: return l; } } return 0xdead; // never returned. } asciijump-1.0.2~beta/as_hill.c000066400000000000000000000127351143563544100163250ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_HILL_C #include "as_hill.h" struct as_hill *as_hill_head; struct as_hill *as_hill_tail; struct as_hill *as_hill_current; int as_hill_counter; char *as_hilldir = DATADIR"/hills"; static void as_hill_cleanup(void) { struct as_hill *jumper, *tmp; for (jumper = as_hill_head; jumper;) { tmp = jumper; SWITCH(jumper); xfree(tmp->name); xfree(tmp); } as_hill_head = as_hill_tail = as_hill_current = NULL; as_hill_counter = 0; } static void as_hill_delete(struct as_hill *hill) { if (hill->next) { if (hill->prev) { hill->prev->next = hill->next; hill->next->prev = hill->prev; } else { hill->next->prev = NULL; SWITCH(as_hill_head); } } else { if (hill->prev) { hill->prev->next = NULL; PREV(as_hill_tail); } else { as_hill_head = as_hill_tail = NULL; } } as_hill_counter--; as_display(DEBUG, "hill deleted, %s %d", hill->name, hill->length); } static void as_hill_add(struct as_hill *hill) { if (as_hill_head == NULL) as_hill_head = as_hill_tail = as_hill_current = hill; else { hill->prev = as_hill_tail; as_hill_tail->next = hill; SWITCH(as_hill_tail); } as_hill_counter++; as_display(DEBUG, "hill added, %s %d", hill->name, hill->length); } static struct keyword_action as_hill_keywords[] = { { "show", as_hill_show }, { "delete", as_hill_parse_delete }, { "del", as_hill_parse_delete }, { "add", as_hill_parse_add }, { "read", as_hill_parse_read }, { "help", as_hill_help }, { NULL, NULL} }; void as_hill_parse() { if (as_argv[as_current] == NULL) as_hill_help(); else if (as_run_keyword_action(as_hill_keywords) == 0) as_display(ERR, "bad magic word, try: hill help"); } static void as_hill_show() { struct as_hill *hill = as_hill_head; char *line = "name = %s, length = %d", *buf; int len = 0; if (as_hill_head == NULL) { as_display(MSG, "sorry .. there is no hill, try: hill add"); return; } for (; hill; SWITCH(hill)) if (strlen(hill->name) > (size_t)len) len = strlen(hill->name); buf = xmalloc(sizeof(char) * (strlen(line) + len + 12)); for (hill = as_hill_head; hill; SWITCH(hill)) { sprintf(buf, line, hill->name, hill->length); as_display(MSG, buf); } xfree(buf); } static void as_hill_service_adding(void) { as_hill_add(as_hill_init(hill_name, hill_length)); } static void as_hill_read(void) { if (hill_readdir_extend(as_hilldir, &as_hill_counter, as_hill_service_adding) == -1) as_display(ERR, "no such directory, try type: let hilldir /foo/hilldir"); else if (as_hill_counter == 0) as_display(MSG, "empty dir."); } static void as_hill_read_random(void) { struct as_hill *hill, *h2, *head = as_hill_tail; as_hill_read(); if (head == NULL) head = as_hill_head; for (hill = head; hill; ) { if (d(2) == 2) { h2 = hill; SWITCH(hill); as_hill_delete(h2); } else SWITCH(hill); } as_hill_current = as_hill_head; } static void as_hill_parse_read(void) { char *word = as_argv[as_current]; struct as_hill * hill; int n = as_hill_counter; if (word == NULL || strcmp(word, "*") == 0) as_hill_read(); else if (strcmp(word, "random") == 0 || strcmp(word, "r") == 0) as_hill_read_random(); else as_display(ERR, "unknown keyword: %s", word); } static void as_hill_parse_delete() { char *word = as_argv[as_current]; struct as_hill * hill; int n = as_hill_counter; if (word == NULL) { as_display(ERR, "no input hill, try type hill help"); return; } if (*word == '*') as_hill_cleanup(); else if (word[strlen(word)-1] == '*') { int len = strlen(word) - 2; again: for (hill = as_hill_head; hill; SWITCH(hill)) if (strncmp(hill->name, word, len) == 0) { as_hill_delete(hill); goto again; } } else for (hill = as_hill_head; hill; SWITCH(hill)) if (strcmp(hill->name, word) == 0) as_hill_delete(hill); n -= as_hill_counter; if (n) as_display(MSG, "%d hill%s deleted", n, (n > 1) ? "s" : ""); else as_display(ERR, "pattern not found: %s", word); } static struct as_hill *as_hill_init(char *name, int len) { struct as_hill * hill = XALLOC(as_hill); hill->name = strdup(name); hill->length = len; if (len < 0) hill->length *= -1; return hill; } static void as_hill_parse_add() { char *name = NULL, *line = NULL; int len; if (as_argc < 3) { as_display(MSG, "please write hill`s name: "); name = xgetline(stdin); } else name = strdup(as_argv[2]); if (as_argc < 4) { as_display(MSG, "please write hill`s length: "); line = xgetline(stdin); len = strtol(line, NULL, 10); } else len = strtol(as_argv[3], NULL, 10); if (len > 20 && len < 300) { as_display(MSG, "hill added successful, name: %s, length: %d", name, len); as_hill_add(as_hill_init(name, len)); } else as_display(MSG, "length %d - value out of bound <20, 300>", len); xfree(line); xfree(name); } static char *as_hill_help_text = "hill [option] [suboption]\n\n" "hill show - display all hills\n" "hill delete ${name} - remove given hill\n" " delete foo - remove hill named foo\n" " delete * - remove all hills\n" " delete foo* - remove all hills begining by foo\n" "hill add ${name} ${length} - add given hill\n" "hill read - it read every files from hilldir directory\n" "hill random - it read randomize files from hilldir directory\n" "[hill dir could be change be typing: let hilldir /foo/bar]" "hill help - show this help screen"; static void as_hill_help() { as_display(MSG, as_hill_help_text); } asciijump-1.0.2~beta/as_let.c000066400000000000000000000107401143563544100161530ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_LET_C #include "as_let.h" struct var *as_let_head, *as_let_tail; static void as_let_add_var(struct var *v) { if (as_let_head == NULL) as_let_head = as_let_tail = v; else { as_let_tail->next = v; SWITCH(as_let_tail); } } void as_let_add_int(char *name, int *dest, int lower, int upper, char *help) { struct var *v = XALLOC(var); struct int_var *iv = XALLOC(int_var); iv->dest = dest; iv->lower = lower; iv->upper = upper; v->variable = (void *)iv; v->name = strdup(name); v->type = VINT; v->help = strdup(help); v->next = NULL; as_let_add_var(v); } void as_let_add_str(char *name, char **dest, char *help) { struct var *v = XALLOC(var); struct str_var *sv = XALLOC(str_var); sv->dest = dest; v->variable = (void *)sv; v->name = strdup(name); v->type = VSTRING; v->help = strdup(help); v->next = NULL; as_let_add_var(v); } static void as_let_init(void) { as_let_add_int("colors", &as_allow_colored_prompt, 0, 1, "define if display colors"); as_let_add_int("port", (int *)&as_port, 1000, 20000, "define port to listen for this program"); as_let_add_int("players", &as_limit, 2, 20, "define max player limit"); as_let_add_str("name", &as_name, "define this server name (displayed in users)"); as_let_add_str("hilldir", &as_hilldir, "define hill directory (used when typed: hill read)"); as_let_add_int("verbose", &as_debug, 0, 1, "define if display diagnostic output"); } static struct keyword_action as_let_keywords[] = { { "show", as_let_show }, { "help", as_let_help }, { NULL, NULL} }; void as_let_parse(void) { if (as_let_head == NULL) as_let_init(); if (as_argv[1] == 0) as_let_show(); else if (as_run_keyword_action(as_let_keywords) == 0) as_let_set(); } static void as_let_set() { char *word = as_argv[1]; struct var *v = as_let_find_var(word); if (v == NULL) as_display(ERR, "there is no varible called: %s", word); else if ((word = as_argv[2]) == NULL) as_let_show_var(v, List); else as_let_set_var(v, word); } static void as_let_set_int(struct int_var *iv, char *s) { int nv = strtol(s, NULL, 10); if (nv < iv->lower || nv > iv->upper) as_display(ERR, "%s: value out of bound", s); else { *(iv->dest) = nv; as_display(MSG, "new value: %d", *(iv->dest)); } } static void as_let_set_str(struct str_var *sv, char *s) { *(sv->dest) = strdup(s); as_display(MSG, "new value: %s", *(sv->dest)); } static void as_let_set_var(struct var *v, char *s) { switch (v->type) { case VINT: as_let_set_int((struct int_var *)v->variable, s); break; case VSTRING: case VFILE: // tmp, pwd not taken! as_let_set_str((struct str_var *)v->variable, s); break; } } static struct var *as_let_find_var(char *name) { struct var *v = as_let_head; for (; v; SWITCH(v)) if (strcmp(v->name, name) == 0) break; return v; } static void as_let_show_var(struct var *v, int type) { if (v == NULL) return; else if (v->type == VINT) { struct int_var* iv = (struct int_var *)v->variable; if (type == List) as_display(MSG, "%s = %d", v->name, *(iv->dest)); else as_display(MSG, "%s - %s", v->name, iv->lower, iv->upper, v->help); } else { struct str_var* sv = (struct str_var *)v->variable; if (type == List) as_display(MSG, "%s = %s", v->name, *(sv->dest)); else as_display(MSG, "%s <%s> - %s", v->name, (v->type == VSTRING) ? "string" : "file", v->help); } } static void as_let_show_all(int state) { struct var *v = as_let_head; for (v = as_let_head; v; SWITCH(v)) as_let_show_var(v, state); } static void as_let_show(void) { char *word = as_argv[1]; struct var *v; if (word == NULL || (word = as_argv[2]) == NULL || strcmp(word, "*") == 0) as_let_show_all(List); else if ((v = as_let_find_var(word))) as_let_show_var(v, List); else as_display(ERR, "there is no variable called: %s", word); } static char *as_let_help_text = "let [option]\n\n" "let show - display all variables\n" "let show ${name} - display given variable\n" "let help - show this help\n" "let help ${name} - remove given let\n" "let ${name} foo - set value of $name to foo\n\n" "current variables are:"; static void as_let_help() { char *word = as_argv[2]; struct var *v; if (word == NULL) { as_display(MSG, as_let_help_text); as_let_show_all(Help); } else if ((v = as_let_find_var(word))) as_let_show_var(v, Help); else as_display(ERR, "there is no variable called: %s", word); } asciijump-1.0.2~beta/as_main.c000066400000000000000000000200741143563544100163140ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define ASERVER_C #include "aserver.h" struct s_as_players *as_players; uint16_t as_port = 2051; int as_limit = 2; s_state as_state = AS_command; s_state as_work = AS_command; char *as_name = "classic asciijump"; static int as_socket; char *as_state_array[] = { "AS_bye", "AS_listen", "AS_command", "AS_read", "AS_play", "AS_prepare", }; void as_send_users() { struct s_as_player *p; char buf[4]; // first whole user list is sending to the new client for (p = as_players->head; p; SWITCH(p)) { sprintf(buf, "%d", p->id); if (p == as_players->tail) { as_send(p, Id, buf); as_send(p, You, p->name); break; } as_send(as_players->tail, Id, buf); as_send(as_players->tail, User, p->name); } as_del_players(); // if this client is not first, he`s name is sending to others if (as_players->head != as_players->tail) { sprintf(buf, "%d", as_players->tail->id); for (p = as_players->head; p != as_players->tail; SWITCH(p)) { as_send(p, Id, buf); as_send(p, User, as_players->tail->name); } } as_del_players(); } void as_send_results() { struct s_as_player *p, *p2; char buf[6]; for (p2 = as_players->head; p2; SWITCH(p2)) { for (p = as_players->head; p; SWITCH(p)) { sprintf(buf, "%d", p->id); as_send(p2, Id, buf); sprintf(buf, "%d", p->result); as_send(p2, Results, buf); // sending id } as_send(p2, Everyone, ""); } as_del_players(); } void as_add_player() { struct s_as_player *player = XALLOC(s_as_player); struct sockaddr_in addr; socklen_t size = sizeof(addr); if ((player->socket = accept(as_socket, (struct sockaddr *)&addr, &size)) == -1) as_eerr("accept", 5); player->hostname = strdup(inet_ntoa(addr.sin_addr)); player->status = P_read; if ((player->name = xread(player->socket)) == NULL) { as_display(MSG, "broken connection from: %s\n", player->hostname); xfree(player->hostname); xfree(player); return; } if (as_players->head == NULL) as_players->tail = as_players->head = player; else { player->prev = as_players->tail; as_players->tail->next = player; SWITCH(as_players->tail); player->id = player->prev->id + 1; } as_display(DEBUG, "adding : %s", player->name); as_display(MSG, "new connection from host:%s, port:%d, name:%s", player->hostname, ntohs(addr.sin_port), player->name); as_players->counter++; as_send(player, Msg, as_name); as_send_users(); } void as_del_player(struct s_as_player *p) { if (p->next) { if (p->prev) { p->prev->next = p->next; p->next->prev = p->prev; } else { p->next->prev = NULL; SWITCH(as_players->head); } } else { if (p->prev) { p->prev->next = NULL; PREV(as_players->tail); } else { as_players->head = as_players->tail = NULL; } } as_players->counter--; as_display(DEBUG, "deleting : %s", p->name); xfree(p->hostname); xfree(p->name); xfree(p); } static struct s_as_player *as_ff_players(int n) { struct s_as_player *p = as_players->head; while (n-- > 0) SWITCH(p); return p; } void as_send(struct s_as_player *p, n_type type, char *buf) { int len = strlen(buf) + 3; char *s = malloc(sizeof(char)*len); sprintf(s, "%c%s\n", type, buf); as_display(DEBUG, "sending to %s [ %s: %s ]", p->name, n_type_description(type), buf); if (write(p->socket, s, len) < len) { as_display(DEBUG, "cannot write to: %s@%s, he`s deleting ;)", p->name, p->hostname); p->status = P_del; } } static void as_send2players(n_type t, char *buf) { struct s_as_player *p = as_players->head; for (; p; SWITCH(p)) as_send(p, t, buf); as_del_players(); } static void as_send_hill(void) { char *buf = xmalloc(sizeof(char) * (strlen(as_hill_current->name) + 10)); sprintf(buf, "%d%s", as_hill_current->length, as_hill_current->name); as_send2players(Hill, buf); xfree(buf); SWITCH(as_hill_current); } static void as_prepare_players(void) { struct s_as_player *p = as_players->head; for (; p; SWITCH(p)) p->status = P_read; } int as_create_socket(void) { struct sockaddr_in name; if ((as_socket = socket(PF_INET, SOCK_STREAM, 0)) == -1) as_eerr("socket", 3); name.sin_family = AF_INET; name.sin_port = htons(as_port); name.sin_addr.s_addr = htonl(INADDR_ANY); if (bind(as_socket, (struct sockaddr *) &name, sizeof(name)) == -1) { as_display(ERR, "bind problem:"); printf("\r"); perror("bind faild"); printf("\n"); return 0; } return 1; } void as_listen(void) { if (listen(as_socket, as_limit) == -1) as_eerr("listen", 4); as_display(MSG, "server name: %s", as_name); as_display(MSG, "listen port: %d", as_port); as_display(MSG, "users limit: %d", as_limit); } static int as_invite_players(void) { struct pollfd ufds [] = { {0, POLLIN, 0}, {as_socket, POLLIN, 0} }; poll(ufds, 2, 1000); if (ufds[0].revents & POLLIN) return 1; else if (ufds[1].revents & POLLIN) { if (as_players->counter < as_limit) as_add_player(); else return 0x0; } return as_invite_players(); } static int as_every_results_read(void) { struct s_as_player *p = as_players->head; for (; p; SWITCH(p)) if (p->status == P_read) return 0; return 1; } static void as_del_players(void) { struct s_as_player *p; for (p = as_players->head; p;) { if (p->status == P_del) { as_del_player(p); p = as_players->head; } else SWITCH(p); } } static s_state as_read() { s_state ret = as_state; const int len = as_players->counter +1; struct pollfd as_ufds[len]; int i = 0; struct s_as_player *p = as_players->head; char *line; for (i = 0; i < len-1; SWITCH(p), i++) { as_ufds[i].fd = p->socket; as_ufds[i].events = POLLIN; as_ufds[i].revents = 0; } as_ufds[i].events = POLLIN; as_ufds[i].fd = 0; as_ufds[i].revents = 0; if (poll(as_ufds, as_players->counter+1, 1000) == -1) as_eerr("poll", 8); if (as_ufds[as_players->counter].revents & POLLIN) return AS_command; for (i = 0; i < len-1; i++) { if (!(as_ufds[i].revents & POLLIN)) continue; p = as_ff_players(i); line = xread(p->socket); if (line == NULL) { p->status = P_del; continue; } else if (*line != Results) continue; p->result = strtol(line + 1, NULL, 10); as_display(MSG, "%s@%s jump result: %d", p->name, p->hostname, p->result); xfree(line); p->status = P_done; } as_del_players(); if (as_every_results_read() == 0) return as_read(); else { as_send_results(); ret = AS_prepare; } return ret; } static s_state as_prepare_jump() { if (as_hill_current == NULL) return AS_finish; as_prepare_players(); as_send_hill(); return AS_read; } void as_set_state(s_state s) { as_state = s; // as_display(DEBUG, as_state_array[s]); } static int as_command(void) { switch (as_getline()) { case T_EOF: return 0; case T_SEMI: if (as_parse() == 0) return 0; as_loop(); break; case T_ERROR: as_display(ERR, "syntax error"); case T_NL: if (as_parse() == 0) return 0; if (as_state == AS_command) as_set_state(as_work); as_prompt(); } return 1; } void as_finish() { struct s_as_player *p = as_players->head; as_send2players(Bye, ""); // closing sockets for (; p; SWITCH(p)) close(p->socket); as_display(LOGO, "thanks for testing."); exit(0); } static int as_loop() { switch (as_state) { case AS_listen: if (as_invite_players() == 0) as_display(ERR, "to much players, try change limit" " (let limit 20)"); as_set_state(AS_command); break; case AS_command: if (as_command() == 0) as_set_state(AS_finish); break; case AS_read: as_set_state(as_read()); break; case AS_play: as_display(MSG, "game started successful"); as_set_state(AS_prepare); break; case AS_prepare: as_set_state(as_prepare_jump()); break; case AS_finish: as_finish(); return 0; } return 1; } void as_init(void) { signal(SIGINT, as_finish); as_players = XALLOC(s_as_players); as_display(LOGO, "U can`t B dead all the time"); as_display(MSG, "welcome to asciijump experimental server."); rand_init(); } int main() { as_init(); for (;;) if (as_loop() == 0x0) break; return 0; } asciijump-1.0.2~beta/as_parse.c000066400000000000000000000046331143563544100165050ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_PARSE_C #include "as_parse.h" char *as_help_text = PACKAGE " v " VERSION "\n" "usage: [options]\n\n" "let - set given variable\n" "hill - add, del or show given hill\n" "invite - invite players\n" "play - start new game\n" "user - change user data\n" "? | help - print this message\n" "foo help - show help screen for command foo.\n\n" "instead of you can type only first letter.\n" "eg: \"h a foo 100\" is same to \"hill add foo 100\".\n\n" "type: bye to exit program"; static void as_show_help() { as_display(MSG, as_help_text); } void as_server_play() { if (as_work != AS_listen) { as_display(ERR, "before start, you should invite players," "try type: invite"); return; } if (as_hill_counter <= 0) { as_display(ERR, "cannot start game, cause there is no hill, " "try type: hill add"); } if (as_players->counter <= 0) { as_display(ERR, "cannot start game, cause there is no player, " "try wait."); } if (as_work == AS_read) { as_display(ERR, "game has been already started"); } else if (as_hill_counter > 0 && as_players->counter > 0) { as_set_state(AS_play); as_work = AS_read; } } void as_server_listen() { if (as_work != AS_command) as_display(ERR, "cannot listen again. sorry.."); else { if (as_create_socket() == 0) { as_display(MSG, "try to change port: let port 2222"); return; } as_listen(); as_work = AS_listen; as_set_state(AS_listen); } } struct keyword_action as_keywords[] = { { "invite", as_server_listen }, { "hill", as_hill_parse }, { "play", as_server_play }, { "let", as_let_parse }, { "help", as_show_help }, { "user", as_user_parse }, { "?", as_show_help }, { NULL, NULL } }; int as_run_keyword_action(struct keyword_action ka[]) { int i = 0; char *word = as_argv[as_current]; for (; ka[i].caption != NULL; i++) if (strcmp(word, ka[i].caption) == 0 || (strlen(word) == 1 && ka[i].caption[0] == word[0])) { as_current++; ka[i].action(); return 1; } return 0; } int as_parse(void) { if (as_argc == 0) return 3; if (strcmp(as_argv[as_current], "bye") == 0 || strcmp(as_argv[as_current], "quit") == 0) return 0; if (as_run_keyword_action(as_keywords) == 0) { as_display(ERR, "bad magic word: %s, try type: help", as_argv[as_current]); } return 1; } asciijump-1.0.2~beta/as_user.c000066400000000000000000000051711143563544100163470ustar00rootroot00000000000000/* :: asciijump (server), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define AS_USER_C #include "as_user.h" static void as_user_delete(struct s_as_player *p) { char *text = as_argv[as_current+1]; if (text == NULL) text = "karma police"; as_send(p, Msg, text); as_send(p, Kick, ""); as_del_player(p); } static void as_user_cleanup() { struct s_as_player *p; for (p = as_players->head; p; SWITCH(p)) as_user_delete(p); } static struct keyword_action as_user_keywords[] = { { "show", as_user_show }, { "kick", as_user_parse_kick }, { "let", NULL }, { "help", as_user_help }, { NULL, NULL} }; void as_user_parse(void) { if (as_argv[as_current] == NULL) as_user_help(); else if (as_run_keyword_action(as_user_keywords) == 0) as_display(ERR, "bad magic word, try: user help"); } static void as_user_display(struct s_as_player *p) { as_display(MSG, "name:%s, host:%s, id:%d, points:%d", p->name, p->hostname, p->id, p->points); } static void as_user_show() { struct s_as_player *p = as_players->head; char *word = as_argv[as_current]; if (as_players->head == NULL) as_display(MSG, "sorry .. there is no players, try wait for them"); else if (word == NULL || strcmp(word, "*")) for (p = as_players->head; p; SWITCH(p)) as_user_display(p); else for (p = as_players->head; p; SWITCH(p)) { if (strstr(p->name, word) || strstr(p->hostname, word) || atoi(word) == p->points || atoi(word) == p->id) as_user_display(p); } } static void as_user_parse_kick() { char *word = as_argv[as_current]; struct s_as_player *p; int n = as_players->counter; if (word == NULL) { as_display(ERR, "no input user, try type user help"); return; } if (*word == '*') as_user_cleanup(); else if (word[strlen(word)-1] == '*') { int len = strlen(word) - 2; again: for (p = as_players->head; p; SWITCH(p)) if (strncmp(p->name, word, len) == 0) { as_user_delete(p); goto again; } } else for (p = as_players->head; p; SWITCH(p)) if (strcmp(p->name, word) == 0 || atoi(word) == p->id) as_user_delete(p); n -= as_players->counter; if (n != 0) as_display(MSG, "%d user%s deleted", n, (n > 1) ? "s" : ""); else as_display(ERR, "pattern not found: %s", word); } static char *as_player_help_text = "user [option] [suboption]\n\n" "user show - display all users\n" "user kick ${name} - remove given user\n" " kick foo - remove user named foo\n" " kick * - remove all users\n" " kick foo* - remove all users begining by foo\n" "user help - show this help screen"; void as_user_help() { as_display(MSG, as_player_help_text); } asciijump-1.0.2~beta/asciijump.6000066400000000000000000000015051143563544100166120ustar00rootroot00000000000000.TH "asciijump" "6" "0.0.5 " "Rafal Zawadzki" "Games" .SH "NAME" .LP asciijump \- small and funny ASCII\-art game about ski jumping .SH "SYNTAX" .LP asciijump .SH "DESCRIPTION" .LP This is very funny multiplayer game - you can play with friends or cpu. There three modes of playing - World Cup, Training and network game. You will be able to select from a few hills - for example czumulungma and findland. To play you have to know this shortcuts: .LP enter \- jump .LP enter \- telemark .LP right \- move right .LP left \- move left .LP up \- scroll menu up .LP down \- scroll menu down .LP space \- select position .LP tab \- next widget .LP q \- leave hill .SH "AUTHORS" .LP grzegorz moskal , .br michal moskal , .br przemek niezobrala . asciijump-1.0.2~beta/asciijump.desktop000066400000000000000000000003501143563544100201130ustar00rootroot00000000000000[Desktop Entry] Name=asciijump Comment=A clone of the dsj game Comment[pl]=Klon gry dsj Icon=asciijump.xpm Exec=asciijump Terminal=true Type=Application Categories=GNOME;Application;Game;BoardGame; StartupNotify=true Encoding=UTF-8 asciijump-1.0.2~beta/asciijump.png000066400000000000000000000042761143563544100172410ustar00rootroot00000000000000‰PNG  IHDR<<:üÙrbKGDÿÿÿ ½§“ pHYs  ÒÝ~ütIMEÓ ?„òKIDATxœíšYs\G€¿Ó}—Y4¶–Ñf[[l%ql'v0p( Ê¡¨â™wxæ?ðSxâ9E¥ )xB6²à$8–wI–f´K³Þ{»c%¶‰ãE–D}U3·îÜ{N÷ |‡0»]f_x¯³/¼×ÙÞëì ïuö…÷:»&,"‚5vGË ¾þrˆ ´€ì± /¿DÀE ¨‚÷;›»weK‚Ð1s¼ŸÅëUT×ø¦Äʰ cgE(„‚±ªRo†´Ú€:DÅ£ºó‰Ú]=,”°öEÂà<ÖœBQ¼ÿ”4{‹Ì½Ô¾ºWÀÈ儃…§ÆC (ä"°Nˆ Ô2Ïj ®\íヤV¿×uv++½CØ 2H¼Lü‘Q¼™@µŽ÷×PmË)ýeËð`À¡aËø„eb"àèxDcÞñ÷ÛÔœÐÓ'„¡G,GûŽŒDT«g¹|å’ô ToîŠô=Â12‚È "¹ÛWG°öi¬ï¦Tšç篅œûQžg&c q^ #ec1ãý¼ù§ ŠX!Ê ]]†|^¨Õ×Y¨®¡:,îŠì=ŠÒÂë ª5  ƒHc–ÈÅ 'ŸŽ9.äôÙ€áK¡+ °eJÎýª‹áç"fæsËžƒý!£ã!‹ ŽO?K˜ºT£Q»ÀÚºga1 RU’Ô屮~·)ÜYP"Dòeõï’º·@/Jƒ¢8ú» ¥î€( Æ"ÖǽƒcÏF;ñÜñˆ\$TæR²T 8¾À«ç"NŸ‰yéåpŠ×Ë8o6à¶]ø®EKY!so£ºŒ‘QAý4™ÿt…©›)ÕeøäBÂO–ñ½;10QèšMO»íh7=•[)Ÿ~œðæ_\¹–ÑJ P2­–28ròäýåß²´4G£õëm—…ÿy-m^Ê!Rì4‚ÖÖ]·z&'BNŸÉñãŸxúxH¾à)ÉB’¶§^ƒ©©”wÿÙào×ùârÂ|ÕÑj)ÖÀÀ@‰µÕgi·=ÎøÝ~øZ q$ ö[ΞyáTÀ‰ã#ã员RODZš O¥šñÞ'M~ÿÆ:ï¿Ó¦5Þöû2*yBJßÌsøÑñ i«ëž+72þs1ãÒ…”Êç ÙFJPT$PÄ(AA¨ >ž4¬ ÙÕ Wó;¾XoIøN2 åÖ’çÒ´ãâÅŒ…ɆǤJ3†×Õñ‘U’H~Îá»Z>¹‡q(”‹†gFCŽÎsáÕˆ¹£BËx²›÷z›Õ?7ÈjÛ?w7yb=|/ª:Xk*7*/§dÓŽpÔàû zÀ`‹u¤U‡îó¶ ߉íDiT3rËžÂXýéLÉ%‡kìŒñŽoâ´æ¥iENHYØàg=Ù|†O·¿;* é… Y‚àLˆ” ¦©økžtmû#­]ÙñHSXþ[“ÆHK O„‡,Ƀ¼Ev¼‡7Qîš#.ÂÄÈ !h¢t&þ6Lëmy-=táq·¡ÿ7%¢×r¤x²[镌慄æ;)®êŸhN±¥:»›MÖ‚®­´/¤g¡4`̨%8b0p«_×'&½å!­Ú`B„ç¡O‡’ñpõÌ¥5“’›öD1ýú)(‚¶_SH¶RÓ[¾s™ÉGD8n-OC¯-:õ|Pšï2h®:¤ê)X°£ß émƒ_ò[–Þ’pA„± V%!æT¹u{7ò#Fè…”NßOÜeÔYõtuüÑ_4HIP7§øÝÒª³%á^kxµPàXðŒµô[Ë‚÷¬«²ªJÕ+^a@`¡ àôþ=î$uE6ÀN0`!“3hKÉ®;´õ¸5Þ¢p[•™4eÙ9"`$Š˜ˆBÆm@°¦JE=‹ u"˜cÆ0f¾ 6å7ÀeÐ^ó˜:ØçC¤d° ¶Çà–gKÒiøUUÖT¹å=S(JB—1 ŽXË™bÍ,ÃxO$B*ec8¦–†*pK„Õ,Gíß=,M†´‡k˜Þó¢Ád†µõ:Éåì‘"²m-=éÖ ÓÓÎq-MYtŽ¢1XJ(WÔ9ÊÀ¤/!gã'âAJé+4W~‰«MàºÖÑul?hٌï=ü²½óÙ¡¿è=W³Œiç˜wž9ïYR%Qº­åP1h‹ôêS?Äο„™™$ÉUP»H ŽôfF2óðaØ®%žÎÖû:PQeV•U®©ò™*WU™ñž–Ïèr+Œ$ónyºVrä«5Ê•y†?l ·H[úå3Ô×»š<Ü‹ðU¾j0h,ÃÆòBXd êCâ~¢ÈsØ,QØX£R¯1åR.«çsU¦µs¢ýMeüßßÄ@N ]&`ÀXN‹á9”>õäÚÞs]=ñžÔӼϳ¾Â÷"t^/ƒ"aÄX†T) T¼òGï™E¿Vì[)|'›ò1Ð-B ˜SXÛ«Â÷ò ¡='ü öÿ§µ×ÙÞëì ïuö…÷:ß9áÿ3òÍ1E z%IEND®B`‚asciijump-1.0.2~beta/asciijump.spec000066400000000000000000000022451143563544100174010ustar00rootroot00000000000000# $Revision: 1.8 $, $Date: 2003/03/02 21:10:14 $ # $Id: asciijump.spec,v 1.8 2003/03/02 21:10:14 loth Exp $ Summary: asciijump game. Name: asciijump Version: 1.0.2beta Vendor: Grzegorz Moskal Release: 1 License: GPL Group: Applications/Games Source0: http://asciijump.prv.pl/%{name}-%{version}.tar.gz BuildRequires: slang-devel BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Ski jumping in text mode. %description -l pl Skoki narciarskie w trybie tekstowym. %prep %setup -q %build %configure %{__make} %install rm -rf $RPM_BUILD_ROOT %{__make} install DESTDIR=$RPM_BUILD_ROOT %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %clean rm -rf $RPM_BUILD_ROOT %files %defattr(644,root,root,755) %doc README-pl README %attr(755,root,games) %{_bindir}/asciijump %attr(755,root,games) %{_bindir}/aj-server %{_datadir}/asciijump %{_mandir}/man6/* %{_applnkdir}/Games/Arcade/asciijump.desktop %{_pixmapsdir}/asciijump.png %attr(777,root,games) /var/games/asciijump %define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`) %changelog * %{date} PLD Team All persons listed below can be reached at @pld.org.pl asciijump-1.0.2~beta/client.c000066400000000000000000000134131143563544100161620ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define CLIENT_C #include "client.h" char *cl_name = "foo"; char *cl_server = "127.0.0.1"; short int cl_port = 2051; int cl_socket; int cl_debug = 0; static struct sockaddr_in cl_addr; static struct s_skier *cl_sk_head; static struct s_skier *cl_sk_tail; static struct s_skier *cl_sk_current; static struct s_skier **cl_sk_array = NULL; static struct s_skier *cl_skier; static int cl_sk_counter; static int cl_sk_index; static struct s_hill *cl_hill; c_state cl_state = C_read; void cl_show(void) { cl_scr_show(); cl_winstatus_show(); state = A_client; } void cl_init() { // state C_init is used to avoid black screen. cl_winstatus_cleanup(); cl_winstatus_show(); cl_display(MSG, "init network, please wait .."); cl_display(MSG, "port = %d, name = %s", cl_port, cl_name); cl_state = C_init; state = A_client; cl_sk_head = cl_sk_tail = NULL; sk_head = sk_tail = NULL; sk_array = NULL; sk_counter = cl_sk_counter = 0; rs_actions(cl_show, mn_scr_show); } void cl_display(char *prompt, char *fmt, ...) { va_list ap; char *s; int d; int arg = 0; if (strcmp(prompt, DEBUG) == 0 && cl_debug == 0) return; va_start(ap, fmt); cl_winstatus_puts(prompt); for (; *fmt; fmt++) switch (*fmt) { case '%': arg = 1; continue; case 's': if (arg) { s = va_arg(ap, char *); cl_winstatus_puts(s); arg = 0; } else cl_winstatus_putc(*fmt); break; case 'd': if (arg) { d = va_arg(ap, int); cl_winstatus_putd(d); arg = 0; } else cl_winstatus_putc(*fmt); break; case '\n': cl_winstatus_puts("\n"); cl_winstatus_puts(prompt); break; case '|': if (*(fmt+1) == '\0') goto display_end; default: cl_winstatus_putc(*fmt); } cl_winstatus_puts("\n"); display_end: va_end(ap); } static void cl_net(void) { struct hostent *hostinfo; // this state is set when something wrong. state = A_menu; if ((cl_socket = socket(PF_INET, SOCK_STREAM, 0)) == -1) { cl_display(ERR, "socket() faild - cannot continue"); return; } cl_display(DEBUG, "socket created successful"); cl_addr.sin_family = AF_INET; cl_addr.sin_port = htons(cl_port); if ((hostinfo = gethostbyname(cl_server)) == NULL) { cl_display(ERR, "unknown host - cannot continue"); return; } cl_addr.sin_addr = *(struct in_addr *) hostinfo->h_addr; if (connect(cl_socket, (struct sockaddr *)&cl_addr, sizeof(cl_addr)) == -1) { cl_display(ERR, "socket() faild - cannot continue"); return; } cl_display(MSG, "connection established, waiting for the hill."); write(cl_socket, cl_name, strlen(cl_name)+1); state = A_client; cl_state = C_read; } void cl_read_id(char *line) { struct s_skier *s; cl_sk_index = strtol(line, NULL, 10); for (s = cl_sk_head; s; SWITCH(s)) if (s->id == cl_sk_index) break; cl_display(DEBUG, "index = %d", cl_sk_index); if ((cl_sk_current = s) == NULL) cl_display(DEBUG, "unknown index"); } static void cl_read_hill(char *line) { int len = strtol(line, &line, 10); char *name = line; xfree(cl_hill); // TODO hl_free should be written ! cl_hill = hl_init(len, name); cl_display(MSG, "new hill recived: name = %s, length = %d", cl_hill->name, cl_hill->len); cl_state = C_play; sk_flush(cl_skier, cl_hill); } static void cl_read_results(char *line) { char buf[10]; int pt = strtol(line, &line, 10); cl_sk_current->last_points = pt; cl_sk_current->points += pt; cl_display(DEBUG, "(s) result for %s: %d ", cl_sk_current->name, pt); } static void cl_read(void) { char *member, *line, *msg, buf[10]; member = line = xread(cl_socket); if (line == NULL || *line == '\0') return; // cl_display(DEBUG, "\"%s\"| ", line); switch (*line++) { case Id: cl_read_id(line); break; case Hill: cl_read_hill(line); break; case Results: cl_read_results(line); break; case Everyone: sk_array_sort(); rs_scr_reinit(cl_sk_array, cl_sk_counter, cl_hill); state = A_menu; cl_state = C_read; break; case You: if (sk_head == 0) cl_display(MSG, "users:"); sk_add(sk_init(cl_hill, skin, line)); cl_skier = sk_tail; cl_skier->id = cl_sk_index; cl_display(MSG, "you = %s", line); break; case User: if (sk_head == 0) cl_display(MSG, "users:"); sk_add(sk_init(cl_hill, skin, line)); sk_tail->id = cl_sk_index; cl_display(MSG, "user = %s", line); break; case Msg: cl_display(LOGO, "%s", line); break; case Kick: cl_display(MSG, "you were kicked"); state = A_menu; break; case Bye: rs_scr_reinit(cl_sk_array, cl_sk_counter, NULL); break; default: cl_display(DEBUG, "unrecognized string: %s", line-1); break; } } void cl_play(int key) { if (cl_sk_array == NULL) { struct s_skier *s; sk_counter = sk_tail->id + 1; cl_sk_tail = sk_tail; cl_sk_head = sk_head; cl_sk_counter = sk_counter; cl_sk_array = xmalloc(sizeof(struct s_skier *) * cl_sk_counter); for (s = cl_sk_head; s; SWITCH(s)) cl_sk_array[s->id] = s; sk_array = cl_sk_array; sk_flush(cl_skier, cl_hill); } if (sk_service(cl_skier, key)) { play(cl_skier); return; } cl_skier->points -= cl_skier->last_points; cl_state = C_result; sl_cls(); } static void cl_result() { char buf[20]; sprintf(buf, "%c%d\n", Results, (int)cl_skier->last_points); cl_display(DEBUG, "sending results = %d", (int)cl_skier->last_points); write(cl_socket, buf, strlen(buf)); cl_state = C_read; } void client(int key) { switch (cl_state) { case C_init: cl_state = C_net; menu(key); break; case C_net: cl_net(); menu(key); break; case C_read: menu(key); cl_read(); break; case C_play: cl_play(key); break; case C_result: menu(key); cl_result(); break; } } asciijump-1.0.2~beta/cmdline.c000066400000000000000000000032441143563544100163200ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define CMDLINE_C #include "cmdline.h" static char *usage = " usage: "PACKAGE" [ARG]\n" " --help or -h show this message\n" " --version or -V show version info message\n" " --matrix or -m\n" " --matrix_full or -mf use one of matrix mode\n", *version = " "PACKAGE" v "VERSION"\n" " [ copyright (c) grzegorz moskal, eldevarth@nemerle.org ]\n\n" " this program comes with absolutely no warranty; for details\n" " please see the file 'COPYING' supplied with the source code.\n" " this is free software, and you are welcome to redistribute it\n" " under certain conditions; again, see 'COPYING' for details.\n" " this program is released under the gnu general public license v2.\n"; int parse_cmdline(int argc, char **argv) { int i = 1; for (; i < argc; i++) switch(optionid(argv[i])) { case Help: printf(usage); return 0; case Version: printf(version); return 0; case Matrix_full: mx_mode = MATRIX_FULL; break; case Matrix: mx_mode = MATRIX; break; default: printf("option ``%s'' not recognized :(", argv[i]); printf("try %s --help", argv[0]); return 0; } return 1; } static int opt(char *pattern, char *src1, char *src2) { if (strcmp(pattern, src2) == 0 || strcmp(pattern, src1) == 0) return 1; return 0; } #define OPTION(a,b) opt(arg, a, b) static int optionid(char *arg) { if (OPTION("--help", "-h")) return Help; else if (OPTION("--version", "-V")) return Version; else if (OPTION("--matrix_full", "-mf")) return Matrix_full; else if (OPTION("--matrix", "-m")) return Matrix; return 0; } asciijump-1.0.2~beta/config.guess000066400000000000000000001206221143563544100170560ustar00rootroot00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-02-22' # 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. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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 trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; 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. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) 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 # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # 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 ;; amiga:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; arc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; hp300:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; mac68k:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; macppc:OpenBSD:*:*) echo powerpc-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 ;; mvmeppc:OpenBSD:*:*) echo powerpc-unknown-openbsd${UNAME_RELEASE} exit 0 ;; pmax:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sgi:OpenBSD:*:*) echo mipseb-unknown-openbsd${UNAME_RELEASE} exit 0 ;; sun3:OpenBSD:*:*) echo m68k-unknown-openbsd${UNAME_RELEASE} exit 0 ;; wgrisc:OpenBSD:*:*) echo mipsel-unknown-openbsd${UNAME_RELEASE} exit 0 ;; *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; alpha:OSF1:*:*) if test $UNAME_RELEASE = "V4.0"; then UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` fi # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # 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. 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;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit 0 ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos 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 ;; DRS?6000:UNIX_SV:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7 && exit 0 ;; esac ;; 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=`(sed 1q /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 ;; # 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 ;; 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) eval $set_cc_for_build 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 $CC_FOR_BUILD -o $dummy $dummy.c \ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit 0 ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit 0 ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-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 eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 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 | sed 1q | 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]) 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" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build 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 (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then # avoid double evaluation of $set_cc_for_build test -n "$CC_FOR_BUILD" || eval $set_cc_for_build if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi 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:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 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 ;; 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*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*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 ;; *:UNICOS/mp:*:*) echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 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 ;; 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:*:*) # Determine whether the default compiler uses glibc. eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #if __GLIBC__ >= 2 LIBC=gnu #else LIBC= #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} 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 ;; x86:Interix*:3*) echo i586-pc-interix3 exit 0 ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks 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 i586-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-gnu exit 0 ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit 0 ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 ;; 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=alphaev68 ;; 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. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C 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 eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 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:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit 0 ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit 0 ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit 0 ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit 0 ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp 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|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; pc:*:*:*) # 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 ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit 0 ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix 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 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*: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 ;; 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:*: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 ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos 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 ;; SX-6:SUPER-UX:*:*) echo sx6-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:*:*) case `uname -p` in *86) UNAME_PROCESSOR=i686 ;; powerpc) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit 0 ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit 0 ;; *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; NSR-[DGKLNPTVW]: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 ;; *: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 eval $set_cc_for_build 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 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # 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: asciijump-1.0.2~beta/config.h.in000066400000000000000000000054371143563544100165720ustar00rootroot00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `slang' library (-lslang). */ #undef HAVE_LIBSLANG /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_SLANG_H /* Define to 1 if you have the header file. */ #undef HAVE_SLANG_SLANG_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned' if does not define. */ #undef size_t asciijump-1.0.2~beta/config.sub000066400000000000000000000724251143563544100165300ustar00rootroot00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. timestamp='2003-02-22' # 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 . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 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* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k \ | m32r | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | msp430 \ | ns16k | ns32k \ | openrisc | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xstormy16 | xtensa \ | 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. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* \ | m32r-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | msp430-* \ | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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 ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; 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 ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; mmix*) basic_machine=mmix-knuth os=-mmixware ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nv1) basic_machine=nv1-cray os=-unicosmp ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; or32 | or32-*) basic_machine=or32-unknown os=-coff ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2) basic_machine=i686-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-*) 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/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic4x | c4x*) basic_machine=tic4x-unknown os=-coff ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; 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 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; 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 | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sh64) basic_machine=sh64-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 ;; *-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* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ | -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 ;; -atheos*) os=-atheos ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -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 ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-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* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit 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: asciijump-1.0.2~beta/configure000077500000000000000000004662071143563544100164640ustar00rootroot00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.58 for asciijump "1.0.2beta". # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='asciijump' PACKAGE_TARNAME='asciijump' PACKAGE_VERSION='"1.0.2beta"' PACKAGE_STRING='asciijump "1.0.2beta"' PACKAGE_BUGREPORT='g.moskal@opengruop.org' ac_unique_file="main.c" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures asciijump "1.0.2beta" to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of asciijump "1.0.2beta":";; esac cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF asciijump configure "1.0.2beta" generated by GNU Autoconf 2.58 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by asciijump $as_me "1.0.2beta", which was generated by GNU Autoconf 2.58. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Checks for libraries. echo "$as_me:$LINENO: checking for SLsmg_cls in -lslang" >&5 echo $ECHO_N "checking for SLsmg_cls in -lslang... $ECHO_C" >&6 if test "${ac_cv_lib_slang_SLsmg_cls+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lslang $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char SLsmg_cls (); int main () { SLsmg_cls (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_slang_SLsmg_cls=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_slang_SLsmg_cls=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_slang_SLsmg_cls" >&5 echo "${ECHO_T}$ac_cv_lib_slang_SLsmg_cls" >&6 if test $ac_cv_lib_slang_SLsmg_cls = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBSLANG 1 _ACEOF LIBS="-lslang $LIBS" else { { echo "$as_me:$LINENO: error: \"S-Lang library not found! (try install slang-devel)\"" >&5 echo "$as_me: error: \"S-Lang library not found! (try install slang-devel)\"" >&2;} { (exit 1); exit 1; }; } fi # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in dir; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi else echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6 if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_opendir=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_opendir" = no; then for ac_lib in x; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char opendir (); int main () { opendir (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_opendir="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6 if test "$ac_cv_search_opendir" != no; then test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in slang.h slang/slang.h stdlib.h string.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to g.moskal@opengruop.org ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done cat >>confdefs.h <<\_ACEOF #define Version $(cat V) _ACEOF #AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) #AC_CHECK_HEADER([slang.h], [AC_DEFINE_UNQUOTED(HAVE_SLANG_H, 1)], # [AC_CHECK_HEADER([slang/slang.h])]) . # Checks for typedefs, structures, and compiler characteristics. echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset x; /* SunOS 4.1.1 cc rejects this. */ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; ccp = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++ccp; p = (char**) ccp; ccp = (char const *const *) p; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; } #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6 if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6 if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { if ((size_t *) 0) return 0; if (sizeof (size_t)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6 if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned _ACEOF fi echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm *tp; tp->tm_sec; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6 if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi # Checks for library functions. for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to g.moskal@opengruop.org ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6 if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { exit (malloc (0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6 if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case $LIBOBJS in "malloc.$ac_objext" | \ *" malloc.$ac_objext" | \ "malloc.$ac_objext "* | \ *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to g.moskal@opengruop.org ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6 if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if STDC_HEADERS || HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { exit (realloc (0, 0) ? 0 : 1); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6 if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case $LIBOBJS in "realloc.$ac_objext" | \ *" realloc.$ac_objext" | \ "realloc.$ac_objext "* | \ *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi for ac_func in getcwd strdup do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 if eval "test \"\${$as_ac_var+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char $ac_func (); /* 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_$ac_func) || defined (__stub___$ac_func) choke me #else char (*f) () = $ac_func; #endif #ifdef __cplusplus } #endif int main () { return f != $ac_func; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # 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, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # 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 \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by asciijump $as_me "1.0.2beta", which was generated by GNU Autoconf 2.58. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ asciijump config.status "1.0.2beta" configured by $0, generated by GNU Autoconf 2.58, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # 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" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac case "$ac_dir" in .) ac_abs_builddir=$ac_builddir;; *) case $ac_builddir in .) ac_abs_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_builddir=$ac_builddir;; *) ac_abs_builddir="$ac_dir"/$ac_builddir;; esac;; esac case "$ac_dir" in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir="$ac_dir"/${ac_top_builddir}.;; esac;; esac case "$ac_dir" in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir="$ac_dir"/$ac_srcdir;; esac;; esac case "$ac_dir" in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir="$ac_dir";; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir="$ac_dir"/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # 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=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # 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.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # 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.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi asciijump-1.0.2~beta/configure.ac000066400000000000000000000020561143563544100170270ustar00rootroot00000000000000# Process this file with autoconf to produce a configure script. AC_PREREQ(2.53) #VERSION=`cat VERSION` #anyone fancy to change it ?? AC_INIT(asciijump, "1.0.2beta", g.moskal@opengruop.org) AC_CONFIG_SRCDIR([main.c]) AC_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_CC AC_PROG_INSTALL # Checks for libraries. AC_CHECK_LIB(slang, SLsmg_cls, [], [AC_ERROR("S-Lang library not found! (try install slang-devel)")]) # Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS([slang.h slang/slang.h stdlib.h string.h unistd.h]) AC_DEFINE(Version, $(cat V)) #AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) #AC_CHECK_HEADER([slang.h], [AC_DEFINE_UNQUOTED(HAVE_SLANG_H, 1)], # [AC_CHECK_HEADER([slang/slang.h])]) . # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_STRUCT_TM # Checks for library functions. AC_FUNC_MALLOC m4_ifdef([AC_FUNC_REALLOC], [AC_FUNC_REALLOC]) AC_CHECK_FUNCS([getcwd strdup]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT asciijump-1.0.2~beta/cup.c000066400000000000000000000022421143563544100154710ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define CUP_C #include "cup.h" struct s_skier *cup_sk_head, *cup_sk_tail; struct s_skier **cup_sk_array; // index for skiers array int cup_sk_no; // current size for skiers array int cup_sk_counter; // max size for skiers array int cup_sk_limit = 8; // hills array, struct s_hill **cup_hl_array; // current size for skiers array int cup_hl_counter; int cup_hl_no; void cup_show() { state = A_cup; } void cup(int key) { int i = 0; if (cup_sk_no == cup_sk_counter) { rs_scr_reinit(cup_sk_array, cup_sk_counter, HILL); cup_sk_no = 0; return; } // if this skier is controled by human and there is still some move on the screen // we have to wait for the finish. (may he plays) if (JUMPER->level == 0 && sk_service(JUMPER, key)) { play(JUMPER); return; } if (JUMPER->level != 0) sk_cpujump(JUMPER); // next one please ;) cup_sk_no++; // if he isn`t out of bond, and .. there is still some hill if (cup_sk_no >= cup_sk_counter && HILL) { cup_hl_no++; for (i = 0; i < cup_sk_counter; i++) sk_flush(cup_sk_array[i], HILL); sk_array_sort(); } } asciijump-1.0.2~beta/frame.c000066400000000000000000000017601143563544100160000ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define FRAME_C #include "frame.h" struct frame* fr_init(char *filename) { FILE *fd = xfopen(filename,"r"); struct frame *f = xmalloc(sizeof(struct frame)); int h = 4; f->h = 0; f->w = 0; f->next = f->prev = 0; f->filename = strdup(filename); f->caption = xmalloc(sizeof(char*)*h); do { if (h == f->h) { h *= 2; f->caption = xrealloc(f->caption, h*sizeof(char *)); } f->caption[f->h] = xgetline(fd); } while (f->caption[f->h++]); f->h--; fclose(fd); return f; } void fr_draw(struct frame *f, int x, int y, char *hot, int color, int color2) { int i = 0, ix; char *line; sl_color(color); for (; f->caption[i]; i++) { for (ix = 0, line = f->caption[i]; *line; ix++, line++) { if (*line == ' ') continue; sl_goto(x + ix, y+i); if (strchr(hot,*line)) sl_color(color2); else sl_color(color); sl_putch(*line); } } } asciijump-1.0.2~beta/gfx/000077500000000000000000000000001143563544100153225ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/01start/000077500000000000000000000000001143563544100166205ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/01start/01.frame000066400000000000000000000000421143563544100200500ustar00rootroot00000000000000 o `/ \.' \ ' asciijump-1.0.2~beta/gfx/01start/02.frame000066400000000000000000000000401143563544100200470ustar00rootroot00000000000000 `..o \.' \ ` asciijump-1.0.2~beta/gfx/01start/03.frame000066400000000000000000000000371143563544100200560ustar00rootroot00000000000000 `..o \.' \ ` asciijump-1.0.2~beta/gfx/02descent/000077500000000000000000000000001143563544100171115ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/02descent/01.frame000066400000000000000000000000301143563544100203360ustar00rootroot00000000000000`..o \.' \ ` asciijump-1.0.2~beta/gfx/03ride/000077500000000000000000000000001143563544100164105ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/03ride/01.frame000066400000000000000000000000361143563544100176430ustar00rootroot00000000000000 `..o --:__ asciijump-1.0.2~beta/gfx/03ride/02.frame000066400000000000000000000000261143563544100176430ustar00rootroot00000000000000 `..o __:__ asciijump-1.0.2~beta/gfx/04jump/000077500000000000000000000000001143563544100164415ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/04jump/01.frame000066400000000000000000000000441143563544100176730ustar00rootroot00000000000000 `..o :/ / asciijump-1.0.2~beta/gfx/04jump/02.frame000066400000000000000000000000441143563544100176740ustar00rootroot00000000000000 o `/ , :/ / asciijump-1.0.2~beta/gfx/04jump/03.frame000066400000000000000000000000441143563544100176750ustar00rootroot00000000000000 o ,/, ;/ / asciijump-1.0.2~beta/gfx/04jump/04.frame000066400000000000000000000000331143563544100176740ustar00rootroot00000000000000 .o ,, ,/ / asciijump-1.0.2~beta/gfx/05fly/000077500000000000000000000000001143563544100162615ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/05fly/01.frame000066400000000000000000000000541143563544100175140ustar00rootroot00000000000000 o ,: : , ,/ / asciijump-1.0.2~beta/gfx/05fly/02.frame000066400000000000000000000000511143563544100175120ustar00rootroot00000000000000 o ,. ,, ,/ / asciijump-1.0.2~beta/gfx/05fly/03.frame000066400000000000000000000000511143563544100175130ustar00rootroot00000000000000 o ,. ,, ,/ / asciijump-1.0.2~beta/gfx/05fly/04.frame000066400000000000000000000000461143563544100175200ustar00rootroot00000000000000 ,.o __.;___, asciijump-1.0.2~beta/gfx/06telemark/000077500000000000000000000000001143563544100172745ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/06telemark/01.frame000066400000000000000000000000331143563544100205240ustar00rootroot00000000000000 .o ,, _,/_ / asciijump-1.0.2~beta/gfx/06telemark/02.frame000066400000000000000000000000331143563544100205250ustar00rootroot00000000000000 .o ,, _,/_ / asciijump-1.0.2~beta/gfx/06telemark/03.frame000066400000000000000000000000321143563544100205250ustar00rootroot00000000000000 o `: , _,/_ / asciijump-1.0.2~beta/gfx/06telemark/04.frame000066400000000000000000000000321143563544100205260ustar00rootroot00000000000000 o `: , _,/_ / asciijump-1.0.2~beta/gfx/06telemark/05.frame000066400000000000000000000000321143563544100205270ustar00rootroot00000000000000o ,: , :/ / asciijump-1.0.2~beta/gfx/06telemark/06.frame000066400000000000000000000000321143563544100205300ustar00rootroot00000000000000o ,: , :/ / asciijump-1.0.2~beta/gfx/06telemark/07.frame000066400000000000000000000000331143563544100205320ustar00rootroot00000000000000 o ,: , :/ / asciijump-1.0.2~beta/gfx/06telemark/08.frame000066400000000000000000000000321143563544100205320ustar00rootroot00000000000000 o ,: , :/ / asciijump-1.0.2~beta/gfx/06telemark/09.frame000066400000000000000000000000321143563544100205330ustar00rootroot00000000000000 o ,: , :/ / asciijump-1.0.2~beta/gfx/06telemark/10.frame000066400000000000000000000000451143563544100205270ustar00rootroot00000000000000 o `-:-` \: \, asciijump-1.0.2~beta/gfx/06telemark/11.frame000066400000000000000000000000451143563544100205300ustar00rootroot00000000000000 o `-:-` \: \, asciijump-1.0.2~beta/gfx/06telemark/12.frame000066400000000000000000000000451143563544100205310ustar00rootroot00000000000000 o `-:-` \: \, asciijump-1.0.2~beta/gfx/06telemark/13.frame000066400000000000000000000000451143563544100205320ustar00rootroot00000000000000 o `-:-` \: \, asciijump-1.0.2~beta/gfx/06telemark/14.frame000066400000000000000000000000451143563544100205330ustar00rootroot00000000000000 o `-:-` \: \, asciijump-1.0.2~beta/gfx/07descent2/000077500000000000000000000000001143563544100172005ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/07descent2/01.frame000066400000000000000000000000341143563544100204310ustar00rootroot00000000000000 o ; \: \, asciijump-1.0.2~beta/gfx/08ride2/000077500000000000000000000000001143563544100164775ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/08ride2/01.frame000066400000000000000000000000261143563544100177310ustar00rootroot00000000000000 o ,: __:,_, asciijump-1.0.2~beta/gfx/09stop/000077500000000000000000000000001143563544100164605ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/09stop/01.frame000066400000000000000000000000331143563544100177100ustar00rootroot00000000000000 o ,: __: / ----' asciijump-1.0.2~beta/gfx/09stop/02.frame000066400000000000000000000000411143563544100177100ustar00rootroot00000000000000 o ,: __:__, -----' asciijump-1.0.2~beta/gfx/10crash/000077500000000000000000000000001143563544100165635ustar00rootroot00000000000000asciijump-1.0.2~beta/gfx/10crash/01.frame000066400000000000000000000000421143563544100200130ustar00rootroot00000000000000 ._______ `----/-- o.:;-/` asciijump-1.0.2~beta/gfx/10crash/02.frame000066400000000000000000000000411143563544100200130ustar00rootroot00000000000000 ,______ o.:;'------ asciijump-1.0.2~beta/gfx/a000066400000000000000000000000001143563544100154530ustar00rootroot00000000000000asciijump-1.0.2~beta/hill.c000066400000000000000000000111371143563544100156350ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 copyright (c) 2000, 2003 grzegorz moskal (eldevarth), g.moskal@opengruop.org copyright (c) 2000 michal moskal (malekith), malekith@pld-linux.org :: przemyslaw niezborala (misiek), finburson@o2.pl */ #define HILL_C #include "hill.h" struct s_hill *hl_head, *hl_tail; int hl_counter = 0; struct s_hill* hl_init(int len, char *name) { struct s_hill *h = XALLOC(s_hill); h->name = strdup(name); h->k = len*2; len += 10; len *= 4; len += 180; h->len = len; // hl_fill(h) not called here return h; } struct s_hill* hl_find(char *pattern, struct s_hill *head) { struct s_hill *h = head; if (h == NULL) h = hl_head; for (; h; SWITCH(h)) if (strcmp(h->name, pattern) == 0) break; return h; } void hl_add(struct s_hill *h) { if (hl_head == NULL) hl_tail = hl_head = h; else { hl_tail->next = h; SWITCH(hl_tail); } } int hl_record_write(struct s_hill *h) { char *name = strdglue(VARDIR, h->name); FILE *fd = fopen(name, "w"); xfree(name); if (fd == NULL) return 0; fwrite(&h->record, sizeof(double), 1, fd); fclose(fd); name = strglue(VARDIR, h->name, ".owner"); fd = fopen(name, "w"); fprintf(fd, "%s", h->owner); xfree(name); fclose(fd); return 1; } void hl_record_read(struct s_hill *h) { char *name = strglue(VARDIR, h->name, ""); FILE *fd = fopen(name, "r"); xfree(name); if (fd == NULL) return; fread(&h->record, sizeof(double), 1, fd); fclose(fd); name = strglue(VARDIR, h->name, ".owner"); fd = fopen(name, "r"); xfree(name); if (fd == NULL) { h->owner = strdup("unknow"); return; } h->owner = xgetline(fd); fclose(fd); } static void hl_service_adding(void) { struct s_hill *h = hl_init(hill_length, hill_name); hl_record_read(h); hl_add(h); } int hl_readdir(char *dirname) { return hill_readdir_extend(dirname, &hl_counter, hl_service_adding); } static int ix2(int x, double p) { return (int)(p * x * x); } static void hl_fill(struct s_hill *hl) { int *place; int len = hl->len; int l1, l2, l3; int p, k, i; double w1 = 0.0033, w2 = 0.0034, w3 = 0.0025; hl->fill_no = xmalloc(sizeof(int)*(len)); for (i = 0; i < len; i++) hl->fill_no[i] = d(10) - 1; place = hl->caption = xmalloc(sizeof(int) * (hl->len + 1)); for (i = 0; i < 60; i++) *place++ = 0; len -= 180; l1 = len * 12 / 33; l2 = len * (12 + 9) / 33; l3 = len; p = len / 33; i = 0; for (; i < l1; i++) place[i] = ix2(-l1 + i, w1); hl->leapsill = i + 60; for (; i < l2; i++) place[i] = -ix2(i - l1, w2) - p; k = -place[i - 1] + ix2(-l3 + i - 1, w3); for (; i < l3; i++) place[i] = ix2(-l3 + i, w3) - k; p = place[0] - place[i - 1]; k = -place[i - 1]; for (i = 0; i < len; i++) place[i] = p - (place[i] + k); for (i = l1; i > l1 -l1/3; i--) if (place[i] == place[i-6]) hl->pns = (i-9) + 60; for (i = l3; i > l3 - l3/3; i--) if (place[i] == place[i-6]) hl->pnz = (i-6) +60; for (p = place [l3-1], i = l3; i < l3+120; place[i++] = p); } static char fill[10][10] = { ".%#<==-,-.", ",*#===-(-.", ",#=#==---.", ".8#===-.-.", ".&#=:=---.", ",#=:==:_-.", ",@#==`-~-.", ".H#===`--.", ".#====-^`.", ",*=/==--'." }; /* TODO */ void hl_draw(struct s_skier *sk) { struct s_hill *hl = sk->hill; int offset_x = sk->x - WIDTH/2; int offset_y; int scr_x, scr_y, dd, px; if (hl->caption == NULL) hl_fill(hl); if (sk->x == 62) sk->y = hl->caption[sk->x]; offset_y = sk->y - HEIGHT/2; sl_color(Lwhite); if (offset_x < 0) offset_x = 0; for (scr_y = 0; scr_y < HEIGHT-1; scr_y++) { for (scr_x = 0; scr_x < WIDTH; scr_x++) { // printed x px = offset_x + scr_x; if (((dd = hl->caption[px] - (scr_y + offset_y))) >= 0) continue; sl_goto(scr_x, scr_y); if (dd > -10) { if (px == hl->k + hl->leapsill && dd != -1) { sl_color(Red + d(2)-1); sl_putch('|'); } else if (px == (int)(2*hl->record + hl->leapsill) && dd != -1) { sl_color(Green + d(2)-1); sl_putch('|'); } else { sl_color(Lwhite); sl_putch(fill[hl->fill_no[px]][-dd - 1]); } } else if (dd == -10 && px > hl->leapsill + hl->k/2 && px < hl->pnz) { if (px % 10 == 7) { char tab[4]; sprintf(tab, "%d", (px - hl->leapsill)/2); sl_color(Red); sl_addstrxy(tab, scr_x-2, scr_y); sl_color(Lwhite); } else sl_putch('-'); } else { sl_color(White); sl_putch('\"'); } } } sl_color(Cyan); sl_addstrxy(hl->name, WIDTH/2-strlen(hl->name)/2, HEIGHT-1); /* if (sk->new_owner) { sl_color(Brown); sl_addstrxy("that`s new hill record !", WIDTH/2-10, HEIGHT/2-6); } */ } asciijump-1.0.2~beta/hills/000077500000000000000000000000001143563544100156515ustar00rootroot00000000000000asciijump-1.0.2~beta/hills/a000066400000000000000000000000001143563544100160020ustar00rootroot00000000000000asciijump-1.0.2~beta/hills/k100000066400000000000000000000000361143563544100162460ustar00rootroot00000000000000name=be free! k100 length=100 asciijump-1.0.2~beta/hills/k120000066400000000000000000000000351143563544100162470ustar00rootroot00000000000000name=finland k120 length=120 asciijump-1.0.2~beta/hills/k150000066400000000000000000000000411143563544100162470ustar00rootroot00000000000000name=czumulungma k150 length=150 asciijump-1.0.2~beta/hills/k180000066400000000000000000000000351143563544100162550ustar00rootroot00000000000000name=tarnica k180 length=180 asciijump-1.0.2~beta/hills/k50000066400000000000000000000000331143563544100161670ustar00rootroot00000000000000name=england k50 length=50 asciijump-1.0.2~beta/hills/k60000066400000000000000000000000331143563544100161700ustar00rootroot00000000000000name=ukarine k60 length=60 asciijump-1.0.2~beta/hills/k70000066400000000000000000000000341143563544100161720ustar00rootroot00000000000000name=pakistan k70 length=70 asciijump-1.0.2~beta/hills/k80000066400000000000000000000000321143563544100161710ustar00rootroot00000000000000name=poland k80 length=80 asciijump-1.0.2~beta/include/000077500000000000000000000000001143563544100161615ustar00rootroot00000000000000asciijump-1.0.2~beta/include/.cvsignore000066400000000000000000000000041143563544100201530ustar00rootroot00000000000000X.h asciijump-1.0.2~beta/include/a000066400000000000000000000000001143563544100163120ustar00rootroot00000000000000asciijump-1.0.2~beta/include/as_display.h000066400000000000000000000007501143563544100204640ustar00rootroot00000000000000#ifndef AS_DISPLAY_H #define AS_DISPLAY_H #ifdef AS_DISPLAY_C #include // printf() #include // exit() #include // va_ ... macros #include #else extern int as_allow_colored_prompt; extern int as_debug; #endif void as_display(char *, char *, ...); void as_eerr(char *, int); void as_prompt(void); #include "prompt.h" enum { None = 0, Black = 30, Red = 31, Green = 32, Brown = 33, Blue = 34, Magenta = 35, Cyan = 36, White = 37 }; #endif asciijump-1.0.2~beta/include/as_getline.h000066400000000000000000000006721143563544100204510ustar00rootroot00000000000000#ifndef AS_GETLINE_H #define AS_GETLINE_H typedef enum { T_ERROR = 0, T_WORD, // arg T_SEMI, // ; T_NL, // '\n' ;) T_EOF // end-of-file or ^D => EOT } lex; #ifdef AS_GETLINE_C #include #include #include #include "xfnc.h" static void as_c_put(char **v, int c); static lex as_getword(char **); #else extern char **as_argv; extern int as_current; extern int as_argc; #endif int as_getline(void); #endif asciijump-1.0.2~beta/include/as_hill.h000066400000000000000000000016421143563544100177500ustar00rootroot00000000000000#ifndef AS_HILL_H #define AS_HILL_H struct as_hill; struct as_hill { char *name; int length; struct as_hill *next, *prev; }; #ifdef AS_HILL_C #include #include #include "as_display.h" #include "as_parse.h" #include "as_getline.h" #include "xfnc.h" static void as_hill_cleanup(void); static void as_hill_delete(struct as_hill *hill); static void as_hill_add(struct as_hill *hill); static void as_hill_show(void); static void as_hill_parse_delete(void); static void as_hill_parse_add(void); static void as_hill_help(void); static void as_hill_service_adding(void); static void as_hill_parse_read(void); static void as_hill_read(void); static struct as_hill *as_hill_init(char *name, int len); #else extern struct as_hill *as_hill_head; extern struct as_hill *as_hill_tail; extern struct as_hill *as_hill_current; extern int as_hill_counter; extern char *as_hilldir; #endif void as_hill_parse(void); #endif asciijump-1.0.2~beta/include/as_let.h000066400000000000000000000024351143563544100176050ustar00rootroot00000000000000#ifndef AS_LET_H #define AS_LET_H #ifdef AS_LET_C #include // strtol #include // strcmp() #include "as_display.h" // as_display() as_allow_colored_prompt #include "xfnc.h" // XALLOC macro. #include "aserver.h" // as_port, as_limit, as_name #include "as_parse.h" // struct keyword_action .. #include "as_getline.h" // as_argv, as_argc #include "as_hill.h" // as_hilldir typedef enum var_type { VINT, VSTRING, VFILE } vtype; enum { Help, List }; struct str_var { char **dest; }; struct int_var { int *dest; int lower, upper; }; struct var; struct var { void *variable; char *name; char *help; vtype type; struct var *next; }; static void as_let_init(void); static void as_let_set(void); static void as_let_set_int(struct int_var *iv, char *s); static void as_let_set_str(struct str_var *sv, char *s); static void as_let_set_var(struct var *v, char *s); static struct var *as_let_find_var(char *name); static void as_let_show_var(struct var *v, int type); static void as_let_show_all(int state); static void as_let_show(void); static void as_let_help(void); static void as_let_add_var(struct var *v); #endif void as_let_add_int(char *name, int *dest, int lower, int upper, char *help); void as_let_add_str(char *name, char **dest, char *help); void as_let_parse(void); #endif asciijump-1.0.2~beta/include/as_parse.h000066400000000000000000000010221143563544100201220ustar00rootroot00000000000000#ifndef AS_PARSE_H #define AS_PARSE_H struct keyword_action { char *caption; void (*action)(void); }; #ifdef AS_PARSE_C #include // strcmp() #include "as_display.h" // as_display() #include "as_hill.h" // as_hill_parse() #include "as_getline.h" // as_argv #include "as_let.h" // as_let_parse() #include "as_user.h" // as_user_parse() #include "aserver.h" // as_state static void as_show_help(void); #endif int as_run_keyword_action(struct keyword_action ka[]); void as_server_start(void); int as_parse(void); #endif asciijump-1.0.2~beta/include/as_user.h000066400000000000000000000007511143563544100177760ustar00rootroot00000000000000#ifndef AS_USER_H #define AS_USER_H #ifdef AS_USER_C #include #include #include "as_display.h" #include "as_parse.h" #include "as_getline.h" #include "aserver.h" // as_players #include "xfnc.h" static void as_user_delete(struct s_as_player *p); static void as_user_cleanup(void); static void as_user_show(void); static void as_user_display(struct s_as_player *p); static void as_user_parse_kick(void); #endif void as_user_parse(void); void as_user_help(void); #endif asciijump-1.0.2~beta/include/aserver.h000066400000000000000000000044621143563544100200070ustar00rootroot00000000000000#ifndef ASERVER_H #define ASERVER_H typedef enum asciijump_server_state { AS_finish, // adding clients or switching to Command state if stdin is not empty AS_listen, // read and parse stdin AS_command, // reading data from clients or switching to Command state if stdin .. AS_read, // sending player list to the clients, seting all inital data to start play AS_play, // prepare jump, - send hill length and name to the clients, switch hill. AS_prepare, } s_state; typedef enum s_as_player_status { P_del, // when xread(player->socket) return NULL, (player disconnet) P_done, // when player sent result P_read // after sending hill to the players; } p_status; struct s_as_player; struct s_as_player { p_status status; int socket; char *hostname; char *name; int points, result; // player`s points int id; // player`s id struct s_as_player *next, *prev; }; struct s_as_players { struct s_as_player *head; struct s_as_player *tail; int counter; }; #ifdef ASERVER_C #include // signal() #include // strdup() #include // printf() #include // ntohs() #include // bind() #include // socket() #include // inet_ntoa() #include // exit() #include // alarm() #include // errno #include // poll() #include "xfnc.h" // XALLOC() macro #include "as_getline.h" // as_getline() #include "as_parse.h" // as_parse() #include "as_display.h" // as_errexit() #include "as_hill.h" // as_hill_current pointer. static struct s_as_player *as_ff_players(int n); static void as_send_hill(void); static void as_prepare_players(void); static int as_invite_players(void); static s_state as_read(void); static s_state as_prepare_jump(void); static int as_command(void); static int as_loop(void); static int as_every_results_read(void); static void as_del_players(void); static void as_send2players(n_type t, char *buf); #else extern struct s_as_players *as_players; extern short int as_port; extern int as_limit; extern s_state as_state; extern s_state as_work; extern char *as_name; #endif #include "xfnc.h" void as_set_state(s_state); void as_listen(void); int as_create_socket(void); void as_send(struct s_as_player *p, n_type type, char *buf); void as_del_player(struct s_as_player *p); #endif asciijump-1.0.2~beta/include/client.h000066400000000000000000000016761143563544100176220ustar00rootroot00000000000000#ifndef CLIENT_H #define CLIENT_H #ifdef CLIENT_C #include // connect() #include // gethostbyname() #include // htons() #include // connect() #include // exit() #include // perror() #include // strlen() #include // write() #include // ;) #include "main.h" // game_show() #include "scrmain.h" // scrmain_show() #include "scrclient.h" // ;) #include "xfnc.h" // xread() #include "skier.h" // sk_head #include "hill.h" // hl_init() #include "prompt.h" // MSG define #include // va_ ... macros typedef enum asciijump_client_state { C_read, C_result, C_play, C_init, C_net } c_state; void cl_display(char *prompt, char *fmt, ...); static void cl_result(void); static void cl_read(void); #else extern char *cl_name; extern char *cl_server; extern short int cl_port; #endif void cl_show(void); void cl_init(void); void client(int key); #endif asciijump-1.0.2~beta/include/cmdline.h000066400000000000000000000005101143563544100177410ustar00rootroot00000000000000#ifndef CMDLINE_H #define CMDLINE_H #ifdef CMDLINE_C #include #include #include "xfnc.h" #include "matrix.h" enum { Help = 1, Version, Matrix, Matrix_full }; static int opt(char *pattern, char *src1, char *src2); static int optionid(char *arg); #endif int parse_cmdline(int argc, char **argv); #endif asciijump-1.0.2~beta/include/cup.h000066400000000000000000000015761143563544100171320ustar00rootroot00000000000000#ifndef CUP_H #define CUP_H #ifdef CUP_C #define JUMPER (cup_sk_array[cup_sk_no]) #define HILL (cup_hl_array[cup_hl_no]) #include // strlen() #include // sprintf() #include "slangwrap.h" // WIDTH, sl_cls() .. #include "xfnc.h" // xmalloc() #include "scrmain.h" // scrmain_show() #include "scrcup.h" // scrcup_init() #include "scrresult.h" // scrcup_init() #include "intro.h" // typewriter() #include "skier.h" // struct s_skier #include "hill.h" // struct hill #include "main.h" // struct hill *hills #include "wsys.h" // text window system. #else extern struct s_skier *cup_sk_head, *cup_sk_tail; extern struct s_skier **cup_sk_array; extern int cup_hl_counter; extern int cup_sk_counter; extern int cup_sk_no; extern int cup_hl_no; extern struct s_hill **cup_hl_array; extern int cup_status; extern int cup_sk_limit; #endif void cup_show(); void cup(int k); #endif asciijump-1.0.2~beta/include/frame.h000066400000000000000000000005471143563544100174320ustar00rootroot00000000000000#ifndef FRAME_H #define FRAME_H struct frame; #ifdef FRAME_C #include #include "xfnc.h" #include "slangwrap.h" #endif struct frame { struct frame *next, *prev; char *filename; char **caption; int w, h; int state; }; struct frame *fr_init(char *filename); void fr_draw(struct frame *f, int x, int y, char *hot, int color, int color2); #endif asciijump-1.0.2~beta/include/hill.h000066400000000000000000000025341143563544100172660ustar00rootroot00000000000000#ifndef HILL_H #define HILL_H struct s_skier; struct s_hill; struct s_hill { // pointer to next hill struct s_hill *next; // array of int, every single element is hill`s height in current index. int *caption; // that array of ints, is used to draw diffirent kinds of floor int *fill_no; // caption length int len; // point K int k; // hill record double record; // 2 variables used to better loaclize skier int pns, pnz; // leapsill int leapsill; // hill name char *name; // hill owenr`s name (owner is a man who beat the hill record) char *owner; }; #ifdef HILL_C #include #include // fopen() #include #include #include // strstr() #include #include #include "xfnc.h" // XALLOC macro #include "slangwrap.h" // sl_color() #include "skier.h" // struct skier static int ix2(int x, double p); static void hl_fill(struct s_hill *h); static void hl_add(struct s_hill *h); static int hl_readconf(char *filename); static void hl_service_adding(void); #else extern struct s_hill *hl_head, *hl_tail; extern int hl_counter; #endif struct s_hill *hl_init(int len, char *name); struct s_hill *hl_find(char *pattern, struct s_hill *head); int hl_readdir(char *dirname); void hl_draw(struct s_skier *j); int hl_record_write(struct s_hill *h); void hl_record_read(struct s_hill *h); #endif asciijump-1.0.2~beta/include/intro.h000066400000000000000000000003101143563544100174570ustar00rootroot00000000000000#ifndef INTRO_H #define INTRO_H #ifdef INTRO_C #include #include "slangwrap.h" #include #include "xfnc.h" #endif int typewriter(char *str, int x, int y); void intro(); #endif asciijump-1.0.2~beta/include/main.h000066400000000000000000000017351143563544100172640ustar00rootroot00000000000000#ifndef MAIN_H #define MAIN_H typedef enum asciijump_state { A_menu, A_training, A_cup, A_client, A_quit } a_state; #ifdef MAIN_C #include // usleep() #include "skier.h" // sk_draw() #include "hill.h" // hl_draw() #include "skin.h" // struct skin #include "slangwrap.h" // sl_init(), WIDTH .. #include "matrix.h" // mx_init() #include "scrmain.h" // mn_init() #include "scrtrain.h" // tr_init() #include "cup.h" // cup() #include "intro.h" // intro() #include "wsys.h" // text window system. #include "xfnc.h" // rand_init() #include "cmdline.h" // parse_cmdline(); #include "scrtrain.h" // tr_skier #include "client.h" // client() static void game(int key); static int init(void); static int resize(void); #else extern struct widget *screen; extern struct hill *hills; extern struct frame *skin; extern a_state state; #endif struct s_skier; void menu(int key); void play(struct s_skier *skier); void game_show(void); void quit(void); int main(int argc, char **argv); #endif asciijump-1.0.2~beta/include/matrix.h000066400000000000000000000013351143563544100176400ustar00rootroot00000000000000#ifndef MATRIX_H #define MATRIX_H #define MATRIX_FULL (103) #define MATRIX (102) #define SNOW (101) #ifdef MATRIX_C #include #include "slangwrap.h" #include "xfnc.h" struct column; struct column { struct column *next; int last_y, height; int async, async_pattern; short shine, draw, stop, cut; char *caption; }; static void col_flush(struct column *c); static void col_check_grow(struct column *c); static void col_service(struct column *c); static void col_draw(struct column *c, int x); #else extern int mx_mode; #endif void mx_init(int x, int y, int w, int h); void mx_draw(void); void mx_move(int n); void mx_service(void); void mx_change_mode(int c_normal, int c_shine, int mode); void mx_free(void); #endif asciijump-1.0.2~beta/include/prompt.h000066400000000000000000000002441143563544100176530ustar00rootroot00000000000000#ifndef PROMPT_H #define PTOMPT_H #define ERR "#e " #define MSG "~ " #define PROMPTPREFIX "#" #define PROMPT "> " #define LOGO "- " #define DEBUG " " #endif asciijump-1.0.2~beta/include/scrclient.h000066400000000000000000000010751143563544100203230ustar00rootroot00000000000000#ifndef SCRCLIENT_H #define SCRCLIENT_H #ifdef SCRCLIENT_C #include // strlen() #include "main.h" // game_show() #include "scrmain.h" // scrmain_show() #include "slangwrap.h" // WIDTH .. #include "xfnc.h" // SWITCH macro #include "wsys.h" // text window system. #include "client.h" // cl_name, static void cl_winstatus_init(void); #endif void cl_scr_show(void); void cl_scr_init(void); void cl_winstatus_show(void); void cl_winstatus_cleanup(void); void cl_winstatus_putd(int digit); void cl_winstatus_putc(char c); void cl_winstatus_puts(char *text); #endif asciijump-1.0.2~beta/include/scrcup.h000066400000000000000000000017101143563544100176300ustar00rootroot00000000000000#ifndef SCRCUP_H #define SCRCUP_H #ifdef SCRCUP_C #include // strdup() #include "skier.h" // struct jumper #include "hill.h" // struct hill #include "main.h" // int status #include "scrmain.h" // scrmain_show() #include "slangwrap.h" // WIDTH, sl_cls() .. #include "wsys.h" // text window system. #include "xfnc.h" // SWITCH macro, xfree() #include "cup.h" // struct object *jumpers static void cup_winmain_show(void); static void cup_winhill_show(void); static void cup_winskier_show(void); static void cup_winskier_refresh(void); static void cup_winselect_show(void); static void cup_winselect_refresh(void); static void cup_set_color(void); static void cup_set_controler(void); static void cup_set_name(void); static void cup_set_level(void); static void cup_init(void); static void cup_scr_init(void); static void cup_winselect_init(void); static void cup_winskier_init(void); static void cup_winhill_init(void); #endif void cup_scr_show(void); #endif asciijump-1.0.2~beta/include/scrmain.h000066400000000000000000000007251143563544100177720ustar00rootroot00000000000000#ifndef SCRMAIN_H #define SCRMAIN_H #ifdef SCRMAIN_C #include // NULL #include "scrclient.h" // cl_scr_show() #include "skier.h" // struct object #include "scrtrain.h" // scrtrain_show #include "main.h" // int status, struct object *screen #include "scrcup.h" // scrcup_show #include "slangwrap.h" // WIDTH, HEIGHT #include "wsys.h" // text window system static void mn_help_show(void); static void mn_scr_init(void); #endif void mn_scr_show(void); #endif asciijump-1.0.2~beta/include/scrresult.h000066400000000000000000000013511143563544100203600ustar00rootroot00000000000000#ifndef SCRRESULT_H #define SCRRESULT_H #ifdef SCRRESULT_C #include // strdup() #include "skier.h" // struct s_skier #include "hill.h" // struct s_hill #include "main.h" // int status #include "slangwrap.h" // WIDTH, sl_cls() .. #include "wsys.h" // text window system. #include "cup.h" // struct s_skier **cup_sk_array #include "xfnc.h" // strglue() #include "scrresult.h" // rs_action() static void rs_scr_reinit_winners(struct s_skier **array, int length); static void rs_scr_reinit_classic(struct s_skier **array, int length, struct s_hill *hl); #endif struct s_skier; struct s_hill; void rs_actions(void (*classic)(void), void (*winners)(void)); void rs_scr_reinit(struct s_skier **array, int length, struct s_hill *hl); #endif asciijump-1.0.2~beta/include/scrtrain.h000066400000000000000000000007571143563544100201700ustar00rootroot00000000000000#ifndef SCRTRAIN_H #define SCRTRAIN_H #ifdef SCRTRAIN_C #include // strlen() #include "skier.h" // struct object #include "hill.h" // struct hill #include "main.h" // game_show() #include "scrmain.h" // scrmain_show() #include "slangwrap.h" // WIDTH .. #include "xfnc.h" // SWITCH macro #include "wsys.h" // text window system. static void tr_usehill(void); static void tr_scr_init(void); #else struct s_skier; extern struct s_skier *tr_skier; #endif void tr_scr_show(void); #endif asciijump-1.0.2~beta/include/skier.h000066400000000000000000000031541143563544100174520ustar00rootroot00000000000000#ifndef SKIER_H #define SKIER_H struct s_hill; struct s_skier; struct s_skier { // pionter to current hill; struct s_hill *hill; // current frame, it realty cannot be set by state variable struct frame *current_frame; // pointer to next skier struct s_skier *next; // skier`s name char *name; // what skier`s doing now ? int state; // variables used to localize skier at the hill int x, y, current_x, current_y; double vx, vy, px, py; // variables used to judge skier double alight, points, last_points, judge[5]; // used only for cpu int level; // skier`s bend, (changed by arrows) int bend; // skier`s colors int color, color2; // some strange i realy don`t know what it is ? ugly code ! int in_use, new_owner; // user id, (used in network mode) int id; }; #ifdef SKIER_C #include #include "hill.h" #include "frame.h" #include "slangwrap.h" #include "xfnc.h" #include "skin.h" #include "main.h" #define PREV_GRASP (-001) #define NEXT_GRASP (-002) #define NEXT_FRAME (-003) static int sk_animate(struct s_skier *s, int state); static void sk_setpoints(struct s_skier *s); static void sk_service_lucky(struct s_skier *s); #else extern struct s_skier *sk_head, *sk_tail; extern struct s_skier **sk_array; extern int sk_counter; #endif void sk_array_sort(void); void sk_array_init(int len); struct s_skier *sk_init(struct s_hill *m, struct frame *f, char *name); struct s_skier *sk_rewind(int n); void sk_change_mode(struct s_skier *s, char *name, int color, int level, int in_use); void sk_flush(struct s_skier *s, struct s_hill *m); void sk_draw(struct s_skier *s); void sk_add(struct s_skier *s); #endif asciijump-1.0.2~beta/include/skin.h000066400000000000000000000005371143563544100173030ustar00rootroot00000000000000#ifndef SKIN_H #define SKIN_H enum { START, DESCENT, RIDE, JUMP, FLY, TELEMARK, DESCENT2, RIDE2, STOP, CRASH, FINISH }; #ifdef SKIN_C #include #include #include #include "frame.h" #include "xfnc.h" static struct frame *skin_init(char *dirname); #endif struct frame *skin_make(char *prefix); #endif asciijump-1.0.2~beta/include/slangwrap.h000066400000000000000000000036251143563544100203360ustar00rootroot00000000000000#ifndef SLANGWRAP_H #define SLANGWRAP_H #ifdef SLANG_C #define C_BLACK "black" #define C_GRAY "gray" #define C_RED "red" #define C_LIGHTRED "brightred" #define C_GREEN "green" #define C_LIGHTGREEN "brightgreen" #define C_BROWN "brown" #define C_YELLOW "yellow" #define C_BLUE "blue" #define C_LIGHTBLUE "brightblue" #define C_MAGENTA "magenta" #define C_LIGHTMAGENTA "brightmagenta" #define C_CYAN "cyan" #define C_LIGHTCYAN "brightcyan" #define C_LIGHTGRAY "lightgray" #define C_WHITE "white" #include #include #include #include "config.h" #include #include #ifdef HAVE_SLANG_H #include #else #ifdef HAVE_SLANG_SLANG_H #include #endif #endif #else extern int sl_screen_width, sl_screen_height, sl_screen_size_changed; #endif #define HEIGHT (sl_screen_height) #define WIDTH (sl_screen_width) enum { sl_key_esc = 27, sl_key_first = 0x100, sl_key_up, sl_key_down, sl_key_left, sl_key_right, sl_key_pgup, sl_key_pgdn, sl_key_del, sl_key_home, sl_key_end, sl_key_f0 = 0x200 }; #define sl_key_f(a) (sl_key_f0 + (a)) enum { Black = 1,Grey, White,Lwhite, Green,Lgreen, Cyan,Lcyan, Red,Lred, Blue,Lblue, Mag,Lmag, Brown,Yellow, Active, Active2, Passive, }; void sl_cls(void); void sl_addstr_fill_alt(const char *s, int n, int c1, int c2); void sl_addstr_alt(const char *s, int n, int c1, int c2); void sl_init(void (*program_finish)(void)); void sl_goto(int x, int y); void sl_frame(int x, int y, int w, int h); void sl_putch(int c); void sl_putchxy(int c, int x, int y); void sl_addstr(const char *c); void sl_addstrn(const char *c, int n); void sl_addstrn_fill(const char *c, int n); void sl_addstrxy(char *s, int x, int y); int sl_strlen_alt(const char *s); void sl_color(int c); void sl_refresh(void); void sl_fini(void); void sl_die(const char *msg); void sl_fill(int c, int x, int y, int w, int h); int sl_getch2(void); int sl_getch(void); #endif asciijump-1.0.2~beta/include/wsys.h000066400000000000000000000051051143563544100173400ustar00rootroot00000000000000#ifndef WSYS_H #define WSYS_H #define OBJ_DOWN (-2) #define OBJ_UNTICKABLE (-1) typedef enum wsys_widget_type { Wsys_screen, Wsys_window, Wsys_inputline, Wsys_textbox, Wsys_menu, Wsys_menuobj } wsys_type; struct widget; struct widget { int hidden, selectable; int wheel; int x, y, w, h; struct widget *mother, *kids, *last, *next, *current; void (*draw)(struct widget *); int (*key)(struct widget *, int); void *data; wsys_type type; }; #define NEXT_WIDGET (302) #define PREV_WIDGET (-302) #ifdef WSYS_C #include #include "slangwrap.h" #include "xfnc.h" // struct menuobj and struct inputline => struct line { void (*action)(void); char *caption; int length, place; int tick; int key; }; // ptr->data = xalloc(sizeof(char *)); :P struct window { char *title; int len; }; // ptr->data = xalloc(sizeof(int)); :P struct menu { int tickable; }; /* wsys.c */ static void list_add(struct widget *mother, struct widget *child); static struct widget *widget_init(int x, int y, int w, int h); static void window_draw(struct widget *w); static void widget_draw(struct widget *w); static void inputline_draw(struct widget *i); static void menuobj_draw(struct widget *mo); static void textbox_draw(struct widget *t); static int screen_key(struct widget *screen, int key); static int window_key(struct widget *win, int key); static int menu_key(struct widget *menu, int key); static int inputline_key(struct widget *i, int key); #endif void list_switch(struct widget *w, int how); struct widget *screen_add(void); struct widget *window_add(struct widget *scr, char *title, int x, int y, int w, int h); struct widget *inputline_add(struct widget *win, int x, int y, int w, void (*fnc)(void)); struct widget *menu_add(struct widget *win, int x, int y, int w, int h, int); struct widget *menuobj_add(struct widget *menu, char *title,int, void (*fnc)(void), int tick); struct widget *textbox_add(struct widget *win, char *text); void textbox_insert(struct widget *tb, char *text); void textbox_cleanup(struct widget *tb, char *text); char *menu_selected_caption(struct widget *m); struct widget *label_add(struct widget *win, int x, int y, int w, char *text); void inputline_fill(struct widget *i, char *text); char *inputline_caption(struct widget *i); int menu_selected_number(struct widget *m); void menu_select(struct widget*w, int n); struct widget *menu_ticked(struct widget *m); void screen_hideall(struct widget *win); void menu_tick(struct widget*mo); struct widget *line_free(struct widget *l); struct widget* menu_free(struct widget *m); struct widget* window_free(struct widget *win); #endif asciijump-1.0.2~beta/include/xfnc.h000066400000000000000000000022431143563544100172710ustar00rootroot00000000000000#ifndef XFNC_H #define XFNC_H #define SWITCH(j) (j=j->next) #define PREV(j) (j=j->prev) #define XALLOC(sname) xmalloc(sizeof(struct sname)) typedef enum asciijump_network_type { Bye = 'b', Everyone = 'e', Hill = 'h', Id = 'i', Kick = 'k', Msg = 'm', Results = 'r', User = 'u', You = 'y' } n_type; #include #include #ifdef XFNC_C #include #include #include #include #include #include #include #include #include static int hill_readconf(char *filename); #else extern char *hill_name; extern int hill_length; #endif char *xgetcwd(void); void *xmalloc(size_t size); void *xrealloc(void *ptr, size_t size); void *xfree(void *); char *xgetline(FILE *fd); FILE *xfopen(char *name, char *mode); DIR *xopendir(char *name); void xchdir(char *name); char *strglue(const char *s1, const char *s2, const char *s3); char *strdglue(const char *p1, const char *p2); char *strwide(char *s); int d(int hm); void rand_init(void); char *xread(int fd); char *n_type_description(n_type t); int hill_readdir_extend(char *dirname, int *counter, void (*fnc)(void)); #endif asciijump-1.0.2~beta/install-sh000066400000000000000000000127371143563544100165510ustar00rootroot00000000000000#!/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=: chmodcmd="" 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 asciijump-1.0.2~beta/intro.c000066400000000000000000000017511143563544100160410ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define INTRO_C #include "intro.h" #define TEST static int clear = 0; int typewriter(char *str, int x, int y) { #ifdef TEST return 0; #endif if (str == NULL) return 0; if (x == -1) x = sl_screen_width/2-strlen(str)/2; if (y == -1) y = sl_screen_height/2; if (clear) sl_cls(); sl_color(White); for (sl_goto(x, y); *str; str++) { if (*str == '\n') { sl_goto(x, y++); continue; } if (sl_getch()) return 0; sl_putch(*str); sl_refresh(); usleep(17000); } if (clear) for (x = 1; x < 130; x++) { if (sl_getch()) break; usleep(1000); } return 1; } void intro() { char buf[100]; sprintf(buf,"%s", strwide(PACKAGE)); if (typewriter(buf, -1, -1) == 0) return; sprintf(buf,"%s %s", strwide("version"), strwide(VERSION)); if (typewriter(buf, -1, sl_screen_height/2+1) == 0) return; usleep(200*1000); clear = 1; } asciijump-1.0.2~beta/main.c000066400000000000000000000046131143563544100156320ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define MAIN_C #include "main.h" // current wsys screen struct widget *screen; // theme for skier struct frame *skin; // game state a_state state; void menu(int key) { screen->draw(screen); screen->key(screen, key); } void play(struct s_skier *skier) { mx_draw(); mx_service(); mx_move(skier->vx); sk_draw(skier); hl_draw(skier); } void game_show(void) { sl_cls(); state = A_training; } void quit(void) { state = A_quit; } static int init(void) { // srand(time(0) ^ getpid(0)); rand_init(); // slang init sl_init(NULL); // matrix init (background) mx_init(0, 0, WIDTH, HEIGHT); // skin init if ((skin = skin_make("gfx")) == NULL && (skin = skin_make(DATADIR"/gfx")) == NULL) return 1; // read diriectory with hills if (hl_readdir("hills") <= 0 && hl_readdir(DATADIR"/hills") <= 0) { printf("no hill !\n"); return 2; } // init skiers list, used in world cup sk_array_init(cup_sk_limit); // setting-up global (cup) pointers, i don`t want to lose this list cup_sk_array = sk_array; cup_sk_head = sk_head; cup_sk_tail = sk_tail; // init training skier tr_skier = sk_init(hl_head, skin, "foo"); sk_change_mode(tr_skier, NULL, Blue, 0, 1); mn_scr_show(); return 0; } static int resize() { struct s_skier *s; if (sl_screen_size_changed == 0) return 0; sl_cls(); if (WIDTH <= 40 || HEIGHT <= 16) return 1; sl_fini(); sl_init(NULL); sl_screen_size_changed = 0; for (s = sk_head; s; SWITCH(s)) { s->current_x = WIDTH/2-4; s->current_y = HEIGHT/2-2; } tr_skier->current_x = WIDTH/2-4; tr_skier->current_y = HEIGHT/2-2; mx_free(); mx_init(0, 0, WIDTH, HEIGHT); return 0; } a_state loop() { int key; if (resize()) return 1; key = sl_getch2(); switch (state) { case A_client: client(key); break; case A_menu: menu(key); break; case A_training: if (sk_service(tr_skier, key)) play(tr_skier); else { sl_cls(); state = A_menu; } break; case A_cup: cup(key); break; case A_quit: break; } usleep(0xdead - 0xcafe/0x6); sl_refresh(); return state; } int main(int argc, char **argv) { int ret = 0; if (parse_cmdline(argc, argv) == 0) goto asciijump_end; if ((ret = init()) != 0) goto asciijump_end; intro(); for (; loop() != A_quit;); asciijump_end: sl_fini(); return ret; } asciijump-1.0.2~beta/matrix.c000066400000000000000000000056621143563544100162170ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define MATRIX_C #include "matrix.h" #define START (53) static struct column *first, *last; static int mx_width; static int mx_height; static int mx_x; static int mx_y; static int mx_color_normal; static int mx_color_shine; int mx_mode = SNOW; static void col_flush(struct column *c) { int i = 0; for (; i < mx_height; i++) c->caption[i] = ' '; c->caption[i] = '\0'; c->last_y = 0; c->height = 0; c->shine = (d(5) == 5); c->stop = 1; c->draw = 1; c->cut = 0; c->async = 0; c->async_pattern = d(2)+1; } void mx_init(int x, int y, int w, int h) { struct column *c; int i = 0; mx_x = x; mx_y = y; mx_width = w; mx_height = h; mx_color_normal = (mx_mode < MATRIX_FULL) ? Black : Grey; mx_color_shine = (mx_mode < MATRIX_FULL) ? Grey : White; for (; i < w; i++) { c = xmalloc(sizeof(struct column)); c->height = h; c->caption = xmalloc(sizeof(char)*(c->height+1)); c->next = 0; col_flush(c); if (first) { last->next = c; last = last->next; } else first = last = c; } for (i = 40; i; i--) mx_service(); } void mx_free() { struct column *tmp, *c = first; while (c) { tmp = c; SWITCH(c); xfree(tmp->caption); xfree(tmp); } first = last = NULL; } static void col_check_grow(struct column *c) { int p = -1; int i = mx_height/2; for (; i < mx_height; i+=4) if (c->height == i) p = 3*i; if (d(100) <= p) c->cut = 1; } static void col_service(struct column *c) { if (c->stop) { c->stop = d(START)-1; return; } if (c->async > 0) c->async--; else { c->async = d(c->async_pattern); if (c->draw) { col_check_grow(c); c->caption[c->last_y] = d(93) + 33; c->last_y++; c->height++; } if (c->cut) c->caption[c->last_y - c->height--] = ' '; } if (c->last_y >= mx_height-1) { c->draw = 0; c->cut = 1; } if (c->height == 0 && c->cut == 1) col_flush(c); } void mx_service(void) { struct column *c = first; for (c = first; c; c = c->next) col_service(c); for (c = first; c; c = c->next) col_service(c); } static void col_draw(struct column *c, int x) { char *tab = "."; int len = strlen(tab); int h = 0; sl_color(mx_color_normal); for (; h < mx_height; h++) { sl_goto(x, h+mx_y); // if it is not the last if (h+1 != c->last_y) { sl_putch(c->caption[h]); continue; } // elsewere sl_color(mx_color_shine); if (mx_mode != SNOW) sl_putch(c->caption[h]); else sl_putch(tab[d(len)-1]); sl_color(mx_color_normal); } } void mx_draw(void) { struct column *c = first; int x = mx_x; for (; c; c = c->next) col_draw(c, x++); } void mx_move(int n) { struct column *tmp; while (n--) { tmp = first; first = first->next; last->next = tmp; last = last->next; last->next = 0; } } void mx_change_mode(int c_normal, int c_shine, int mode) { mx_mode = mode; mx_color_normal = c_normal; mx_color_shine = c_shine; } asciijump-1.0.2~beta/scrclient.c000066400000000000000000000051501143563544100166710ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SCRCLIENT_C #include "scrclient.h" static struct widget* cl_scr; static struct widget* cl_win_data; static struct widget* cl_line_name; static struct widget* cl_line_server; static struct widget* cl_line_port; static struct widget* cl_win_status; static struct widget* cl_tbox_status; void cl_winstatus_putd(int digit) { char buf[10]; sprintf(buf, "%d", digit); textbox_insert(cl_tbox_status, buf); } void cl_winstatus_putc(char c) { char buf[2]; buf[0] = c; buf[1] = '\0'; textbox_insert(cl_tbox_status, buf); } void cl_winstatus_puts(char *text) { textbox_insert(cl_tbox_status, text); } void cl_winstatus_show(void) { cl_win_status->hidden = 0; cl_scr->current = cl_win_status; sl_cls(); } void cl_winstatus_cleanup(void) { textbox_cleanup(cl_tbox_status, ""); } void cl_scr_show(void) { if (cl_scr == NULL) cl_scr_init(); cl_scr->current = cl_win_data; cl_win_status->hidden = 1; screen = cl_scr; state = A_menu; sl_cls(); } void cl_set_name(void) { //TODO xfree(cl_name) cl_name = strdup(inputline_caption(cl_line_name)); } void cl_set_server(void) { cl_server = strdup(inputline_caption(cl_line_server)); } void cl_set_port(void) { char *s = inputline_caption(cl_line_port); cl_port = strtol(s, NULL, 10); } static void cl_winstatus_init(void) { int w = WIDTH/10 * 8+2; cl_win_status = window_add(cl_scr, "_status _window", 2, 2, w, HEIGHT-2); menuobj_add(menu_add(cl_win_status, 1, HEIGHT-4, w-2, 2, 0), "abort <<(",'(', cl_scr_show, 0); cl_win_status->hidden = 1; cl_tbox_status = textbox_add(cl_win_status, " "); } void cl_scr_init(void) { #define CL_LINE_Y 4 char buf[6]; int w = WIDTH/10 * 8+2; int h = HEIGHT/10 * 8; cl_scr = screen_add(); cl_win_data = window_add(cl_scr, PACKAGE " client v " VERSION, 1, 1, w, h); menuobj_add(menu_add(cl_win_data, 1, 1, w-2, 1, 0), "connect", 'c', cl_init, 0); label_add(cl_win_data, 1, CL_LINE_Y, 10, "name: "); cl_line_name = inputline_add(cl_win_data, 11, CL_LINE_Y, w-12, cl_set_name); inputline_fill(cl_line_name, cl_name); label_add(cl_win_data, 1, CL_LINE_Y+1, 10, "server: "); cl_line_server = inputline_add(cl_win_data, 11, CL_LINE_Y+1, w-12, cl_set_server); inputline_fill(cl_line_server, cl_server); label_add(cl_win_data, 1, CL_LINE_Y+2, 10, "port: "); cl_line_port = inputline_add(cl_win_data, 11, CL_LINE_Y+2, w-12, cl_set_port); sprintf(buf, "%hd", cl_port); inputline_fill(cl_line_port, buf); menuobj_add(menu_add(cl_win_data, 1, h-2 , w-2, 1, 0), "<<(", '(', mn_scr_show, 0); cl_winstatus_init(); } asciijump-1.0.2~beta/scrcup.c000066400000000000000000000162061143563544100162060ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SCRCUP_C #include "scrcup.h" static struct widget* cup_scr; static struct widget* cup_win_main; static struct widget* cup_menu_main; static struct widget* cup_win_hill; static struct widget* cup_menu_hill; static struct widget *cup_win_skier; static struct widget *cup_menu_skier; static struct widget *cup_win_select; static struct widget *cup_line_selectname; static struct widget *cup_menu_selectcontroler; static struct widget *cup_menu_selectcolor; static struct widget *cup_menu_selectlevel; static struct s_skier *sk_cup_current; void cup_scr_show(void) { if (cup_scr == NULL) cup_scr_init(); cup_scr->current = cup_win_main; screen_hideall(cup_scr); state = A_menu; screen = cup_scr; sk_array = cup_sk_array; sk_head = cup_sk_head; sk_tail = cup_sk_tail; } static void cup_winmain_show() { cup_scr->current = cup_win_main; screen_hideall(cup_scr); } static void cup_winhill_show() { cup_scr->current = cup_win_hill; cup_win_hill->hidden = 0; screen_hideall(cup_scr); } static void cup_winskier_show() { cup_scr->current = cup_win_skier; cup_win_skier->hidden = 0; screen_hideall(cup_scr); } static void cup_winskier_refresh() { inputline_fill(cup_menu_skier->current, sk_cup_current->name); menu_tick(cup_menu_skier->current); cup_winskier_show(); } static void cup_winselect_show(void) { cup_win_select->hidden = 0; cup_scr->current = cup_win_select; screen_hideall(cup_scr); } static void cup_winselect_refresh() { screen_hideall(cup_scr); sk_cup_current = sk_rewind(menu_selected_number(cup_menu_skier)); inputline_fill(cup_line_selectname, sk_cup_current->name); menu_select(cup_menu_selectcolor, sk_cup_current->color-2); menu_select(cup_menu_selectcontroler, sk_cup_current->level); cup_menu_selectlevel->hidden = 1; cup_menu_selectcolor->hidden = 1; if (sk_cup_current->level) { menu_select(cup_menu_selectlevel, sk_cup_current->level-1); cup_menu_selectlevel->hidden = 0; } else cup_menu_selectcolor->hidden = 0; cup_win_select->current = cup_line_selectname; cup_winselect_show(); } static void cup_set_color() { sk_cup_current->color = menu_selected_number(cup_menu_selectcolor) + 2; list_switch(cup_win_select, NEXT_WIDGET); } static void cup_set_controler() { sk_cup_current->level = menu_selected_number(cup_menu_selectcontroler); cup_menu_selectlevel->hidden = 1; cup_menu_selectcolor->hidden = 1; if (sk_cup_current->level) cup_menu_selectlevel->hidden = 0; else { cup_menu_selectcolor->hidden = 0; sl_cls(); } list_switch(cup_win_select, NEXT_WIDGET); } static void cup_set_name() { xfree(sk_cup_current->name); sk_cup_current->name = strdup(inputline_caption(cup_line_selectname)); } static void cup_set_level() { sk_cup_current->level += menu_selected_number(cup_menu_selectlevel); list_switch(cup_win_select, NEXT_WIDGET); } static void cup_init(void) { int i; struct widget *mo = cup_menu_skier->kids; char *title; // clean up skiers array for (i = 0; i < cup_sk_limit; i++) cup_sk_array[i] = NULL; // now fill up skiers array (by selected mune items) for (mo = cup_menu_skier->kids, i = 0; mo; SWITCH(mo)) { if ((mo = menu_ticked(mo)) == NULL) break; cup_menu_skier->current = mo; cup_sk_array[i++] = sk_rewind(menu_selected_number(cup_menu_skier)); } // set up number of skiers in this competition. cup_sk_counter = i-1; if (cup_hl_array == NULL) cup_hl_array = xmalloc(sizeof(struct s_hill *) * hl_counter); // clean up hills array for (i = 0; i < hl_counter; i++) cup_hl_array[i++] = NULL; // and now fill up this array (by selected menu items) for (mo = cup_menu_hill->kids, i = 0; mo; SWITCH(mo)) { if ((mo = menu_ticked(mo)) == NULL) break; cup_menu_hill->current = mo; title = menu_selected_caption(cup_menu_hill); cup_hl_array[i++] = hl_find(title, NULL); // NULL mean standard hills. } // set up number of hills in this competition. cup_hl_counter = i-1; if (cup_sk_array[0] && cup_hl_array[0]) { cup_sk_no = 0; cup_hl_no = 0; for (i = 0; i < cup_sk_counter; i++) { cup_sk_array[i]->points = 0; cup_sk_array[i]->hill = cup_hl_array[0]; } rs_actions(cup_show, mn_scr_show); sk_array = cup_sk_array; sk_head = cup_sk_head; sk_tail = cup_sk_tail; state = A_cup; } } static void cup_scr_init(void) { int w = WIDTH/10*8+2; int h = 10; cup_scr = screen_add(); cup_win_main = window_add(cup_scr, "world cup", 1, 1, w, h); cup_menu_main = menu_add(cup_win_main, 1, 2, w-2, h-3, 0); menuobj_add(cup_menu_main, "select competitors", 'c', cup_winskier_show, 0); menuobj_add(cup_menu_main, "select hills", 'h',cup_winhill_show, 0); menuobj_add(cup_menu_main, "start world cup", 't', cup_init, OBJ_DOWN); menuobj_add(cup_menu_main, "<<(", '(', mn_scr_show, OBJ_DOWN); cup_winselect_init(); cup_winskier_init(); cup_winhill_init(); } static char *colors[] = { "grey", "white", "bright white", "green", "bright green", "cyan", "bright cyan","red","bright red", "blue", "bright blue", "magenta", "bright magenta", "brown","yellow", NULL }; static void cup_winselect_init(void) { int i = 0; int w = WIDTH/10*8+3; int h = HEIGHT-1; // init win select cup_win_select = window_add(cup_scr, "setup", 1, 0, w, h); // type your name label_add(cup_win_select, 1, 1, 10, "name: "); cup_line_selectname = inputline_add(cup_win_select, 11, 1, w-2, cup_set_name); // select if cpu player cup_menu_selectcontroler = menu_add(cup_win_select, 1, 3, w/3, 2, 0); menuobj_add(cup_menu_selectcontroler, "human",'h', cup_set_controler, 0); menuobj_add(cup_menu_selectcontroler, "cpu", 'u',cup_set_controler, 0); // select colors cup_menu_selectcolor = menu_add(cup_win_select, w/2, 3, w/2, 15, 0); for (; colors[i]; i++) menuobj_add(cup_menu_selectcolor, colors[i], colors[i][d(strlen(colors[i]))-1], cup_set_color, 0); // selcet level cup_menu_selectlevel = menu_add(cup_win_select, w/2, 3, w/2-2, 4, 0); menuobj_add(cup_menu_selectlevel, "poor",'p', cup_set_level, 0); menuobj_add(cup_menu_selectlevel, "good", 'o', cup_set_level, 0); menuobj_add(cup_menu_selectlevel, "best", 'b', cup_set_level, 0); // back to skier window menuobj_add(menu_add(cup_win_select, 1, h-2, w-2, 1, 0), "<<(", '(', cup_winskier_refresh, 0); } static void cup_winskier_init(void) { struct s_skier *s; int w = WIDTH/10 * 6 + 3; int h = cup_sk_limit + 5; cup_win_skier = window_add(cup_scr, "_select _competitors", 1, 1, w, h); cup_menu_skier = menu_add(cup_win_skier, 1, 2, w-2, h-3, 1); for (s = cup_sk_head; s; SWITCH(s)) menuobj_add(cup_menu_skier, s->name, s->name[0], cup_winselect_refresh, 0); menuobj_add(cup_menu_skier, "<<(", '(', cup_winmain_show, OBJ_DOWN+OBJ_UNTICKABLE); } static void cup_winhill_init(void) { struct s_hill *hj; int w = WIDTH/10 * 6 + 3; int h = HEIGHT-1; cup_win_hill = window_add(cup_scr, "se_lect hi_l_l", 1, 1, w, h); cup_menu_hill = menu_add(cup_win_hill, 1, 2, w-2, h-3, 1); for (hj = hl_head; hj; SWITCH(hj)) menuobj_add(cup_menu_hill, hj->name, hj->name[d(strlen(hj->name))-1], 0, 0); menuobj_add(cup_menu_hill, "<<(",'(', cup_winmain_show, OBJ_DOWN+OBJ_UNTICKABLE); } asciijump-1.0.2~beta/scrmain.c000066400000000000000000000034231143563544100163400ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SCRMAIN_C #include "scrmain.h" char *mn_help_text = "\n" " :: asciijump project\n\n" " shortcuts ::\n" " enter - jump\n" " enter - telemark\n" " right - move right ::\n" " left - move left\n" " up - scroll menu up ::\n" " down - scroll menu down ::\n" " space - select position\n" " tab - next widget\n" " q - leave hill\n\n\n" " :: copyright (c) 2003,\n" " :: grzegorz moskal, eldevarth@nemerle.org\n\n" " michal moskal, malekith@pld-linux.org\n" " :: przemyslaw niezborala, finburson@o2.pl"; static struct widget* mn_scr; static struct widget* mn_win; static struct widget* mn_menu; static struct widget* mn_win_help; void mn_scr_show(void) { if (mn_scr == NULL) mn_scr_init(); state = A_menu; screen = mn_scr; mn_scr->current = mn_win; screen_hideall(mn_scr); } static void mn_help_show() { mn_win_help->hidden = 0; mn_scr->current = mn_win_help; sl_cls(); } static void mn_scr_init(void) { int uw = WIDTH/10; int uh = HEIGHT/10; mn_scr = screen_add(); mn_win = window_add(mn_scr, PACKAGE " game v " VERSION, 1, 1, uw*6, 10); mn_menu = menu_add(mn_win, 1, 1, uw*6-2, 10, 0); menuobj_add(mn_menu, "world cup", 'w', cup_scr_show, OBJ_DOWN); menuobj_add(mn_menu, "training", 't',tr_scr_show, 0); menuobj_add(mn_menu, "join a game", 'j', cl_scr_show, 0); menuobj_add(mn_menu, "help", 'h', mn_help_show, 0); menuobj_add(mn_menu, "quit", 'q', quit, OBJ_DOWN); mn_win_help = window_add(mn_scr, "_he_lp", 5, 0, 49, 24); menuobj_add(menu_add(mn_win_help, 1, 22, 47, 3, 0), "<<(",'(', mn_scr_show, 0); mn_win_help->hidden = 1; textbox_add(mn_win_help, mn_help_text); } asciijump-1.0.2~beta/scrresult.c000066400000000000000000000043701143563544100167340ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SCRRESULT_C #include "scrresult.h" static struct widget *rs_scr; static struct widget *rs_win; static struct widget *rs_menu; static void (*rs_fnc_classic)(void); static void (*rs_fnc_winners)(void); void rs_actions(void (*classic)(void), void (*winners)(void)) { rs_fnc_classic = classic; rs_fnc_winners = winners; } static void rs_scr_reinit_winners(struct s_skier **array, int length) { int w = WIDTH/10*4; int h = HEIGHT-2; int i, place = 0, len = 0, tmplen = 0; char *text = NULL; rs_win = window_add(rs_scr, " _winner_s ", 1, 1, w, h-1); for (i = length-1; i+1; i--) { if (array[i] == NULL) continue; if (text) tmplen = strlen(text); len += strlen(array[i]->name) + 20; text = xrealloc(text, sizeof(char) * len); sprintf(text + tmplen, " %d. %.1f %s\n", ++place, array[i]->points, array[i]->name); } textbox_add(rs_win, text); xfree(text); menuobj_add(menu_add(rs_win, 1, h-3, w-2, 1, 0), "<<(", '(', rs_fnc_winners, 0); } static void rs_scr_reinit_classic(struct s_skier **array, int length, struct s_hill *hl) { int i; int h = HEIGHT-1; int w = WIDTH/10*8+3; struct s_skier *s; struct widget *mo; char *name = strglue("results _(next hill: ", hl->name, " _)"); rs_win = window_add(rs_scr, name, 1, 1, w, h-1); xfree(name); rs_menu = menu_add(rs_win, 1, 1, w-2, h-2, 0); rs_menu->selectable = 0; for (i = length-1; i+1; i--) { if ((s = array[i]) == NULL) continue; name = xmalloc(sizeof(char) * (strlen(s->name) + 30)); sprintf(name, "%s -- %.1f(%.1f)", s->name, s->points, s->last_points); mo = menuobj_add(rs_menu, name, name[d(strlen(name)-2)], NULL, 0); xfree(name); } menuobj_add(menu_add(rs_win, 1, h-3, w-2, 1, 0), ")>>", ')', rs_fnc_classic, 0); } void rs_scr_reinit(struct s_skier **array, int length, struct s_hill *hl) { if (array == NULL) rs_fnc_winners(); if (rs_scr == NULL) rs_scr = screen_add(); rs_win = window_free(rs_win); rs_menu = menu_free(rs_menu); if (hl) rs_scr_reinit_classic(array, length, hl); else rs_scr_reinit_winners(array, length); rs_scr->kids = rs_scr->current = rs_win; sl_cls(); state = A_menu; screen = rs_scr; } asciijump-1.0.2~beta/scrtrain.c000066400000000000000000000017311143563544100165310ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SCRTRAIN_C #include "scrtrain.h" struct s_skier *tr_skier; static struct widget* tr_scr; static struct widget* tr_win; static struct widget* tr_menu; void tr_scr_show() { if (tr_scr == NULL) tr_scr_init(); screen = tr_scr; state = A_menu; sl_cls(); } static void tr_usehill(void) { char *title = menu_selected_caption(tr_menu); struct s_hill *hl = hl_find(title, NULL); sk_flush(tr_skier, hl); game_show(); // GAME SHOW !! ugh !!! TODO } static void tr_scr_init() { struct s_hill *h = hl_head; int uw = WIDTH/10; int uh = HEIGHT/10; tr_scr = screen_add(); tr_win = window_add(tr_scr, "select _h_i_l_l", 1, 1, uw*4, uh*10-1); tr_menu = menu_add(tr_win, 1, 2, uw*4-2, uh*10-3, 0); for (; h; SWITCH(h)) menuobj_add(tr_menu, h->name, h->name[d(strlen(h->name))-1], tr_usehill, 0); menuobj_add(tr_menu, "<<(",'(', mn_scr_show, OBJ_DOWN); } asciijump-1.0.2~beta/skier.c000066400000000000000000000224731143563544100160270ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SKIER_C #include "skier.h" #define OX ((K/2 < 100) ? wgp1[s->bend].ox : wgp2[s->bend].ox) #define OY ((K/2 < 100) ? wgp1[s->bend].oy : wgp2[s->bend].oy) #define SN ((K/2 < 100) ? wgp1[s->bend].sn : wgp2[s->bend].sn) #define K (s->hill->k) // tail and head for main skiers list struct s_skier *sk_head, *sk_tail; // array for s_skiers struct s_skier **sk_array; int sk_counter; // typical names for famous skiers ;) static char *sk_names[] = { "player", "next player", "next ^2 player", "next ^3 player", "erykah badu","charlie parker", "thom yorke", "bjork", NULL }; void sk_array_sort() { struct s_skier *s; int i; for (i = 1; sk_array[i] && i < sk_counter; i++) { if (sk_array[i]->points >= sk_array[i-1]->points) continue; s = sk_array[i-1]; sk_array[i-1] = sk_array[i]; sk_array[i] = s; i = 0; } } void sk_add(struct s_skier *s) { if (sk_head == NULL) sk_tail = sk_head = s; else { sk_tail->next = s; SWITCH(sk_tail); } } struct s_skier *sk_rewind(int n) { struct s_skier *s = sk_head; while (n-- > 0 && s) SWITCH(s); return s; } void sk_array_init(int len) { int i; struct s_skier *s; sk_counter = len; sk_head = sk_tail = NULL; // do not free memory, for (i = 0; i < sk_counter; i++) { s = sk_init(hl_head, skin, (i < 8) ? sk_names[i] : "foo"); if (i < 4) s->level = 0; sk_add(s); } sk_array = xmalloc(sizeof(struct object *)*sk_counter); } struct s_skier* sk_init(struct s_hill *hl, struct frame *f, char *name) { struct s_skier *s = XALLOC(s_skier); s->current_frame = f; s->color = Lblue; s->color2 = Cyan; sk_flush(s, hl); sk_change_mode(s, name, 1 + d(8), d(3), 0); return s; } void sk_change_mode(struct s_skier *s, char *name, int color, int level, int in_use) { s->color = color; s->in_use = in_use; s->level = level; if (name) { xfree(s->name); s->name = strdup(name); } } void sk_flush(struct s_skier *s, struct s_hill *m) { s->hill = m; s->x = 62; // s->y = m->caption[s->x]-1; // here caption is 0x0 sk_animate(s, START); s->current_x = WIDTH/2-4; // TODO s->current_y = HEIGHT/2-2; // it cannot be store in every skier ! s->vx = 0.0; s->vy = 0.0; s->px = 0.0; s->py = 0.0; s->bend = 0; } void sk_draw(struct s_skier *s) { char result[20]; fr_draw(s->current_frame, s->current_x, s->current_y, "oO0@-/\\_", s->color, s->color2); sl_color(Green); sl_goto(0, HEIGHT-1); sl_addstr(s->name); if (s->state > TELEMARK) { int i = 0; sprintf(result, "%.2f _m %.1f", s->alight, s->last_points); sl_goto(WIDTH-strlen(result)-1, HEIGHT-1); sl_addstr_alt(result, sl_strlen_alt(result), Cyan, Lcyan); for (; i < 5; i++) { sl_goto(WIDTH-7, 2*i+1); sprintf(result, "%1.1f ", s->judge[i]); sl_addstr_alt(result, sl_strlen_alt(result), Cyan, Lcyan); } } else { if (s->hill->owner) sprintf(result, "%10.10s - %3.2f", s->hill->owner, s->hill->record); else sprintf(result, "%10.10s - 0.0 m", "none"); sl_goto(WIDTH-strlen(result)-7, HEIGHT-1); sl_color(Green); sl_addstr("record: "); sl_addstr(result); } } static int sk_animate(struct s_skier *s, int state) { struct frame *f = s->current_frame; if (state == NEXT_FRAME) { for (; f; SWITCH(f)) if (f->state != s->current_frame->state) break; s->current_frame = f; } else if (state == NEXT_GRASP) { if (s->current_frame->next && s->current_frame->next->state == s->current_frame->state) SWITCH(s->current_frame); else return 0; } else if (state == PREV_GRASP) { if (s->current_frame->prev && s->current_frame->prev->state == s->current_frame->state) PREV(s->current_frame); else return 0; } else { for (; f->prev; PREV(f)); for (; f; SWITCH(f)) if (f->state == state) break; s->current_frame = f; } s->state = s->current_frame->state; return 1; } static void sk_setpoints(struct s_skier *s) { double unit, points = 60; double lowest = 100, bigest = -2; int k = K/2, i; if (s->state == CRASH) for (i = 0; i < 5; i++) s->judge[i] = -7; if (k >= 150) { unit = 1.2; points = 120; } else if (k >= 100) unit = 1.8; else if (k >= 50) unit = 2; else unit = 2.1; if (s->alight > k) for (; k <= s->alight; k++) points += unit; else if (s->alight < k) for (; k >= s->alight; k--) points -= unit; for (i = 0; i < 5; i++) { if (s->alight < K/2) s->judge[i] -= 3; if (s->bend == 3) s->judge[i] -= 1; s->judge[i] += 20; s->judge[i] -= d(s->bend)/d(2); if (d(2)-1) s->judge[i] -= 0.5; if (lowest > s->judge[i]) lowest = s->judge[i]; if (bigest < s->judge[i]) bigest = s->judge[i]; } for (i =0; i < 5; i++) { if (s->judge[i] == bigest) bigest = -1; else if (s->judge[i] == lowest) lowest = -1; else points += s->judge[i]; } s->points += points; s->last_points = points; if (s->hill->record < s->alight && s->state != CRASH) { s->hill->record = s->alight; xfree(s->hill->owner); s->hill->owner = strdup(s->name); s->new_owner = 1; hl_record_write(s->hill); } } static void sk_service_crash(struct s_skier *s) { if (s->hill->caption[s->x] - s->y > 0) return; sk_animate(s, CRASH); s->alight = (s->x - s->hill->leapsill)/2; sk_setpoints(s); } static void sk_service_telemark(struct s_skier *s) { int i; int r = s->hill->caption[s->x] - s->y; if (r > 8 || r < 0) { sk_service_crash(s); return; } if (r <= 1 && d(10) < s->bend) return; sk_animate(s, TELEMARK); s->alight = (s->x - s->hill->leapsill)/2 + ((s->bend == 1) ? d(2): d(2)-1); if (d(13) == 7) s->alight++; else if (d(13) == 13) s->alight--; for (i = 0; i < 5; i++) s->judge[i] = 0; s->alight += (0.01 * d(100)); sk_setpoints(s); } static void sk_service_jump(struct s_skier *s) { double px = 0; int mvy = 0; if (s->x <= s->hill->leapsill -5) { px = 0.7/d(7); mvy = d(2); } else if (s->x <= s->hill->leapsill - 4) { px = 0.6/d(9); mvy = 1+d(2); } else if (s->x <= s->hill->leapsill - 2) { px = 0.8/d(9); mvy = 2 + d(2); } else if (s->x >= s->hill->leapsill) { px = 0.6/d(2); } s->bend = 2; s->vx = 2.3 + K/100 - px; s->y -= mvy; if (K/2 >= 100) { s->vx -= (K/2-99) * 0.013; s->y -= mvy-2; } s->vy = K/230; s->px = s->x; s->py = s->y; sk_animate(s, JUMP); } struct opory { double ox, oy ,sn; } wgp1[] = { { 3, 40, 2 }, { 0, 0, 1 }, { 3, 3, 2 }, { 3, 10, 4.6 } },wgp2[] = { { 8, 30, 6 }, { 0, 0, 1 }, { 10, 8, 5 }, { 3, 5, 3.2 }, }; void sk_service_move(struct s_skier *s) { if (s->state == FLY || s->state == JUMP) { const double w1 = 1000, w2 = 200, G = 0.098; double ax, ay = G; ax = -(OX * s->vx) / w1; ay = G + (OY * s->vy) / w1 - (SN * s->vx) / w2; s->vx += ax; s->vy += ay; s->px += s->vx; s->py += s->vy; s->x = (int)s->px; s->y = (int)s->py; if (d(50) == -7) sk_service_lucky(s); } else if (s->state != START && s->state != FINISH) { s->y = s->hill->caption[s->x]; s->vx += 65/K; if (s->state == RIDE || s->state == RIDE2) s->vx += 0.1; s->x+= s->vx; } else s->vx = 0; } static void sk_service_lucky(struct s_skier *s) { if (K/2 > 100) s->vx=2.5; else if (K/2 > 70) s->vx=3; else s->vx=3.5; s->vy=1; } void sk_cpujump(struct s_skier *s) { int fail = 0, i; double k = K/2; s->bend = d(4)-1; for (i = 0; i < 5; i++) s->judge[i] = 0; switch (s->level) { case 1: fail = 7; k -= k/3 + k/4; break; case 2: fail = 3; k -= k/4; break; case 3: k -= k/4; fail = 1; s->bend = d(2)-1; break; } if (d(10) <= fail) k -= K/2; else k += (d(s->level) ? 3 : 2) * d(K/10); s->alight = k; sk_setpoints(s); } int sk_service(struct s_skier *s, int key) { sk_service_move(s); if (key == 'q' && s->state > TELEMARK) s->state = FINISH; switch (s->state) { case START: if ((key == '\n' || s->current_frame->prev) && sk_animate(s, NEXT_GRASP) == 0) { s->vx = 2; sk_animate(s, DESCENT); } break; case DESCENT: sk_animate(s, NEXT_GRASP); if (s->x >= s->hill->pns) sk_animate(s, RIDE); break; case RIDE: sk_animate(s, NEXT_GRASP); if (key == '\n' || s->x >= s->hill->leapsill) sk_service_jump(s); break; case JUMP: if (sk_animate(s, NEXT_GRASP) == 0) { sk_animate(s, FLY); sk_animate(s, NEXT_GRASP); sk_animate(s, NEXT_GRASP); } break; case FLY: sk_service_crash(s); if (key == sl_key_left && s->bend > 0) { sk_animate(s, PREV_GRASP); s->bend--; } else if (key == sl_key_right && s->bend < 3) { sk_animate(s, NEXT_GRASP); s->bend++; } else if (key == '\n') sk_service_telemark(s); else if (key == '\'') sk_service_lucky(s); break; case TELEMARK: if (sk_animate(s, NEXT_GRASP) == 0) { if (s->x < s->hill->pnz) sk_animate(s, DESCENT2); else sk_animate(s, RIDE2); } break; case DESCENT2: sk_animate(s, NEXT_GRASP); if (s->x >= s->hill->pnz) sk_animate(s, RIDE2); break; case RIDE2: sk_animate(s, NEXT_GRASP); if (s->x > s->hill->len-s->current_x-25) sk_animate(s, STOP); break; case STOP: if (sk_animate(s, NEXT_GRASP) == 0 && s->x > s->hill->len-s->current_x-5) s->state = FINISH; break; case CRASH: sk_animate(s, NEXT_GRASP); if (s->x > s->hill->len-s->current_x-15) s->state = FINISH; break; case FINISH: if (s->new_owner) s->new_owner = 0; if (key) return 0; } return 1; } asciijump-1.0.2~beta/skin.c000066400000000000000000000025751143563544100156570ustar00rootroot00000000000000/* :: ascii-jump project :: $Id: skin.c,v 1.1.1.1 2003/02/28 10:05:04 loth Exp $ :: (C)opyright 2003 grzegorz moskal, g.moskal@opengruop.org :: license gnu gpl v 2 */ #define SKIN_C #include "skin.h" static struct frame* skin_init(char *dirname) { struct frame *first = NULL, *last = NULL; char no[9], *filename; FILE *fd; int i = 1; for (;i < 100; i++) { sprintf(no, "%s%d.frame", (i < 10) ? "0" : "", i); filename = strdglue(dirname, no); if ((fd = fopen(filename, "r")) == NULL) break; fclose(fd); if (last) { last->next = fr_init(filename); last->next->prev = last; last = last->next; } else first = last = fr_init(filename); xfree(filename); } xfree(filename); return first; } static char *dirnames[] = { "01start", "02descent", "03ride", "04jump", "05fly", "06telemark", "07descent2", "08ride2", "09stop", "10crash", NULL }; struct frame* skin_make(char *prefix) { struct frame *all_frames = NULL, *last, *tmp; int i = 0; char *dirname; for (; dirnames[i]; i++) { dirname = strdglue(prefix, dirnames[i]); if ((tmp = skin_init(dirname)) == NULL) continue; if (all_frames == NULL) all_frames = tmp; else { for (last = all_frames; last->next; SWITCH(last)); last->next = tmp; tmp->prev = last; } for (; tmp; SWITCH(tmp)) tmp->state = i; xfree(dirname); } return all_frames; } asciijump-1.0.2~beta/slang.c000066400000000000000000000106361143563544100160140ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) michal moskal, malekith@pld-linux.org :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define SLANG_C #include "slangwrap.h" int sl_screen_height, sl_screen_width; void (*sl_program_finish)(void); static void init_colors() { SLtt_set_color(Black, 0, C_BLACK, C_BLACK); SLtt_set_color(Grey, 0, C_GRAY, C_BLACK); SLtt_set_color(Blue, 0, C_BLUE, C_BLACK); SLtt_set_color(Lblue, 0, C_LIGHTBLUE, C_BLACK); SLtt_set_color(Green, 0, C_GREEN, C_BLACK); SLtt_set_color(Lgreen, 0, C_LIGHTGREEN, C_BLACK); SLtt_set_color(Cyan, 0, C_CYAN, C_BLACK); SLtt_set_color(Lcyan, 0, C_LIGHTCYAN, C_BLACK); SLtt_set_color(Red, 0, C_RED, C_BLACK); SLtt_set_color(Lred, 0, C_LIGHTRED, C_BLACK); SLtt_set_color(Mag, 0, C_MAGENTA, C_BLACK); SLtt_set_color(White, 0, C_LIGHTGRAY, C_BLACK); SLtt_set_color(Lwhite, 0, C_WHITE, C_BLACK); SLtt_set_color(Yellow, 0, C_YELLOW, C_BLACK); SLtt_set_color(Brown, 0, C_BROWN, C_BLACK); SLtt_set_color(Active, 0, C_BLACK, C_WHITE); SLtt_set_color(Active2, 0, C_BLACK, C_WHITE); SLtt_set_color(Passive, 0, C_LIGHTGRAY, C_BLACK); } int sl_screen_size_changed; static void resize_handler(int sig) { struct winsize size; if (ioctl(1, TIOCGWINSZ, &size) == 0) { SLtt_Screen_Rows = sl_screen_height = size.ws_row; SLtt_Screen_Cols = sl_screen_width = size.ws_col; sl_screen_size_changed++; } signal(sig, resize_handler); } static void int_handler(int x) { (void)x; sl_die("interrupt"); if (sl_program_finish) sl_program_finish(); } void sl_cls() { SLsmg_cls(); } void sl_addstr_fill_alt(const char *s, int n, int c1, int c2) { sl_color(c1); while (*s && n--) { if (*s == '_' && s[1]) { sl_color(c2); sl_putch(*++s); sl_color(c1); s++; } else sl_putch(*s++); } sl_color(c1); while (n-- > 0) sl_putch(' '); } void sl_addstr_alt(const char *s, int n, int c1, int c2) { sl_color(c1); while (*s && n--) { if (*s == '_' && s[1]) { sl_color(c2); sl_putch(*++s); sl_color(c1); s++; } else sl_putch(*s++); } sl_color(c1); } void sl_init(void (*program_finish)(void)) { SLtt_get_terminfo(); if (SLkp_init() == -1) sl_die("Unable to initialize SLkp."); if (SLang_init_tty(-1, 0, 0) == -1) sl_die("Unable to initialize SLang terminal."); SLsmg_init_smg(); SLang_set_abort_signal(int_handler); init_colors(); sl_screen_height = SLtt_Screen_Rows; sl_screen_width = SLtt_Screen_Cols; sl_program_finish = program_finish; resize_handler(SIGWINCH); } void sl_goto(int x, int y) { SLsmg_gotorc(y, x); } void sl_frame(int x, int y, int w, int h) { SLsmg_draw_box(y, x, h, w); } void sl_putch(int c) { SLsmg_write_char(c & 0xff); } void sl_putchxy(int c, int x, int y) { sl_goto(x, y); sl_putch(c); } void sl_addstr(const char *c) { SLsmg_write_string((char*)c); } void sl_addstrxy(char *s, int x, int y) { sl_goto(x, y); sl_addstr(s); } void sl_addstrn(const char *c, int n) { SLsmg_write_nstring((char*)c, n); } void sl_addstrn_fill(const char *c, int n) { int k; if ((k = strlen(c)) > n) SLsmg_write_nchars((char*)c, n); else { SLsmg_write_string((char*)c); SLsmg_write_nstring(0, n - k); } } void sl_color(int c) { SLsmg_set_color(c); } void sl_refresh() { SLsmg_refresh(); } void sl_fini() { SLsmg_reset_smg(); SLang_reset_tty(); } void sl_die(const char *msg) { sl_fini(); fprintf(stderr, "%s\n", msg); exit(1); } void sl_fill(int c, int x, int y, int w, int h) { SLsmg_fill_region(y, x, h, w, c); } int sl_strlen_alt(const char *s) { int n; for (n = 0; *s; s++, n++) if (*s == '_' && s[1]) s++; return n; } int sl_getch() { int k; if (SLang_input_pending(0) <= 0) return 0; k = SLkp_getkey(); switch (k) { case SL_KEY_ERR: return 0; case SL_KEY_UP: return sl_key_up; case SL_KEY_DOWN: return sl_key_down; case SL_KEY_LEFT: return sl_key_left; case SL_KEY_RIGHT: return sl_key_right; case SL_KEY_PPAGE: return sl_key_pgup; case SL_KEY_NPAGE: return sl_key_pgdn; case SL_KEY_BACKSPACE: case 8: return '\b'; case '\r': case SL_KEY_ENTER: return '\n'; case SL_KEY_DELETE: return sl_key_del; case SL_KEY_HOME: return sl_key_home; case SL_KEY_END: return sl_key_end; default: if (k < 256) return k; if (k > SL_KEY_F0 && k < SL_KEY_F0 + 24) return sl_key_f(k - SL_KEY_F0); return 0; } } int sl_getch2() { int oldkey = 0, key = 0; while ((key = sl_getch())) oldkey = key; return oldkey; } asciijump-1.0.2~beta/wsys.c000066400000000000000000000242521143563544100157140ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, eldevarth@nemerle.org */ #define WSYS_C #include "wsys.h" static void list_add(struct widget *mother, struct widget *child) { if (mother->kids == NULL) mother->last = mother->kids = child; else { mother->last->next = child; mother->last = child; } if (mother->current && mother->current->selectable == 0) SWITCH(mother->current); else if (mother->current == NULL) mother->current = child; child->mother = mother; } void list_switch(struct widget *w, int how) { struct widget *jmp; if (how == NEXT_WIDGET) { if (w->current->next) { for (jmp = w->current->next; jmp; SWITCH(jmp)) if (jmp->selectable && jmp->hidden == 0) { w->current = jmp; break; } } else if (w->wheel && w->current != w->kids) for (jmp = w->kids; jmp->next != w->current; SWITCH(jmp)) if (jmp->selectable && jmp->hidden == 0) { w->current = jmp; break; } } else if (how == PREV_WIDGET) { if (w->current != w->kids) { struct widget *arg = w->current; for (; arg != w->kids; arg = jmp) { for (jmp = w->kids; jmp->next != arg; SWITCH(jmp)); if (jmp->selectable && jmp->hidden == 0) { w->current = jmp; break; } } } else if (w->wheel) if (w->last->selectable && w->last->hidden == 0) w->current = w->last; } } static struct widget *widget_init(int x, int y, int w, int h) { struct widget *wee = XALLOC(widget); wee->x = x; wee->y = y; wee->w = w; wee->h = h; wee->kids = wee->next = wee->current = wee->mother = NULL; wee->data = NULL; wee->key = NULL; wee->draw = widget_draw; wee->selectable = 1; return wee; } struct widget *screen_add() { struct widget *scr = widget_init(0, 0, sl_screen_width, sl_screen_height); scr->key = screen_key; scr->type = Wsys_screen; return scr; } struct widget *window_add(struct widget *scr, char *title, int x, int y, int w, int h) { struct widget *win = widget_init(x+scr->x, y+scr->y, w, h); struct window *twin = XALLOC(window); twin->title = strdup(title); twin->len = sl_strlen_alt(title); win->data = twin; win->wheel = 1; win->draw = window_draw; win->key = window_key; list_add(scr, win); win->type = Wsys_window; textbox_add(win, ""); return win; } struct widget *inputline_add(struct widget *win, int x, int y, int w, void (*fnc)(void)) { struct widget *i = widget_init(x+win->x, y+win->y, w, 1); i->data = XALLOC(line); i->draw = inputline_draw; i->key = inputline_key; ((struct line *)i->data)->action = fnc; list_add(win, i); i->type = Wsys_inputline; return i; } struct widget *menu_add(struct widget *win, int x, int y, int w, int h, int tickable) { struct widget *m = widget_init(x+win->x, y+win->y, w, h); struct menu *tm = XALLOC(menu); tm->tickable = tickable; m->data = tm; list_add(win, m); m->type = Wsys_menu; m->key = menu_key; return m; } struct widget *menuobj_add(struct widget *menu, char *title, int key, void (*fnc)(void), int tick) { struct widget *mo ; int y; struct line *tmo = XALLOC(line); tmo->caption = strdup(title); tmo->place = strlen(title); tmo->action = fnc; if (menu->last) y = menu->last->y +1; else y = menu->y; if (tick <= OBJ_DOWN) { tick -= OBJ_DOWN; y++; } tmo->tick = tick; tmo->key = key; mo = widget_init(menu->x, y, menu->w, 1); mo->data = tmo; mo->type = Wsys_menuobj; mo->draw = menuobj_draw; mo->key = NULL; list_add(menu, mo); return mo; } struct widget *textbox_add(struct widget *win, char *text) { struct widget *tb = widget_init(win->x+1, win->y+1, win->w-2, win->h-2); if (text) tb->data = strdup(text); list_add(win, tb); tb->type = Wsys_textbox; tb->draw = textbox_draw; tb->key = NULL; tb->selectable = 0; return tb; } void textbox_cleanup(struct widget *tb, char *text) { char *s = (char *)tb->data; xfree(tb->data); tb->data = strdup(""); } void textbox_insert(struct widget *tb, char *text) { char *s = (char *)tb->data; s = strglue(s, text, ""); xfree(tb->data); tb->data = (void *)s; } struct widget *label_add(struct widget *win, int x, int y, int w, char *text) { struct widget *i = inputline_add(win, x, y, w, 0); i->selectable = 0; ((struct line *)i->data)->caption = strdup(text); return i; } static void widget_draw(struct widget *w) { struct widget *jmp = w->kids; for (; jmp; SWITCH(jmp)) if (jmp->hidden == 0) jmp->draw(jmp); if (w->current && w->current->hidden == 0) w->current->draw(w->current); } static void window_draw(struct widget *win) { struct window *twin = ((struct window *)win->data); struct widget *jmp = win->kids; sl_color(White); sl_frame(win->x, win->y, win->w, win->h); sl_goto(win->x +1, win->y); sl_putch(' '); sl_addstr_alt(twin->title, twin->len, Green, Lgreen); sl_putch(' '); for (; jmp; SWITCH(jmp)) if (jmp->hidden == 0) jmp->draw(jmp); win->current->draw(win->current); } static void inputline_draw(struct widget *i) { struct line *il = ((struct line *)i->data); sl_color(White); if (il->caption) { sl_goto(i->x, i->y); sl_addstr(il->caption); sl_putch(' '); } sl_goto(i->x + il->place, i->y); } static void textbox_draw(struct widget *t) { int x = t->x; int y = t->y; char *jmp = (char *)t->data; if (jmp == NULL) return; sl_color(White); for (; y < t->y + t->h; y++) { sl_goto(t->x, y); for (x = t->x; x < t->x + t->w; x++) { if (*jmp == '\n') { jmp++; break; } else if (*jmp) sl_putch(*jmp++); else break; } for (; x < t->x + t->w; x++) sl_putch(' '); } } static void menuobj_draw(struct widget *mo) { struct line * tmo = ((struct line * )mo->data); int i; int color = Passive , color2 = Red; if (mo->mother->current == mo && mo->mother->mother->current == mo->mother) { color = Active; color2 = Active2; } sl_color(color); sl_goto(mo->x, mo->y); for (i = 0; i < mo->w-4; i++) { if (i < tmo->place) { if (tmo->caption[i] == tmo->key) { sl_color(color2); sl_putch(tmo->caption[i]); sl_color(color); } else sl_putch(tmo->caption[i]); } else sl_putch(' '); } sl_addstr((tmo->tick == 1)? " ::" : " "); if (mo->mother->current == mo) sl_putch('<'); else sl_putch(' '); } static int screen_key(struct widget *screen, int key) { if (key == 0) return 0; switch (key) { case sl_key_f(1): list_switch(screen, NEXT_WIDGET); return 1; case sl_key_f(2): list_switch(screen, PREV_WIDGET); return 1; default: if (screen->current->key(screen->current, key)) return 1; } return 0; } static int window_key(struct widget *win, int key) { switch (key) { case '\t' : if (win->current->type == Wsys_inputline) win->current->key(win->current, '\n'); else list_switch(win, NEXT_WIDGET); return 1; default: if (win->current && win->current->key && win->current->key(win->current, key)) return 1; } return 0; } static int menu_key(struct widget *menu, int key) { struct line *li = ((struct line*)menu->current->data); struct widget *mo; switch (key) { case sl_key_pgup: if (menu->kids->selectable && menu->kids->hidden == 0) menu->current = menu->kids; return 1; case sl_key_pgdn: if (menu->last->selectable && menu->last->hidden == 0) menu->current = menu->last; return 1; case sl_key_up: list_switch(menu, PREV_WIDGET); return 1; case sl_key_down: list_switch(menu, NEXT_WIDGET); return 1; case '\n': if (li->action) { li->action(); return 1; } case ' ': if (((struct menu *)menu->data)->tickable && li->tick != -1) { li->tick = (li->tick == 0); list_switch(menu, NEXT_WIDGET); return 1; } break; default: for (mo = menu->kids; mo; SWITCH(mo)) if (((struct line *)mo->data)->key == key) { menu->current = mo; return 1; } } return 0; } static int inputline_key(struct widget *i, int key) { struct line *il = ((struct line *)i->data); switch (key) { case '\b': if (il->place > 0) { il->place--; il->caption[il->place] = '\0'; } return 1; case '\n': if (((struct line *)i->data)->action) ((struct line *)i->data)->action(); list_switch(i->mother, NEXT_WIDGET); return 1; case sl_key_right: if ((unsigned int)il->place < strlen(il->caption)) il->place++; return 1; case sl_key_left: if (il->place > 0) il->place--; return 1; default : if (il->place > il->length -2) { il->length = il->length*2 + 3; il->caption = xrealloc(il->caption, il->length * sizeof(char)); } // if (il->place < strlen(il->caption)) { // char *tmp = strdup(il->caption+il->place); // // } else { il->caption[il->place++] = key; il->caption[il->place] = '\0'; // } } return 1; } char *menu_selected_caption(struct widget *m) { return ((struct line *)m->current->data)->caption; } int menu_selected_number(struct widget *m) { struct widget *jmp = m->kids; int i = 0; for (; jmp; SWITCH(jmp), i++) if (jmp == m->current) return i; return -1; } void menu_select(struct widget*w, int n) { w->current = w->kids; while (n-- > 0) list_switch(w, NEXT_WIDGET); } struct widget *menu_ticked(struct widget *m) { for (; m; SWITCH(m)) if (((struct line*)m->data)->tick) break; return m; } void menu_tick(struct widget*mo) { ((struct line*)mo->data)->tick = 1; } void inputline_fill(struct widget *i, char *text) { struct line *il = ((struct line *)i->data); xfree(il->caption); il->caption = strdup(text); il->place = strlen(text); il->length = il->place; } char *inputline_caption(struct widget *i) { return ((struct line *)i->data)->caption; } void screen_hideall(struct widget *win) { struct widget *wj = win->kids; for (; wj; SWITCH(wj)) wj->hidden = 1; win->current->hidden = 0; sl_cls(); } struct widget *line_free(struct widget *l) { if (l == 0) return l; xfree(((struct line*)l->data)->caption); xfree(l->data); return xfree(l); } struct widget* menu_free(struct widget *m) { struct widget *w, *w2; if (m == NULL) return m; for (w = m->kids; w;) { w2 = w->next; line_free(w); w = w2; } xfree(m->data); return xfree(m); } struct widget* window_free(struct widget *win) { if (win == NULL) return win; if (win->mother->kids == win) win->mother->kids = win->mother->current = win->mother->last = NULL; xfree(((struct window *)win->data)->title); xfree(win->data); return xfree(win); } asciijump-1.0.2~beta/xfnc.c000066400000000000000000000104731143563544100156450ustar00rootroot00000000000000/* :: asciijump (client), gnu gpl v 2 :: copyright (c) grzegorz moskal, g.moskal@opengruop.org */ #define XFNC_C #include "xfnc.h" char *xgetcwd() { char *dir = NULL; int size = 100; dir = malloc(size); while (getcwd(dir, size) == NULL && errno == ERANGE) dir = xrealloc(dir, size *=2); return dir; } DIR *xopendir(char *name) { DIR *dir; if (name == NULL || (dir = opendir(name)) == NULL) { return NULL; // perror("opendir() faild ::"); // fprintf(stderr, "Can`t open dir: %s\n", name); // exit(2); } return dir; } void xchdir(char *name) { if (name == NULL || chdir(name) == -1) { perror("chdir() failed ::"); fprintf(stderr, "Can`t change dir: %s\n", name); exit(2); } } void *xmalloc(size_t size) { void *ptr; if (!size) return NULL; if ((ptr = calloc(1, size)) == NULL) { perror("calloc() failed ::"); exit(1); } return ptr; } void *xrealloc(void *ptr, size_t size) { if (!size) return NULL; ptr = realloc(ptr, size); if (ptr == NULL) { perror("realloc() failed ::"); exit(1); } return ptr; } void *xfree(void *ptr) { if (ptr) free(ptr); return 0; } FILE *xfopen(char *name, char *mode) { FILE *fd = fopen(name, mode); if (fd == NULL) { perror("fopen() failed :: "); fprintf(stderr, "Can`t open file: %s\n", name); exit(3); } return fd; } int d(int h) { if (h) return rand() % h +1; return 0; } void rand_init() { srand(time(0)); } char *xread(int fd) { int length = 1, i = 0; char *line = NULL; size_t sofc = sizeof(char); for (;;) { if (length-1 == i) { length *=3; line = xrealloc(line, length*sofc); } read(fd, &line[i], sofc); // if (read(fd, &line[i], sofc) == -1) // perror(">> read faild "); if (line[i] == 0 || line[i] == '\0') { if (i == 0) return NULL; line[i] = '\0'; break; } else if (line[i] == '\n') { if (i == 0) return xread(fd); line[i] = '\0'; break; } i++; } return line; } char *xgetline(FILE *fd) { int length = 1; int i = 0; char *line = NULL; for (;;) { if (length-1 == i) { length *=3; line = xrealloc(line, length*(sizeof(char))); } line[i] = fgetc(fd); if (line[i] == EOF) { if (i == 0) return NULL; line[i] = '\0'; break; } else if (line[i] == '\n') { if (i == 0) return xgetline(fd); line[i] = '\0'; break; } i++; } return line; } char *strglue(const char *s1, const char *s2, const char *s3) { char *r; if (s1 == NULL) return NULL; if (s2 == NULL) s2 = ""; if (s3 == NULL) s3 = ""; r = malloc(sizeof(char) * (strlen(s1) + strlen(s2) + strlen(s3) +1)); sprintf(r,"%s%s%s", s1, s2, s3); return r; } char *strdglue(const char *p1, const char *p2) { return strglue(p1, "/", p2); } char *strwide(char *s) { char *wt = xmalloc(sizeof(char)*(strlen(s)*2+1)); char *j = wt; while (s && *s) { *j++ = *s++; *j++ = ' '; } *j = '\0'; return wt; } char *n_type_description(n_type t) { switch (t) { case Msg: return "message"; case Hill: return "hill"; case Results: return "result"; case User: return "user data"; case Bye: return "bye signal"; case You: return "this user data"; case Id: return "user id"; case Everyone: return "everyone done"; case Kick: return "karma police"; } } char *hill_name; int hill_length; // should also read line like this:' name = foo ', TODO ;) static int hill_readconf(char *filename) { FILE *fd = fopen(filename, "r"); char *line = NULL; if (fd == NULL) return 0; while ((line = xgetline(fd))) { if (strstr(line, "name=")) { if (hill_name) xfree(hill_name); hill_name = strdup(&line[5]); } if (strstr(line, "length=")) hill_length = atoi(&line[7]); xfree(line); } if (hill_length == 0 && hill_name == NULL) return 0; return 1; } int hill_readdir_extend(char *dirname, int *counter_ptr, void (*fnc)(void)) { struct dirent *j; char *currentdir = xgetcwd(); DIR *where = xopendir(dirname); int counter = 0; int i = 0; if (where == NULL) return -1; xchdir(dirname); while ((j = readdir(where))) { if (*j->d_name == '.' || strcmp("core", j->d_name) == 0) continue; hill_length = 0; if (hill_name) hill_name = xfree(hill_name); if (hill_readconf(j->d_name) == 0) continue; fnc(); counter++; } xchdir(currentdir); xfree(currentdir); *counter_ptr += counter; return counter; }