From e3ac6357dccf4c20051103bd1fdab36e732064f0 Mon Sep 17 00:00:00 2001 From: Joseph Carter Date: Wed, 29 Dec 1999 13:58:47 +0000 Subject: [PATCH] Loring Holden's autoconf support. {qw-client,quake}-glide is currently not built since neither of us has the hardware available at the moment to test the 3dfx MiniGL target. Someone who does (Mercury?) will have to fix that. Bins all build in odd places for the moment. Thanks for staying up so late to help get this working Loring, you rock! --- AUTHORS | 10 + INSTALL | 188 +- Makefile | 6 - Makefile.in | 41 + client.in | 34 + common/common_quakedef.h | 4 + common/gl_vidlinuxglx.c | 1 - common/snd_null.c | 11 + common/vid_sunx.c | 3 + config.guess | 1141 ++++++++++++ config.sub | 1215 +++++++++++++ configure | 3656 ++++++++++++++++++++++++++++++++++++++ configure.in | 324 ++++ install-sh | 251 +++ post.in | 14 + pre.in | 30 + qw_client/Makefile | 679 ------- qw_client/Makefile.in | 45 + qw_client/cl_main.c | 10 + qw_client/gl_draw.c | 44 +- qw_client/gl_rsurf.c | 2 - qw_client/glquake.h | 14 +- qw_client/sys_linux.c | 6 +- qw_common/common.c | 40 +- qw_common/common.h | 2 - qw_common/net_udp.c | 10 +- qw_server/Makefile | 190 -- qw_server/Makefile.in | 84 + qw_server/sys_unix.c | 3 +- rules.in | 154 ++ srcfiles.in | 84 + uquake/Makefile | 745 -------- uquake/Makefile.in | 46 + uquake/common.c | 40 +- uquake/common.h | 2 - uquake/gl_draw.c | 49 +- uquake/menu.c | 8 + uquake/net_udp.c | 11 +- uquake/sys_sun.c | 3 +- 39 files changed, 7497 insertions(+), 1703 deletions(-) delete mode 100644 Makefile create mode 100644 Makefile.in create mode 100644 client.in create mode 100755 config.guess create mode 100755 config.sub create mode 100755 configure create mode 100644 configure.in create mode 100755 install-sh create mode 100644 post.in create mode 100644 pre.in delete mode 100644 qw_client/Makefile create mode 100644 qw_client/Makefile.in delete mode 100644 qw_server/Makefile create mode 100644 qw_server/Makefile.in create mode 100644 rules.in create mode 100644 srcfiles.in delete mode 100644 uquake/Makefile create mode 100644 uquake/Makefile.in diff --git a/AUTHORS b/AUTHORS index e69de29..6f0f4a8 100644 --- a/AUTHORS +++ b/AUTHORS @@ -0,0 +1,10 @@ +The original Quake, QuakeWorld, and QuakeWorld server: + ID Software, Inc http://www.idsoftware.com + +Merge of the QW/Q1 trees done largely by: + Jeff Teunissen + Zephaniah E. Hull + +Autoconf support: + Loring Holden + diff --git a/INSTALL b/INSTALL index e504e74..1d715ef 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,187 @@ -rudimentary install instructions :) +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes awhile. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +***Note: If you have OpenGL in /usr/X11R6/lib, you will have to run configure +with: +./configure --enable-OpenGLINC=/usr/X11R6/include + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + In addition, if you use an unusual directory layout you can give +options like `--bindir=PATH' to specify different values for particular +kinds of files. Run `configure --help' for a list of the directories +you can set and what kinds of files go in them. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. To + suppress all normal output, redirect it to `/dev/null' (any error + messages will still be shown). + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. -make diff --git a/Makefile b/Makefile deleted file mode 100644 index e7bc99b..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -SUBDIRS = qw_client qw_server uquake - -all %: - for dir in $(SUBDIRS); do \ - $(MAKE) -C $$dir $@; \ - done diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..e8ea787 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,41 @@ +SUBDIRS = qw_client qw_server uquake +SRC_DIR = @src_dir@ + +all: + @for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir $@ || exit; \ + done + +distclean: + rm -f config.cache config.log config.status \ + Makefile.header Makefile.client Makefile.comp_rules \ + Makefile.source Makefile.tail Makefile \ + client pre post rules srcfiles + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir $@ || exit; \ + done + +%: + @for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir $@ || exit; \ + done + + +# Code to automatically re-configure, only runs if you are compiling in the +# source directory +ifeq ($(SRC_DIR),.) +configure: configure.in + autoconf + +Makefile: Makefile.in configure + ./configure + +qw_client/Makefile: qw_client/Makefile.in configure + ./configure + +qw_server/Makefile: qw_server/Makefile.in configure + ./configure + +uquake/Makefile: uquake/Makefile.in configure + ./configure +endif diff --git a/client.in b/client.in new file mode 100644 index 0000000..98470b4 --- /dev/null +++ b/client.in @@ -0,0 +1,34 @@ +ifneq ($(HAS_OGL),) +GLQUAKE =$(BIN_PREFIX)-gl +endif + +# XXX add glide +ifneq ($(HAS_GLIDE),) +GLIDEQUAKE= $(BIN_PREFIX)-glide +endif + +ifneq ($(HAS_X11),) +X11QUAKE = $(BIN_PREFIX)-x11 +endif + +ifneq ($(HAS_VGA),) +SVGAQUAKE = $(BIN_PREFIX)-svga +endif + +RELEASE = @RELEASE@ +ifeq ($(RELEASE),yes) +OPTFLAGS = @RELEASE_CFLAGS@ +else +OPTFLAGS = -g +endif + +targets = $(SVGAQUAKE) $(GLQUAKE) $(GLIDEQUAKE) $(X11QUAKE) +CLEAN_TARGETS = $(patsubst %,clean-%, $(targets)) +.PHONY: $(targets) ($CLEAN_TARGETS) + +x: Makefile + @echo binaries: $(targets) + @echo other targets: distclean + @echo all: makes all targets - $(targets) + +all: $(targets) diff --git a/common/common_quakedef.h b/common/common_quakedef.h index a6dcf2e..2b2f9ef 100644 --- a/common/common_quakedef.h +++ b/common/common_quakedef.h @@ -71,7 +71,11 @@ void VID_UnlockBuffer (void); #include "keys.h" #include "console.h" #include "view.h" +#ifndef QUAKEWORLD #include "menu.h" +#elif !defined(SERVERONLY) +#include "menu.h" +#endif #include "crc.h" #include "cdaudio.h" diff --git a/common/gl_vidlinuxglx.c b/common/gl_vidlinuxglx.c index 2a72178..9fc1c5b 100644 --- a/common/gl_vidlinuxglx.c +++ b/common/gl_vidlinuxglx.c @@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include -#include #include #include #include diff --git a/common/snd_null.c b/common/snd_null.c index 9db2ebc..51fd862 100644 --- a/common/snd_null.c +++ b/common/snd_null.c @@ -22,6 +22,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" +// ======================================================================= +// Various variables also defined in snd_dma.c +// FIXME - should be put in one place +// ======================================================================= +channel_t channels[MAX_CHANNELS]; +int total_channels; +volatile dma_t *shm = 0; +cvar_t loadas8bit = {"loadas8bit", "0"}; +int paintedtime; // sample PAIRS + + cvar_t bgmvolume = {"bgmvolume", "1", true}; cvar_t volume = {"volume", "0.7", true}; diff --git a/common/vid_sunx.c b/common/vid_sunx.c index 0400fed..d6c6f68 100644 --- a/common/vid_sunx.c +++ b/common/vid_sunx.c @@ -39,6 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include "d_local.h" +cvar_t _windowed_mouse = {"_windowed_mouse","0", true}; cvar_t m_filter = {"m_filter","0", true}; qboolean mouse_avail; @@ -1058,7 +1059,9 @@ void VID_Update (vrect_t *rects) while (rects) { +#if 0 printf("update: %d,%d (%d,%d)\n", rects->x, rects->y, rects->width, rects->height); +#endif if (x_visinfo->depth == 16) st2_fixup( x_framebuffer[current_framebuffer], rects->x, rects->y, rects->width, diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..6b54261 --- /dev/null +++ b/config.guess @@ -0,0 +1,1141 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999 +# Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# Use $HOST_CC if defined. $CC may point to a cross-compiler +if test x"$CC_FOR_BUILD" = x; then + if test x"$HOST_CC" != x; then + CC_FOR_BUILD="$HOST_CC" + else + if test x"$CC" != x; then + CC_FOR_BUILD="$CC" + else + CC_FOR_BUILD=cc + fi + fi +fi + + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + macppc:NetBSD:*:*) + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $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 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + sed 's/^ //' << EOF >$dummy.c + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + rm -f $dummy.c $dummy + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*T3E:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + if test -x /usr/bin/objformat; then + if test "elf" = "`/usr/bin/objformat`"; then + echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` + exit 0 + fi + fi + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_help_string=`cd /; ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + *ia64) + echo "${UNAME_MACHINE}-unknown-linux" + exit 0 + ;; + i?86linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 + ;; + i?86coff) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 + ;; + sparclinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + armlinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32arm*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + armelf_linux*) + echo "${UNAME_MACHINE}-unknown-linux-gnu" + exit 0 + ;; + m68klinux) + echo "${UNAME_MACHINE}-unknown-linux-gnuaout" + exit 0 + ;; + elf32ppc) + # Determine Lib Version + cat >$dummy.c < +#if defined(__GLIBC__) +extern char __libc_version[]; +extern char __libc_release[]; +#endif +main(argc, argv) + int argc; + char *argv[]; +{ +#if defined(__GLIBC__) + printf("%s %s\n", __libc_version, __libc_release); +#else + printf("unkown\n"); +#endif + return 0; +} +EOF + LIBC="" + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy | grep 1\.99 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.c $dummy + echo powerpc-unknown-linux-gnu${LIBC} + exit 0 + ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + cat <$dummy.s + .data + \$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main + main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + LIBC="" + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >$dummy.c </dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + 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:7*) + # Fixed at (any) Pentium or better + UNAME_MACHINE=i586 + if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then + echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-qnx-qnx${UNAME_VERSION} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1 diff --git a/config.sub b/config.sub new file mode 100755 index 0000000..2436b45 --- /dev/null +++ b/config.sub @@ -0,0 +1,1215 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=vxworks + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \ + | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | miprs64vr5000el \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ + | thumb | d10v) + basic_machine=$basic_machine-unknown + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \ + | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* \ + | f301-* | armv*-* | t3e-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | c30-* ) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + i386-go32 | go32) + basic_machine=i386-unknown + os=-go32 + ;; + i386-mingw32 | mingw32) + basic_machine=i386-unknown + os=-mingw32 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | *MiNT) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-unknown + os=-msdos + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-corel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + np1) + basic_machine=np1-gould + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc | sparcv9) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -openstep* | -oskit*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -*MiNT) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-corel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -*MiNT) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os diff --git a/configure b/configure new file mode 100755 index 0000000..20ef13b --- /dev/null +++ b/configure @@ -0,0 +1,3656 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.13 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --with-optimize Compile with optimization" +ac_help="$ac_help + --enable-release Compile release (with optimization)" +ac_help="$ac_help + --enable-OpenGLLIB=ARG Use OpenGL - the libraries are in ARG" +ac_help="$ac_help + --enable-OpenGLINC=ARG Use OpenGL - the include files are in ARG" +ac_help="$ac_help + --with-x use the X Window System" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.13" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. +if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=common/crc.h + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + echo "loading cache $cache_file" + . $cache_file +else + echo "creating cache $cache_file" + > $cache_file +fi + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +ac_exeext= +ac_objext=o +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } +fi +ac_config_guess=$ac_aux_dir/config.guess +ac_config_sub=$ac_aux_dir/config.sub +ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. + + +# Do some error checking and defaulting for the host and target type. +# The inputs are: +# configure --host=HOST --target=TARGET --build=BUILD NONOPT +# +# The rules are: +# 1. You are not allowed to specify --host, --target, and nonopt at the +# same time. +# 2. Host defaults to nonopt. +# 3. If nonopt is not specified, then host defaults to the current host, +# as determined by config.guess. +# 4. Target and build default to nonopt. +# 5. If nonopt is not specified, then target and build default to host. + +# The aliases save the names the user supplied, while $host etc. +# will get canonicalized. +case $host---$target---$nonopt in +NONE---*---* | *---NONE---* | *---*---NONE) ;; +*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;; +esac + + +# Make sure we can run config.sub. +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : +else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } +fi + +echo $ac_n "checking host system type""... $ac_c" 1>&6 +echo "configure:582: checking host system type" >&5 + +host_alias=$host +case "$host_alias" in +NONE) + case $nonopt in + NONE) + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : + else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } + fi ;; + *) host_alias=$nonopt ;; + esac ;; +esac + +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` +host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$host" 1>&6 + +echo $ac_n "checking target system type""... $ac_c" 1>&6 +echo "configure:603: checking target system type" >&5 + +target_alias=$target +case "$target_alias" in +NONE) + case $nonopt in + NONE) target_alias=$host_alias ;; + *) target_alias=$nonopt ;; + esac ;; +esac + +target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias` +target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$target" 1>&6 + +echo $ac_n "checking build system type""... $ac_c" 1>&6 +echo "configure:621: checking build system type" >&5 + +build_alias=$build +case "$build_alias" in +NONE) + case $nonopt in + NONE) build_alias=$host_alias ;; + *) build_alias=$nonopt ;; + esac ;; +esac + +build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias` +build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +echo "$ac_t""$build" 1>&6 + +test "$host_alias" != "$target_alias" && + test "$program_prefix$program_suffix$program_transform_name" = \ + NONENONEs,x,x, && + program_prefix=${target_alias}- + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:654: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:684: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_prog_rejected=no + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:735: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi + +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:767: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +cat > conftest.$ac_ext << EOF + +#line 778 "configure" +#include "confdefs.h" + +main(){return(0);} +EOF +if { (eval echo configure:783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + ac_cv_prog_cc_works=yes + # If we can't run a trivial program, we are probably using a cross compiler. + if (./conftest; exit) 2>/dev/null; then + ac_cv_prog_cc_cross=no + else + ac_cv_prog_cc_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cc_works=no +fi +rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross + +echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 +if test $ac_cv_prog_cc_works = no; then + { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } +fi +echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 +echo "configure:809: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 +cross_compiling=$ac_cv_prog_cc_cross + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +echo "configure:814: checking whether we are using GNU C" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi + +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 + +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:842: checking whether ${CC-cc} accepts -g" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'void f(){}' > conftest.c +if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then + ac_cv_prog_cc_g=yes +else + ac_cv_prog_cc_g=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +echo "configure:874: checking how to run the C preprocessor" >&5 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 +echo "configure:954: checking whether ${MAKE-make} sets \${MAKE}" >&5 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftestmake <<\EOF +all: + @echo 'ac_maketemp="${MAKE}"' +EOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftestmake +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$ac_t""yes" 1>&6 + SET_MAKE= +else + echo "$ac_t""no" 1>&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 +echo "configure:982: checking whether byte ordering is bigendian" >&5 +if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_cv_c_bigendian=unknown +# See if sys/param.h defines the BYTE_ORDER macro. +cat > conftest.$ac_ext < +#include +int main() { + +#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN + bogus endian macros +#endif +; return 0; } +EOF +if { (eval echo configure:1000: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + # It does; now see whether it defined to BIG_ENDIAN or not. +cat > conftest.$ac_ext < +#include +int main() { + +#if BYTE_ORDER != BIG_ENDIAN + not big endian +#endif +; return 0; } +EOF +if { (eval echo configure:1015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_c_bigendian=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_c_bigendian=no +fi +rm -f conftest* +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 +fi +rm -f conftest* +if test $ac_cv_c_bigendian = unknown; then +if test "$cross_compiling" = yes; then + { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } +else + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + ac_cv_c_bigendian=no +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_c_bigendian=yes +fi +rm -fr conftest* +fi + +fi +fi + +echo "$ac_t""$ac_cv_c_bigendian" 1>&6 +if test $ac_cv_c_bigendian = yes; then + cat >> confdefs.h <<\EOF +#define WORDS_BIGENDIAN 1 +EOF + +fi + + +# Check whether --with-optimize or --without-optimize was given. +if test "${with_optimize+set}" = set; then + withval="$with_optimize" + RELEASE=$with_optimize + +fi + + +# Check whether --enable-release or --disable-release was given. +if test "${enable_release+set}" = set; then + enableval="$enable_release" + RELEASE=$enable_release + +fi + + + +# Check whether --enable-OpenGLLIB or --disable-OpenGLLIB was given. +if test "${enable_OpenGLLIB+set}" = set; then + enableval="$enable_OpenGLLIB" + HAS_OGL_LIB=yes; OGL_LIB_PATH=$enable_OpenGLLIB; + OGL_LDFLAGS=-L$enable_OpenGLLIB +fi + + + +# Check whether --enable-OpenGLINC or --disable-OpenGLINC was given. +if test "${enable_OpenGLINC+set}" = set; then + enableval="$enable_OpenGLINC" + HAS_OGL_INC=yes; OGL_INC_PATH=$enable_OpenGLINC; OGL_CFLAGS=-I$enable_OpenGLINC +fi + + + +if test "x$HAS_OGL_LIB" = x; then +echo $ac_n "checking for glColor4f in -lGL""... $ac_c" 1>&6 +echo "configure:1108: checking for glColor4f in -lGL" >&5 +ac_lib_var=`echo GL'_'glColor4f | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lGL $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_OGL_LIB=yes +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for glColor4f in -lMesaGL""... $ac_c" 1>&6 +echo "configure:1146: checking for glColor4f in -lMesaGL" >&5 +ac_lib_var=`echo MesaGL'_'glColor4f | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lMesaGL $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_OGL_LIB=yes +else + echo "$ac_t""no" 1>&6 +if test "x$HAS_OGL_INC" != x; then + POSS_OGL_LDFLAGS=`echo $enable_OpenGLINC| sed 's/include/lib/i'`; + echo $ac_n "checking for $POSS_OGL_LDFLAGS/libGL.so""... $ac_c" 1>&6 +echo "configure:1186: checking for $POSS_OGL_LDFLAGS/libGL.so" >&5 + if test -f "$POSS_OGL_LDFLAGS"/libGL.so; then + echo "$ac_t""yes" 1>&6 + HAS_OGL_LIB=yes + OGL_LDFLAGS=-L$POSS_OGL_LDFLAGS + OGL_LIB_PATH=$POSS_OGL_LDFLAGS + else + echo "$ac_t""no" 1>&6 + fi + fi + +fi + + +fi + +fi + +if test "x$HAS_OGL_INC" = x; then + ac_safe=`echo "GL/gl.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for GL/gl.h""... $ac_c" 1>&6 +echo "configure:1207: checking for GL/gl.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_OGL_INC=yes +else + echo "$ac_t""no" 1>&6 +if test "x$HAS_OGL_LIB" != x; then + POSS_OGL_CFLAGS=`echo $enable_OpenGLLIB| sed 's/lib/include/i'`; + echo $ac_n "checking for $POSS_OGL_CFLAGS/GL/gl.h""... $ac_c" 1>&6 +echo "configure:1239: checking for $POSS_OGL_CFLAGS/GL/gl.h" >&5 + if test -f "$POSS_OGL_CFLAGS/GL/gl.h"; then + HAS_OGL_INC=yes + OGL_CFLAGS=-I$POSS_OGL_CFLAGS + OGL_INC_PATH=$POSS_OGL_CFLAGS + echo "$ac_t""yes" 1>&6 + else + echo "$ac_t""no" 1>&6 + fi + fi + +fi + +fi + +echo $ac_n "checking for OpenGL support""... $ac_c" 1>&6 +echo "configure:1255: checking for OpenGL support" >&5 +if test "x$HAS_OGL_INC" != x; then + if test "x$HAS_OGL_LIB" != x; then + HAS_OGL=yes + echo "$ac_t""yes, include ($OGL_CFLAGS), lib ($OGL_LDFLAGS)" 1>&6 + if test "x$OGL_LDFLAGS" = x-L; then + { echo "configure: error: OpenGL LDFLAGS is -L with no directory" 1>&2; exit 1; } + fi + echo $ac_n "checking for GL_COLOR_INDEX8_EXT""... $ac_c" 1>&6 +echo "configure:1264: checking for GL_COLOR_INDEX8_EXT" >&5 + if test "x$OGL_INC_PATH" = x; then + OGL_INC_PATH_TO_GL="$OGL_INC_PATH/GL/gl.h" + else + OGL_INC_PATH_TO_GL="GL/gl.h" + fi + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + HAS_GL_COLOR_INDEX8_EXT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + HAS_GL_COLOR_INDEX8_EXT=no +fi +rm -f conftest* + if test "x$HAS_GL_COLOR_INDEX8_EXT" != xno; then + cat >> confdefs.h <<\EOF +#define HAS_GL_COLOR_INDEX8_EXT 1 +EOF + fi + + else + echo "$ac_t""no" 1>&6 + fi + else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking for vga_getmousetype in -lvga""... $ac_c" 1>&6 +echo "configure:1303: checking for vga_getmousetype in -lvga" >&5 +ac_lib_var=`echo vga'_'vga_getmousetype | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lvga $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_VGA=yes +else + echo "$ac_t""no" 1>&6 +HAS_VGA= +fi + + +echo $ac_n "checking for xil_import in -lxil""... $ac_c" 1>&6 +echo "configure:1345: checking for xil_import in -lxil" >&5 +ac_lib_var=`echo xil'_'xil_import | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lxil $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_XIL=yes +else + echo "$ac_t""no" 1>&6 +HAS_XIL= +fi + + +# If we find X, set shell vars x_includes and x_libraries to the +# paths, otherwise set no_x=yes. +# Uses ac_ vars as temps to allow command line to override cache and checks. +# --without-x overrides everything else, but does not touch the cache. +echo $ac_n "checking for X""... $ac_c" 1>&6 +echo "configure:1391: checking for X" >&5 + +# Check whether --with-x or --without-x was given. +if test "${with_x+set}" = set; then + withval="$with_x" + : +fi + +# $have_x is `yes', `no', `disabled', or empty when we do not yet know. +if test "x$with_x" = xno; then + # The user explicitly disabled X. + have_x=disabled +else + if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then + # Both variables are already set. + have_x=yes + else +if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # One or both of the vars are not set, and there is no cached value. +ac_x_includes=NO ac_x_libraries=NO +rm -fr conftestdir +if mkdir conftestdir; then + cd conftestdir + # Make sure to not put "make" in the Imakefile rules, since we grep it out. + cat > Imakefile <<'EOF' +acfindx: + @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"' +EOF + if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then + # GNU make sometimes prints "make[1]: Entering...", which would confuse us. + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` + # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. + for ac_extension in a so sl; do + if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && + test -f $ac_im_libdir/libX11.$ac_extension; then + ac_im_usrlibdir=$ac_im_libdir; break + fi + done + # Screen out bogus values from the imake configuration. They are + # bogus both because they are the default anyway, and because + # using them would break gcc on systems where it needs fixed includes. + case "$ac_im_incroot" in + /usr/include) ;; + *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;; + esac + case "$ac_im_usrlibdir" in + /usr/lib | /lib) ;; + *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;; + esac + fi + cd .. + rm -fr conftestdir +fi + +if test "$ac_x_includes" = NO; then + # Guess where to find include files, by looking for this one X11 .h file. + test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h + + # First, try using that file with no special directory specified. +cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + # We can compile using X headers with no special include directory. +ac_x_includes= +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + # Look for the header file in a standard set of common directories. +# Check X11 before X11Rn because it is often a symlink to the current release. + for ac_dir in \ + /usr/X11/include \ + /usr/X11R6/include \ + /usr/X11R5/include \ + /usr/X11R4/include \ + \ + /usr/include/X11 \ + /usr/include/X11R6 \ + /usr/include/X11R5 \ + /usr/include/X11R4 \ + \ + /usr/local/X11/include \ + /usr/local/X11R6/include \ + /usr/local/X11R5/include \ + /usr/local/X11R4/include \ + \ + /usr/local/include/X11 \ + /usr/local/include/X11R6 \ + /usr/local/include/X11R5 \ + /usr/local/include/X11R4 \ + \ + /usr/X386/include \ + /usr/x386/include \ + /usr/XFree86/include/X11 \ + \ + /usr/include \ + /usr/local/include \ + /usr/unsupported/include \ + /usr/athena/include \ + /usr/local/x11r5/include \ + /usr/lpp/Xamples/include \ + \ + /usr/openwin/include \ + /usr/openwin/share/include \ + ; \ + do + if test -r "$ac_dir/$x_direct_test_include"; then + ac_x_includes=$ac_dir + break + fi + done +fi +rm -f conftest* +fi # $ac_x_includes = NO + +if test "$ac_x_libraries" = NO; then + # Check for the libraries. + + test -z "$x_direct_test_library" && x_direct_test_library=Xt + test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc + + # See if we find them without any special options. + # Don't add to $LIBS permanently. + ac_save_LIBS="$LIBS" + LIBS="-l$x_direct_test_library $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + LIBS="$ac_save_LIBS" +# We can link X programs with no special library path. +ac_x_libraries= +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + LIBS="$ac_save_LIBS" +# First see if replacing the include by lib works. +# Check X11 before X11Rn because it is often a symlink to the current release. +for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \ + /usr/X11/lib \ + /usr/X11R6/lib \ + /usr/X11R5/lib \ + /usr/X11R4/lib \ + \ + /usr/lib/X11 \ + /usr/lib/X11R6 \ + /usr/lib/X11R5 \ + /usr/lib/X11R4 \ + \ + /usr/local/X11/lib \ + /usr/local/X11R6/lib \ + /usr/local/X11R5/lib \ + /usr/local/X11R4/lib \ + \ + /usr/local/lib/X11 \ + /usr/local/lib/X11R6 \ + /usr/local/lib/X11R5 \ + /usr/local/lib/X11R4 \ + \ + /usr/X386/lib \ + /usr/x386/lib \ + /usr/XFree86/lib/X11 \ + \ + /usr/lib \ + /usr/local/lib \ + /usr/unsupported/lib \ + /usr/athena/lib \ + /usr/local/x11r5/lib \ + /usr/lpp/Xamples/lib \ + /lib/usr/lib/X11 \ + \ + /usr/openwin/lib \ + /usr/openwin/share/lib \ + ; \ +do + for ac_extension in a so sl; do + if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then + ac_x_libraries=$ac_dir + break 2 + fi + done +done +fi +rm -f conftest* +fi # $ac_x_libraries = NO + +if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then + # Didn't find X anywhere. Cache the known absence of X. + ac_cv_have_x="have_x=no" +else + # Record where we found X for the cache. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries" +fi +fi + fi + eval "$ac_cv_have_x" +fi # $with_x != no + +if test "$have_x" != yes; then + echo "$ac_t""$have_x" 1>&6 + no_x=yes +else + # If each of the values was on the command line, it overrides each guess. + test "x$x_includes" = xNONE && x_includes=$ac_x_includes + test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries + # Update the cache value to reflect the command line values. + ac_cv_have_x="have_x=yes \ + ac_x_includes=$x_includes ac_x_libraries=$x_libraries" + echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6 +fi + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +echo "configure:1640: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_nospace=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no +fi +rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no +fi +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:1705: checking for dnet_ntoa in -ldnet" >&5 +ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:1746: checking for dnet_ntoa in -ldnet_stub" >&5 +ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +echo "configure:1794: checking for gethostbyname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:1843: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 +echo "configure:1892: checking for connect" >&5 +if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +connect(); +#endif + +; return 0; } +EOF +if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:1941: checking for connect in -lsocket" >&5 +ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + echo $ac_n "checking for remove""... $ac_c" 1>&6 +echo "configure:1984: checking for remove" >&5 +if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_remove) || defined (__stub___remove) +choke me +#else +remove(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +echo "configure:2033: checking for remove in -lposix" >&5 +ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +echo "configure:2076: checking for shmat" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shmat) || defined (__stub___shmat) +choke me +#else +shmat(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:2125: checking for shmat in -lipc" >&5 +ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lipc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 +echo "configure:2177: checking for IceConnectionNumber in -lICE" >&5 +ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + +fi + + + +if test "x$no_x" = x; then +HAS_X11=yes + if test "x$x_libraries" != x; then + X_LIB_PATH_L=-L${x_libraries}; + else + X_LIB_PATH_L= + fi +echo $ac_n "checking for XShmQueryExtension in -lXext""... $ac_c" 1>&6 +echo "configure:2230: checking for XShmQueryExtension in -lXext" >&5 +ac_lib_var=`echo Xext'_'XShmQueryExtension | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lXext ${X_LIB_PATH_L} $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X11_SHM_LIB=-lXext +else + echo "$ac_t""no" 1>&6 +X11_SHM_LIB= +fi + + +fi + + +ac_safe=`echo "glide.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for glide.h""... $ac_c" 1>&6 +echo "configure:2276: checking for glide.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + HAS_GLIDE=yes +else + echo "$ac_t""no" 1>&6 +HAS_GLIDE= +fi + + + +if test $ac_cv_prog_gcc = yes; then + echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 +echo "configure:2312: checking whether ${CC-cc} needs -traditional" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_pattern="Autoconf.*'x'" + cat > conftest.$ac_ext < +Autoconf TIOCGETP +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +else + rm -rf conftest* + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat > conftest.$ac_ext < +Autoconf TCGETA +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "$ac_pattern" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi + +echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + +echo $ac_n "checking for stricmp""... $ac_c" 1>&6 +echo "configure:2358: checking for stricmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_stricmp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char stricmp(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_stricmp) || defined (__stub___stricmp) +choke me +#else +stricmp(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_stricmp=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_stricmp=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'stricmp`\" = yes"; then + echo "$ac_t""yes" 1>&6 + STRICMP_DEF= +else + echo "$ac_t""no" 1>&6 +echo $ac_n "checking for strcasecmp""... $ac_c" 1>&6 +echo "configure:2404: checking for strcasecmp" >&5 +if eval "test \"`echo '$''{'ac_cv_func_strcasecmp'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strcasecmp(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) +choke me +#else +strcasecmp(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_strcasecmp=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_strcasecmp=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'strcasecmp`\" = yes"; then + echo "$ac_t""yes" 1>&6 + STRICMP_DEF=-Dstricmp=strcasecmp +else + echo "$ac_t""no" 1>&6 +fi + +fi + + + + +########################################################## +# +# Release (optimized) compiler settings (GCC only) +# +if test "x$RELEASE" = xyes; then +if test "x$GCC" = xyes; then +echo $ac_n "checking for special release compiler settings""... $ac_c" 1>&6 +echo "configure:2463: checking for special release compiler settings" >&5 +BASE_RELEASE_CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations" +case "${target}" in + i[34567]86-*-linux-gnu*) + case "${target_cpu}" in + i486) GCC_EMULATION="-m486" ;; + i586) GCC_EMULATION="-mpentium" ;; + i686) GCC_EMULATION="-mpentiumpro" ;; + esac + MORE_RELEASE_CFLAGS="${GCC_EMULATION} -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;; + *) MORE_RELEASE_CFLAGS="" ;; +esac +if test "x$MORE_RELEASE_CFLAGS" = x; then +RELEASE_CFLAGS=-O +echo "$ac_t""no - using standard flags" 1>&6 +RELEASE_CFLAGS=$BASE_RELEASE_CFLAGS +else +echo "$ac_t""yes" 1>&6 +RELEASE_CFLAGS="$BASE_RELEASE_CFLAGS $MORE_RELEASE_CFALGS" +fi +else +RELEASE_CFLAGS=-O2 +fi +fi + + +########################################################## +# +# is it an intel box? +# +echo $ac_n "checking for an Intel machine""... $ac_c" 1>&6 +echo "configure:2494: checking for an Intel machine" >&5 +case "${target}" in + i[34567]86-*-linux-gnu*) + INTEL_ARCH=yes + echo "$ac_t""yes" 1>&6 + ;; + *) echo "$ac_t""no" 1>&6 +esac + + +########################################################## +# +# CD audio available? +# +echo $ac_n "checking for CD audio support""... $ac_c" 1>&6 +echo "configure:2509: checking for CD audio support" >&5 +case "${target}" in + i[34567]86-*-linux-gnu*) + CD_AUDIO_SRC="cd_linux.c" ;; + *) + CD_AUDIO_SRC="cd_null.c" ;; +esac +if test "x$CD_AUDIO_SRC" = xcd_null.c; then +echo "$ac_t""no - using cd_null.c" 1>&6 +else +echo "$ac_t""yes - $CD_AUDIO_SRC" 1>&6 +fi + + +########################################################## +# +# Sound available? +# +echo $ac_n "checking for sound support""... $ac_c" 1>&6 +echo "configure:2528: checking for sound support" >&5 +case "${target}" in + i[34567]86-*-linux-gnu*) + SND_SRC="snd_dma.c snd_linux.c snd_mixa.s" ;; + *-solaris*) + SND_SRC="snd_dma.c snd_sun.c" ;; + *-sgi*) + SND_SRC="snd_null.c" ;; + *) + SND_SRC="snd_null.c" ;; +# XXX - need to add dos, Windows +esac +if test "x$SND_SRC" = xsnd_null.c; then +echo "$ac_t""no - using snd_null.c" 1>&6 +else +echo "$ac_t""yes - $SND_SRC" 1>&6 +fi + + +########################################################## +# +# System driver? +# +echo $ac_n "checking for system driver""... $ac_c" 1>&6 +echo "configure:2552: checking for system driver" >&5 +case "${target}" in + i[34567]86-*-linux-gnu*) + SYS_SRC="sys_linux.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + ;; + *-solaris*) + SYS_SRC="sys_sun.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + ;; + *) + SYS_SRC="sys_sun.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + DEFAULT_SYS=yes ;; +# XXX - windows - conproc.c sys_win.c +# XXX - dos - conproc.c(?) sys_dos.c +# XXX - need to add dos, Windows +esac +if test "x$DEFAULT_SYS" = xyes; then +echo "$ac_t""no - using default" 1>&6 +else +echo "$ac_t""yes - $SYS_SRC / $QW_SYS_SRC" 1>&6 +fi + + + + +########################################################## +# +# X11 video driver? +# +# If Solaris, use vid_sunx.c, +# otherwise (if X available) use vid_x.c +echo $ac_n "checking for X11 video driver""... $ac_c" 1>&6 +echo "configure:2589: checking for X11 video driver" >&5 +case "${target}" in + *-solaris*) + X11_VID_SRC="vid_sunx.c" ;; + *) + if test "x$HAS_X11"; then + X11_VID_SRC="vid_x.c"; + else + X11_VID_SRC= + fi + ;; +esac +if test "x$X11_VID_SRC" = x; then +echo "$ac_t""no" 1>&6 +else +echo "$ac_t""yes - $X11_VID_SRC" 1>&6 +fi + + +echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 +echo "configure:2609: checking for Cygwin environment" >&5 +if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_cygwin=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_cygwin=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_cygwin" 1>&6 +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes +echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 +echo "configure:2642: checking for mingw32 environment" >&5 +if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_mingw32=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_mingw32=no +fi +rm -f conftest* +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_mingw32" 1>&6 +MINGW32= +test "$ac_cv_mingw32" = yes && MINGW32=yes + + +echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 +echo "configure:2673: checking for executable suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$CYGWIN" = yes || test "$MINGW32" = yes; then + ac_cv_exeext=.exe +else + rm -f conftest* + echo 'int main () { return 0; }' > conftest.$ac_ext + ac_cv_exeext= + if { (eval echo configure:2683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + for file in conftest.*; do + case $file in + *.c | *.o | *.obj) ;; + *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;; + esac + done + else + { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; } + fi + rm -f conftest* + test x"${ac_cv_exeext}" = x && ac_cv_exeext=no +fi +fi + +EXEEXT="" +test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext} +echo "$ac_t""${ac_cv_exeext}" 1>&6 +ac_exeext=$EXEEXT + +echo $ac_n "checking for object suffix""... $ac_c" 1>&6 +echo "configure:2704: checking for object suffix" >&5 +if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + rm -f conftest* +echo 'int i = 1;' > conftest.$ac_ext +if { (eval echo configure:2710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + for ac_file in conftest.*; do + case $ac_file in + *.c) ;; + *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;; + esac + done +else + { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; } +fi +rm -f conftest* +fi + +echo "$ac_t""$ac_cv_objext" 1>&6 +OBJEXT=$ac_cv_objext +ac_objext=$ac_cv_objext + +if test "$no_x" = yes; then + # Not all programs may use this symbol, but it does not hurt to define it. + cat >> confdefs.h <<\EOF +#define X_DISPLAY_MISSING 1 +EOF + + X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= +else + if test -n "$x_includes"; then + X_CFLAGS="$X_CFLAGS -I$x_includes" + fi + + # It would also be nice to do this for all -L options, not just this one. + if test -n "$x_libraries"; then + X_LIBS="$X_LIBS -L$x_libraries" + # For Solaris; some versions of Sun CC require a space after -R and + # others require no space. Words are not sufficient . . . . + case "`(uname -sr) 2>/dev/null`" in + "SunOS 5"*) + echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 +echo "configure:2747: checking whether -R must be followed by a space" >&5 + ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_nospace=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_nospace=no +fi +rm -f conftest* + if test $ac_R_nospace = yes; then + echo "$ac_t""no" 1>&6 + X_LIBS="$X_LIBS -R$x_libraries" + else + LIBS="$ac_xsave_LIBS -R $x_libraries" + cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + ac_R_space=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_R_space=no +fi +rm -f conftest* + if test $ac_R_space = yes; then + echo "$ac_t""yes" 1>&6 + X_LIBS="$X_LIBS -R $x_libraries" + else + echo "$ac_t""neither works" 1>&6 + fi + fi + LIBS="$ac_xsave_LIBS" + esac + fi + + # Check for system-dependent libraries X programs must link with. + # Do this before checking for the system-independent R6 libraries + # (-lICE), since we may need -lsocket or whatever for X linking. + + if test "$ISC" = yes; then + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" + else + # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X + # libraries were built with DECnet support. And karl@cs.umb.edu says + # the Alpha needs dnet_stub (dnet does not exist). + echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 +echo "configure:2812: checking for dnet_ntoa in -ldnet" >&5 +ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_lib_dnet_dnet_ntoa = no; then + echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 +echo "configure:2853: checking for dnet_ntoa in -ldnet_stub" >&5 +ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldnet_stub $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, + # to get the SysV transport functions. + # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4) + # needs -lnsl. + # The nsl library prevents programs from opening the X display + # on Irix 5.2, according to dickey@clark.net. + echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 +echo "configure:2901: checking for gethostbyname" >&5 +if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +gethostbyname(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_gethostbyname=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_gethostbyname=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_gethostbyname = no; then + echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 +echo "configure:2950: checking for gethostbyname in -lnsl" >&5 +ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lnsl $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # lieder@skyler.mavd.honeywell.com says without -lsocket, + # socket/setsockopt and other routines are undefined under SCO ODT + # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary + # on later versions), says simon@lia.di.epfl.ch: it contains + # gethostby* variants that don't use the nameserver (or something). + # -lsocket must be given before -lnsl if both are needed. + # We assume that if connect needs -lnsl, so does gethostbyname. + echo $ac_n "checking for connect""... $ac_c" 1>&6 +echo "configure:2999: checking for connect" >&5 +if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +connect(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_connect=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_connect=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_connect = no; then + echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 +echo "configure:3048: checking for connect in -lsocket" >&5 +ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lsocket $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. + echo $ac_n "checking for remove""... $ac_c" 1>&6 +echo "configure:3091: checking for remove" >&5 +if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char remove(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_remove) || defined (__stub___remove) +choke me +#else +remove(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_remove=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_remove=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_remove = no; then + echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 +echo "configure:3140: checking for remove in -lposix" >&5 +ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lposix $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" +else + echo "$ac_t""no" 1>&6 +fi + + fi + + # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. + echo $ac_n "checking for shmat""... $ac_c" 1>&6 +echo "configure:3183: checking for shmat" >&5 +if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shmat(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shmat) || defined (__stub___shmat) +choke me +#else +shmat(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_shmat=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_shmat=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + + if test $ac_cv_func_shmat = no; then + echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 +echo "configure:3232: checking for shmat in -lipc" >&5 +ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lipc $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" +else + echo "$ac_t""no" 1>&6 +fi + + fi + fi + + # Check for libraries that X11R6 Xt/Xaw programs need. + ac_save_LDFLAGS="$LDFLAGS" + test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" + # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to + # check for ICE first), but we must link in the order -lSM -lICE or + # we get undefined symbols. So assume we have SM if we have ICE. + # These have to be linked with before -lX11, unlike the other + # libraries we check for below, so use a different variable. + # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. + echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 +echo "configure:3284: checking for IceConnectionNumber in -lICE" >&5 +ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lICE $X_EXTRA_LIBS $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" +else + echo "$ac_t""no" 1>&6 +fi + + LDFLAGS="$ac_save_LDFLAGS" + +fi + + +########################################################## +# +# make Makefile.header, Makefile.tail +# + + +MAKEFILE_HEADER=pre + + +MAKEFILE_TAIL=post + + +CLIENT_TARGETS=client + + +SRCFILES=srcfiles + + +COMP_RULES=rules + +########################################################## +# +# Output files +# +trap '' 1 2 15 +cat > confcache <<\EOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +(set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache +if cmp -s $cache_file confcache; then + : +else + if test -w $cache_file; then + echo "updating cache $cache_file" + cat confcache > $cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +cat > conftest.defs <<\EOF +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g +s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g +s%\[%\\&%g +s%\]%\\&%g +s%\$%$$%g +EOF +DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` +rm -f conftest.defs + + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "pre post client srcfiles rules + qw_client/Makefile qw_server/Makefile uquake/Makefile Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@SHELL@%$SHELL%g +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@host@%$host%g +s%@host_alias@%$host_alias%g +s%@host_cpu@%$host_cpu%g +s%@host_vendor@%$host_vendor%g +s%@host_os@%$host_os%g +s%@target@%$target%g +s%@target_alias@%$target_alias%g +s%@target_cpu@%$target_cpu%g +s%@target_vendor@%$target_vendor%g +s%@target_os@%$target_os%g +s%@build@%$build%g +s%@build_alias@%$build_alias%g +s%@build_cpu@%$build_cpu%g +s%@build_vendor@%$build_vendor%g +s%@build_os@%$build_os%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@SET_MAKE@%$SET_MAKE%g +s%@RELEASE@%$RELEASE%g +s%@OGL_LDFLAGS@%$OGL_LDFLAGS%g +s%@OGL_CFLAGS@%$OGL_CFLAGS%g +s%@HAS_OGL@%$HAS_OGL%g +s%@HAS_VGA@%$HAS_VGA%g +s%@HAS_XIL@%$HAS_XIL%g +s%@X_CFLAGS@%$X_CFLAGS%g +s%@X_PRE_LIBS@%$X_PRE_LIBS%g +s%@X_LIBS@%$X_LIBS%g +s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g +s%@x_libraries@%$x_libraries%g +s%@X11_SHM_LIB@%$X11_SHM_LIB%g +s%@HAS_X11@%$HAS_X11%g +s%@HAS_GLIDE@%$HAS_GLIDE%g +s%@STRICMP_DEF@%$STRICMP_DEF%g +s%@RELEASE_CFLAGS@%$RELEASE_CFLAGS%g +s%@INTEL_ARCH@%$INTEL_ARCH%g +s%@CD_AUDIO_SRC@%$CD_AUDIO_SRC%g +s%@SND_SRC@%$SND_SRC%g +s%@SYS_SRC@%$SYS_SRC%g +s%@QW_CL_SYS_SRC@%$QW_CL_SYS_SRC%g +s%@QW_SRV_SYS_SRC@%$QW_SRV_SYS_SRC%g +s%@X11_VID_SRC@%$X11_VID_SRC%g +s%@EXEEXT@%$EXEEXT%g +s%@OBJEXT@%$OBJEXT%g +/@MAKEFILE_HEADER@/r $MAKEFILE_HEADER +s%@MAKEFILE_HEADER@%%g +/@MAKEFILE_TAIL@/r $MAKEFILE_TAIL +s%@MAKEFILE_TAIL@%%g +/@CLIENT_TARGETS@/r $CLIENT_TARGETS +s%@CLIENT_TARGETS@%%g +/@SRCFILES@/r $SRCFILES +s%@SRCFILES@%%g +/@COMP_RULES@/r $COMP_RULES +s%@COMP_RULES@%%g + +CEOF +EOF + +cat >> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..ff80972 --- /dev/null +++ b/configure.in @@ -0,0 +1,324 @@ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(common/crc.h) +AC_CANONICAL_SYSTEM +AC_LANG_C + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_MAKE_SET + +dnl checks for compiler characteristics +AC_C_BIGENDIAN + +AC_ARG_WITH(optimize, +[ --with-optimize Compile with optimization], + RELEASE=$with_optimize +) + +AC_ARG_ENABLE(release, +[ --enable-release Compile release (with optimization)], + RELEASE=$enable_release +) +AC_SUBST(RELEASE) + +dnl Checks for OGL support +AC_ARG_ENABLE(OpenGLLIB, +[ --enable-OpenGLLIB=ARG Use OpenGL - the libraries are in ARG], +[HAS_OGL_LIB=yes; OGL_LIB_PATH=$enable_OpenGLLIB; + OGL_LDFLAGS=-L$enable_OpenGLLIB]) +AC_SUBST(OGL_LDFLAGS) + +AC_ARG_ENABLE(OpenGLINC, +[ --enable-OpenGLINC=ARG Use OpenGL - the include files are in ARG], +HAS_OGL_INC=yes; OGL_INC_PATH=$enable_OpenGLINC; OGL_CFLAGS=-I$enable_OpenGLINC) +AC_SUBST(OGL_CFLAGS) + +if test "x$HAS_OGL_LIB" = x; then +AC_CHECK_LIB(GL, glColor4f, [HAS_OGL_LIB=yes], + AC_CHECK_LIB(MesaGL, glColor4f, [HAS_OGL_LIB=yes], + if test "x$HAS_OGL_INC" != x; then + POSS_OGL_LDFLAGS=`echo $enable_OpenGLINC| sed 's/include/lib/i'`; + AC_MSG_CHECKING(for $POSS_OGL_LDFLAGS/libGL.so) + if test -f "$POSS_OGL_LDFLAGS"/libGL.so; then + AC_MSG_RESULT(yes) + HAS_OGL_LIB=yes + OGL_LDFLAGS=-L$POSS_OGL_LDFLAGS + OGL_LIB_PATH=$POSS_OGL_LDFLAGS + else + AC_MSG_RESULT(no) + fi + fi + ) +) +dnl Need to be able to check /usr/X11R6/lib... +fi + +if test "x$HAS_OGL_INC" = x; then + AC_CHECK_HEADER(GL/gl.h, [HAS_OGL_INC=yes], + if test "x$HAS_OGL_LIB" != x; then + POSS_OGL_CFLAGS=`echo $enable_OpenGLLIB| sed 's/lib/include/i'`; + AC_MSG_CHECKING(for $POSS_OGL_CFLAGS/GL/gl.h) + if test -f "$POSS_OGL_CFLAGS/GL/gl.h"; then + HAS_OGL_INC=yes + OGL_CFLAGS=-I$POSS_OGL_CFLAGS + OGL_INC_PATH=$POSS_OGL_CFLAGS + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi + fi + ) +fi + +AC_MSG_CHECKING(for OpenGL support) +if test "x$HAS_OGL_INC" != x; then + if test "x$HAS_OGL_LIB" != x; then + HAS_OGL=yes + AC_MSG_RESULT([yes, include ($OGL_CFLAGS), lib ($OGL_LDFLAGS)]) + if test "x$OGL_LDFLAGS" = x-L; then + AC_MSG_ERROR(OpenGL LDFLAGS is -L with no directory) + fi + AC_MSG_CHECKING(for GL_COLOR_INDEX8_EXT) + if test "x$OGL_INC_PATH" = x; then + OGL_INC_PATH_TO_GL="$OGL_INC_PATH/GL/gl.h" + else + OGL_INC_PATH_TO_GL="GL/gl.h" + fi + AC_TRY_COMPILE([#include "$OGL_INC_PATH_TO_GL"], + [ int x = (int) GL_COLOR_INDEX8_EXT;], + HAS_GL_COLOR_INDEX8_EXT=yes, + HAS_GL_COLOR_INDEX8_EXT=no) + if test "x$HAS_GL_COLOR_INDEX8_EXT" != xno; then + cat >> confdefs.h <<\EOF +#define HAS_GL_COLOR_INDEX8_EXT 1 +EOF + fi + + else + AC_MSG_RESULT(no) + fi + else + AC_MSG_RESULT(no) +fi +AC_SUBST(HAS_OGL) + +dnl Check for other libraries +AC_CHECK_LIB(vga, vga_getmousetype, [HAS_VGA=yes], [HAS_VGA=]) +AC_SUBST(HAS_VGA) +AC_CHECK_LIB(xil,xil_import, [HAS_XIL=yes], [HAS_XIL=]) +AC_SUBST(HAS_XIL) +AC_PATH_XTRA + +AC_SUBST(x_libraries) +if test "x$no_x" = x; then +HAS_X11=yes + if test "x$x_libraries" != x; then + X_LIB_PATH_L=-L${x_libraries}; + else + X_LIB_PATH_L= + fi +AC_CHECK_LIB(Xext, XShmQueryExtension, [X11_SHM_LIB=-lXext], [X11_SHM_LIB=], ${X_LIB_PATH_L}) +AC_SUBST(X11_SHM_LIB) +fi +AC_SUBST(HAS_X11) + +dnl Checks for header files. +AC_CHECK_HEADER(glide.h, [HAS_GLIDE=yes], [HAS_GLIDE=]) +AC_SUBST(HAS_GLIDE) + +dnl Checks for library functions. +AC_PROG_GCC_TRADITIONAL +AC_CHECK_FUNC(stricmp, + [STRICMP_DEF=], + AC_CHECK_FUNC(strcasecmp, [STRICMP_DEF=-Dstricmp=strcasecmp])) +AC_SUBST(STRICMP_DEF) + + +########################################################## +# +# Release (optimized) compiler settings (GCC only) +# +if test "x$RELEASE" = xyes; then +if test "x$GCC" = xyes; then +AC_MSG_CHECKING(for special release compiler settings) +BASE_RELEASE_CFLAGS="-O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations" +case "${target}" in +changequote(,)dnl + i[34567]86-*-linux-gnu*) +changequote([,])dnl + case "${target_cpu}" in + i486) GCC_EMULATION="-m486" ;; + i586) GCC_EMULATION="-mpentium" ;; + i686) GCC_EMULATION="-mpentiumpro" ;; + esac + MORE_RELEASE_CFLAGS="${GCC_EMULATION} -malign-loops=2 -malign-jumps=2 -malign-functions=2" ;; + *) MORE_RELEASE_CFLAGS="" ;; +esac +if test "x$MORE_RELEASE_CFLAGS" = x; then +RELEASE_CFLAGS=-O +AC_MSG_RESULT([no - using standard flags]) +RELEASE_CFLAGS=$BASE_RELEASE_CFLAGS +else +AC_MSG_RESULT(yes) +RELEASE_CFLAGS="$BASE_RELEASE_CFLAGS $MORE_RELEASE_CFALGS" +fi +else +RELEASE_CFLAGS=-O2 +fi +fi +AC_SUBST(RELEASE_CFLAGS) + +########################################################## +# +# is it an intel box? +# +AC_MSG_CHECKING(for an Intel machine) +case "${target}" in +changequote(,)dnl + i[34567]86-*-linux-gnu*) +changequote([,])dnl + INTEL_ARCH=yes + AC_MSG_RESULT(yes) + ;; + *) AC_MSG_RESULT(no) +esac +AC_SUBST(INTEL_ARCH) + +########################################################## +# +# CD audio available? +# +AC_MSG_CHECKING(for CD audio support) +case "${target}" in +changequote(,)dnl + i[34567]86-*-linux-gnu*) +changequote([,])dnl + CD_AUDIO_SRC="cd_linux.c" ;; + *) + CD_AUDIO_SRC="cd_null.c" ;; +esac +if test "x$CD_AUDIO_SRC" = xcd_null.c; then +AC_MSG_RESULT(no - using cd_null.c) +else +AC_MSG_RESULT(yes - $CD_AUDIO_SRC) +fi +AC_SUBST(CD_AUDIO_SRC) + +########################################################## +# +# Sound available? +# +AC_MSG_CHECKING(for sound support) +case "${target}" in +changequote(,)dnl + i[34567]86-*-linux-gnu*) +changequote([,])dnl + SND_SRC="snd_dma.c snd_linux.c snd_mixa.s" ;; + *-solaris*) + SND_SRC="snd_dma.c snd_sun.c" ;; + *-sgi*) + SND_SRC="snd_null.c" ;; + *) + SND_SRC="snd_null.c" ;; +# XXX - need to add dos, Windows +esac +if test "x$SND_SRC" = xsnd_null.c; then +AC_MSG_RESULT(no - using snd_null.c) +else +AC_MSG_RESULT(yes - $SND_SRC) +fi +AC_SUBST(SND_SRC) + +########################################################## +# +# System driver? +# +AC_MSG_CHECKING(for system driver) +case "${target}" in +changequote(,)dnl + i[34567]86-*-linux-gnu*) +changequote([,])dnl + SYS_SRC="sys_linux.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + ;; + *-solaris*) + SYS_SRC="sys_sun.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + ;; + *) + SYS_SRC="sys_sun.c" + QW_CL_SYS_SRC="sys_linux.c" + QW_SRV_SYS_SRC="sys_unix.c" + DEFAULT_SYS=yes ;; +# XXX - windows - conproc.c sys_win.c +# XXX - dos - conproc.c(?) sys_dos.c +# XXX - need to add dos, Windows +esac +if test "x$DEFAULT_SYS" = xyes; then +AC_MSG_RESULT(no - using default) +else +AC_MSG_RESULT(yes - $SYS_SRC / $QW_SYS_SRC) +fi +AC_SUBST(SYS_SRC) +AC_SUBST(QW_CL_SYS_SRC) +AC_SUBST(QW_SRV_SYS_SRC) + +########################################################## +# +# X11 video driver? +# +# If Solaris, use vid_sunx.c, +# otherwise (if X available) use vid_x.c +AC_MSG_CHECKING(for X11 video driver) +case "${target}" in + *-solaris*) + X11_VID_SRC="vid_sunx.c" ;; + *) + if test "x$HAS_X11"; then + X11_VID_SRC="vid_x.c"; + else + X11_VID_SRC= + fi + ;; +esac +if test "x$X11_VID_SRC" = x; then +AC_MSG_RESULT(no) +else +AC_MSG_RESULT(yes - $X11_VID_SRC) +fi +AC_SUBST(X11_VID_SRC) + +dnl Check for system services +AC_EXEEXT +AC_OBJEXT +AC_PATH_XTRA + +########################################################## +# +# make Makefile.header, Makefile.tail +# + +AC_SUBST_FILE(MAKEFILE_HEADER) +MAKEFILE_HEADER=pre + +AC_SUBST_FILE(MAKEFILE_TAIL) +MAKEFILE_TAIL=post + +AC_SUBST_FILE(CLIENT_TARGETS) +CLIENT_TARGETS=client + +AC_SUBST_FILE(SRCFILES) +SRCFILES=srcfiles + +AC_SUBST_FILE(COMP_RULES) +COMP_RULES=rules + +########################################################## +# +# Output files +# +AC_OUTPUT(pre post client srcfiles rules + qw_client/Makefile qw_server/Makefile uquake/Makefile Makefile) diff --git a/install-sh b/install-sh new file mode 100755 index 0000000..e9de238 --- /dev/null +++ b/install-sh @@ -0,0 +1,251 @@ +#!/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 diff --git a/post.in b/post.in new file mode 100644 index 0000000..3586897 --- /dev/null +++ b/post.in @@ -0,0 +1,14 @@ +########################################################################### +# +# cleaning (clean, distclean) +# +distclean: clean + rm -f config.cache config.log config.status Makefile + +clean: $(CLEAN_TARGETS) + +install: + @echo Install not implemented + +check: + @echo check not implemented diff --git a/pre.in b/pre.in new file mode 100644 index 0000000..05b0fdd --- /dev/null +++ b/pre.in @@ -0,0 +1,30 @@ +COMMON_DIR=$(PROJECT_DIR)/common +ifeq ($(BUILD_DIR),) +BUILD_DIR = . +endif + +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +CC = @CC@ +INTEL_ARCH = @INTEL_ARCH@ + +ifneq ($(SRC_DIR),.) +SRC_DIR_INC = -I$(SRC_DIR) +endif + +HAS_VGA = @HAS_VGA@ +HAS_GLIDE= @HAS_GLIDE@ +HAS_OGL = @HAS_OGL@ +HAS_XIL = @HAS_XIL@ +HAS_X11 = @HAS_X11@ + +MAKE_SURE_DIR = if test -d "$(BUILD_DIR)/$$DIR"; \ + then \ + true; \ + else \ + echo "Creating directory $(BUILD_DIR)/$$DIR"; \ + mkdir -p $(BUILD_DIR)/$$DIR; \ + fi +MAKE_SURE_bin_DIR = @DIR=bin; \ + $(MAKE_SURE_DIR) + diff --git a/qw_client/Makefile b/qw_client/Makefile deleted file mode 100644 index 070bc13..0000000 --- a/qw_client/Makefile +++ /dev/null @@ -1,679 +0,0 @@ -# -# QuakeWorld client makefile for unified tree -# - -VERSION=2.40 - -ifneq (,$(findstring alpha,$(shell uname -m))) -ARCH=axp -else -ARCH=$(shell uname -m | sed s/i.86/i386/) -endif - -PROJECT_DIR=.. - -COMMON_DIR=$(PROJECT_DIR)/common -QW_COMMON_DIR=$(PROJECT_DIR)/qw_common -CLIENT_DIR=$(PROJECT_DIR)/qw_client -SERVER_DIR=$(PROJECT_DIR)/qw_server - -BUILD_DIR=$(PROJECT_DIR)/build - -X11_DIR=/usr/X11R6 - -INCL=-I. -I$(CLIENT_DIR) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I$(X11_DIR)/include - -CC=gcc - -BASE_CFLAGS=-Wall -DQUAKEWORLD -Dstricmp=strcasecmp $(INCL) -DEBUG_CFLAGS=$(BASE_CFLAGS) -g - -ifeq ($(ARCH),i386) -RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ - -malign-jumps=2 -malign-functions=2 -else -RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -endif -GL_CFLAGS=-DGLQUAKE -I$(X11_DIR)/include -I/usr/include/glide - -LDFLAGS=-lm -SVGA_LDFLAGS=$(LDFLAGS) -lvga -X11_LDFLAGS=-L$(X11_DIR)/lib $(LDFLAGS) -lX11 -lXext -GL_X11_LDFLAGS=-L$(X11_DIR)/lib $(LDFLAGS) -lGL -lX11 -lXext -GL_SVGA_LDFLAGS=-L$(X11_DIR)/lib -lvga -lGL -lglide2x -lX11 -lXext - -DO_CC=$(CC) $(CFLAGS) -o $@ -c $< -DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< - -DO_GL_CC=$(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $< -DO_GL_AS=$(CC) $(CFLAGS) $(GL_CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< - -DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $< - -############################################################################# -# SETUP AND BUILD -############################################################################# - -SOFT_TARGETS=$(BUILD_DIR)/qw-client-svga \ - $(BUILD_DIR)/qw-client-x11 -GL_TARGETS=$(BUILD_DIR)/qw-client-gl \ - $(BUILD_DIR)/qw-client-glide - -debug: debug-soft debug-gl - -release: release-soft release-gl - -all: debug-soft debug-gl release-soft release-gl - -debug-soft: $(BUILD_DIR) $(BUILD_DIR)/soft_qw_obj $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) $(SOFT_X11_OBJS) - - $(MAKE) soft-targets CFLAGS="$(DEBUG_CFLAGS)" - -debug-gl: $(BUILD_DIR) $(BUILD_DIR)/gl_qw_obj $(GL_OBJS) $(GL_AS_OBJS) $(GL_SVGA_OBJS) $(GL_X11_OBJS) - - $(MAKE) gl-targets CFLAGS="$(DEBUG_CFLAGS)" - -release-soft: $(BUILD_DIR) $(BUILD_DIR)/soft_qw_obj $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) $(SOFT_X11_OBJS) - - $(MAKE) soft-targets CFLAGS="$(RELEASE_CFLAGS)" - -release-gl: $(BUILD_DIR) $(BUILD_DIR)/gl_qw_obj $(GL_OBJS) $(GL_AS_OBJS) $(GL_SVGA_OBJS) $(GL_X11_OBJS) - - $(MAKE) gl-targets CFLAGS="$(RELEASE_CFLAGS)" - -soft-targets: $(SOFT_TARGETS) -gl-targets: $(GL_TARGETS) - -$(BUILD_DIR): - @mkdir $(BUILD_DIR) - -$(BUILD_DIR)/soft_qw_obj: - @mkdir $(BUILD_DIR)/soft_qw_obj - -$(BUILD_DIR)/gl_qw_obj: - @mkdir $(BUILD_DIR)/gl_qw_obj - -############################################################################# -# CLIENT -############################################################################# - -SOFT_OBJS = \ - $(BUILD_DIR)/soft_qw_obj/cl_demo.o \ - $(BUILD_DIR)/soft_qw_obj/cl_ents.o \ - $(BUILD_DIR)/soft_qw_obj/cl_input.o \ - $(BUILD_DIR)/soft_qw_obj/cl_main.o \ - $(BUILD_DIR)/soft_qw_obj/cl_parse.o \ - $(BUILD_DIR)/soft_qw_obj/cl_pred.o \ - $(BUILD_DIR)/soft_qw_obj/cl_tent.o \ - $(BUILD_DIR)/soft_qw_obj/cl_cam.o \ - $(BUILD_DIR)/soft_qw_obj/cmd.o \ - $(BUILD_DIR)/soft_qw_obj/common.o \ - $(BUILD_DIR)/soft_qw_obj/console.o \ - $(BUILD_DIR)/soft_qw_obj/crc.o \ - $(BUILD_DIR)/soft_qw_obj/cvar.o \ - $(BUILD_DIR)/soft_qw_obj/d_edge.o \ - $(BUILD_DIR)/soft_qw_obj/d_fill.o \ - $(BUILD_DIR)/soft_qw_obj/d_init.o \ - $(BUILD_DIR)/soft_qw_obj/d_modech.o \ - $(BUILD_DIR)/soft_qw_obj/d_part.o \ - $(BUILD_DIR)/soft_qw_obj/d_polyse.o \ - $(BUILD_DIR)/soft_qw_obj/d_scan.o \ - $(BUILD_DIR)/soft_qw_obj/d_sky.o \ - $(BUILD_DIR)/soft_qw_obj/d_sprite.o \ - $(BUILD_DIR)/soft_qw_obj/d_surf.o \ - $(BUILD_DIR)/soft_qw_obj/d_vars.o \ - $(BUILD_DIR)/soft_qw_obj/d_zpoint.o \ - $(BUILD_DIR)/soft_qw_obj/draw.o \ - $(BUILD_DIR)/soft_qw_obj/keys.o \ - $(BUILD_DIR)/soft_qw_obj/mathlib.o \ - $(BUILD_DIR)/soft_qw_obj/md4.o \ - $(BUILD_DIR)/soft_qw_obj/menu.o \ - $(BUILD_DIR)/soft_qw_obj/model.o \ - $(BUILD_DIR)/soft_qw_obj/net_chan.o \ - $(BUILD_DIR)/soft_qw_obj/net_udp.o \ - $(BUILD_DIR)/soft_qw_obj/nonintel.o \ - $(BUILD_DIR)/soft_qw_obj/pmove.o \ - $(BUILD_DIR)/soft_qw_obj/pmovetst.o \ - $(BUILD_DIR)/soft_qw_obj/r_aclip.o \ - $(BUILD_DIR)/soft_qw_obj/r_alias.o \ - $(BUILD_DIR)/soft_qw_obj/r_bsp.o \ - $(BUILD_DIR)/soft_qw_obj/r_draw.o \ - $(BUILD_DIR)/soft_qw_obj/r_edge.o \ - $(BUILD_DIR)/soft_qw_obj/r_efrag.o \ - $(BUILD_DIR)/soft_qw_obj/r_light.o \ - $(BUILD_DIR)/soft_qw_obj/r_main.o \ - $(BUILD_DIR)/soft_qw_obj/r_misc.o \ - $(BUILD_DIR)/soft_qw_obj/r_part.o \ - $(BUILD_DIR)/soft_qw_obj/r_sky.o \ - $(BUILD_DIR)/soft_qw_obj/r_sprite.o \ - $(BUILD_DIR)/soft_qw_obj/r_surf.o \ - $(BUILD_DIR)/soft_qw_obj/r_vars.o \ - $(BUILD_DIR)/soft_qw_obj/sbar.o \ - $(BUILD_DIR)/soft_qw_obj/screen.o \ - $(BUILD_DIR)/soft_qw_obj/skin.o \ - $(BUILD_DIR)/soft_qw_obj/snd_dma.o \ - $(BUILD_DIR)/soft_qw_obj/snd_mem.o \ - $(BUILD_DIR)/soft_qw_obj/snd_mix.o \ - $(BUILD_DIR)/soft_qw_obj/view.o \ - $(BUILD_DIR)/soft_qw_obj/wad.o \ - $(BUILD_DIR)/soft_qw_obj/zone.o \ - $(BUILD_DIR)/soft_qw_obj/cd_linux.o \ - $(BUILD_DIR)/soft_qw_obj/sys_linux.o \ - $(BUILD_DIR)/soft_qw_obj/snd_linux.o \ - -ifeq ($(ARCH),i386) -SOFT_AS_OBJS = \ - $(BUILD_DIR)/soft_qw_obj/d_copy.o \ - $(BUILD_DIR)/soft_qw_obj/d_draw.o \ - $(BUILD_DIR)/soft_qw_obj/d_draw16.o \ - $(BUILD_DIR)/soft_qw_obj/d_parta.o \ - $(BUILD_DIR)/soft_qw_obj/d_polysa.o \ - $(BUILD_DIR)/soft_qw_obj/d_scana.o \ - $(BUILD_DIR)/soft_qw_obj/d_spr8.o \ - $(BUILD_DIR)/soft_qw_obj/d_varsa.o \ - $(BUILD_DIR)/soft_qw_obj/math.o \ - $(BUILD_DIR)/soft_qw_obj/r_aclipa.o \ - $(BUILD_DIR)/soft_qw_obj/r_aliasa.o \ - $(BUILD_DIR)/soft_qw_obj/r_drawa.o \ - $(BUILD_DIR)/soft_qw_obj/r_edgea.o \ - $(BUILD_DIR)/soft_qw_obj/r_varsa.o \ - $(BUILD_DIR)/soft_qw_obj/snd_mixa.o \ - $(BUILD_DIR)/soft_qw_obj/surf16.o \ - $(BUILD_DIR)/soft_qw_obj/surf8.o \ - $(BUILD_DIR)/soft_qw_obj/sys_dosa.o -else -SOFT_AS_OBJS= -endif - -SOFT_SVGA_OBJS = $(BUILD_DIR)/soft_qw_obj/vid_svgalib.o -SOFT_X11_OBJS = $(BUILD_DIR)/soft_qw_obj/vid_x.o - -$(BUILD_DIR)/qw-client-svga: $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) - $(CC) $(CFLAGS) -o $@ $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) \ - $(SVGA_LDFLAGS) - -$(BUILD_DIR)/qw-client-x11: $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_X11_OBJS) - $(CC) $(CFLAGS) -o $@ $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_X11_OBJS) \ - $(X11_LDFLAGS) - -$(BUILD_DIR)/soft_qw_obj/cl_demo.o: $(CLIENT_DIR)/cl_demo.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_ents.o: $(CLIENT_DIR)/cl_ents.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_input.o: $(CLIENT_DIR)/cl_input.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_main.o: $(CLIENT_DIR)/cl_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_parse.o: $(CLIENT_DIR)/cl_parse.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_pred.o: $(CLIENT_DIR)/cl_pred.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_tent.o: $(CLIENT_DIR)/cl_tent.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cl_cam.o: $(CLIENT_DIR)/cl_cam.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_edge.o: $(CLIENT_DIR)/d_edge.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_fill.o: $(CLIENT_DIR)/d_fill.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_init.o: $(CLIENT_DIR)/d_init.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_modech.o: $(CLIENT_DIR)/d_modech.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_part.o: $(CLIENT_DIR)/d_part.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_polyse.o: $(CLIENT_DIR)/d_polyse.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_scan.o: $(CLIENT_DIR)/d_scan.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_sky.o: $(CLIENT_DIR)/d_sky.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_sprite.o: $(CLIENT_DIR)/d_sprite.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_surf.o: $(CLIENT_DIR)/d_surf.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_vars.o: $(CLIENT_DIR)/d_vars.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/d_zpoint.o: $(CLIENT_DIR)/d_zpoint.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/draw.o: $(CLIENT_DIR)/draw.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/keys.o: $(CLIENT_DIR)/keys.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/menu.o: $(CLIENT_DIR)/menu.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/model.o: $(CLIENT_DIR)/model.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/nonintel.o: $(CLIENT_DIR)/nonintel.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_aclip.o: $(CLIENT_DIR)/r_aclip.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_alias.o: $(CLIENT_DIR)/r_alias.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_bsp.o: $(CLIENT_DIR)/r_bsp.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_draw.o: $(CLIENT_DIR)/r_draw.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_edge.o: $(CLIENT_DIR)/r_edge.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_efrag.o: $(CLIENT_DIR)/r_efrag.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_light.o: $(CLIENT_DIR)/r_light.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_main.o: $(CLIENT_DIR)/r_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_misc.o: $(CLIENT_DIR)/r_misc.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_part.o: $(CLIENT_DIR)/r_part.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_sky.o: $(CLIENT_DIR)/r_sky.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_sprite.o: $(CLIENT_DIR)/r_sprite.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_surf.o: $(CLIENT_DIR)/r_surf.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/r_vars.o: $(CLIENT_DIR)/r_vars.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/sbar.o: $(CLIENT_DIR)/sbar.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/screen.o: $(CLIENT_DIR)/screen.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/skin.o: $(CLIENT_DIR)/skin.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/view.o: $(CLIENT_DIR)/view.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/sys_linux.o: $(CLIENT_DIR)/sys_linux.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cmd.o: $(QW_COMMON_DIR)/cmd.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/common.o: $(QW_COMMON_DIR)/common.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/console.o: $(QW_COMMON_DIR)/console.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cvar.o: $(QW_COMMON_DIR)/cvar.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/md4.o: $(QW_COMMON_DIR)/md4.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/net_chan.o: $(QW_COMMON_DIR)/net_chan.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/net_udp.o: $(QW_COMMON_DIR)/net_udp.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/pmove.o: $(QW_COMMON_DIR)/pmove.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/pmovetst.o: $(QW_COMMON_DIR)/pmovetst.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/crc.o: $(COMMON_DIR)/crc.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/mathlib.o: $(COMMON_DIR)/mathlib.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/snd_dma.o: $(COMMON_DIR)/snd_dma.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/snd_mem.o: $(COMMON_DIR)/snd_mem.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/snd_mix.o: $(COMMON_DIR)/snd_mix.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/wad.o: $(COMMON_DIR)/wad.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/zone.o: $(COMMON_DIR)/zone.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/cd_linux.o: $(COMMON_DIR)/cd_linux.c - $(DO_CC) - -$(BUILD_DIR)/soft_qw_obj/snd_linux.o: $(COMMON_DIR)/snd_linux.c - $(DO_CC) - -# Assembler code - -$(BUILD_DIR)/soft_qw_obj/d_copy.o: $(CLIENT_DIR)/d_copy.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_draw.o: $(CLIENT_DIR)/d_draw.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_draw16.o: $(CLIENT_DIR)/d_draw16.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_parta.o: $(CLIENT_DIR)/d_parta.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_polysa.o: $(CLIENT_DIR)/d_polysa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_scana.o: $(CLIENT_DIR)/d_scana.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_spr8.o: $(CLIENT_DIR)/d_spr8.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/d_varsa.o: $(CLIENT_DIR)/d_varsa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/r_aclipa.o: $(CLIENT_DIR)/r_aclipa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/r_aliasa.o: $(CLIENT_DIR)/r_aliasa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/r_drawa.o: $(CLIENT_DIR)/r_drawa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/r_edgea.o: $(CLIENT_DIR)/r_edgea.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/r_varsa.o: $(CLIENT_DIR)/r_varsa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/surf16.o: $(CLIENT_DIR)/surf16.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/surf8.o: $(CLIENT_DIR)/surf8.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/sys_dosa.o: $(CLIENT_DIR)/sys_dosa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/math.o: $(COMMON_DIR)/math.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/snd_mixa.o: $(COMMON_DIR)/snd_mixa.s - $(DO_AS) - -$(BUILD_DIR)/soft_qw_obj/vid_svgalib.o: $(COMMON_DIR)/vid_svgalib.c - $(DO_O_CC) - -$(BUILD_DIR)/soft_qw_obj/vid_x.o: $(COMMON_DIR)/vid_x.c - $(DO_CC) - -# -# OpenGL Client -# - -GL_OBJS = \ - $(BUILD_DIR)/gl_qw_obj/cl_demo.o \ - $(BUILD_DIR)/gl_qw_obj/cl_ents.o \ - $(BUILD_DIR)/gl_qw_obj/cl_input.o \ - $(BUILD_DIR)/gl_qw_obj/cl_main.o \ - $(BUILD_DIR)/gl_qw_obj/cl_parse.o \ - $(BUILD_DIR)/gl_qw_obj/cl_pred.o \ - $(BUILD_DIR)/gl_qw_obj/cl_tent.o \ - $(BUILD_DIR)/gl_qw_obj/cl_cam.o \ - $(BUILD_DIR)/gl_qw_obj/cmd.o \ - $(BUILD_DIR)/gl_qw_obj/common.o \ - $(BUILD_DIR)/gl_qw_obj/console.o \ - $(BUILD_DIR)/gl_qw_obj/crc.o \ - $(BUILD_DIR)/gl_qw_obj/cvar.o \ - $(BUILD_DIR)/gl_qw_obj/keys.o \ - $(BUILD_DIR)/gl_qw_obj/mathlib.o \ - $(BUILD_DIR)/gl_qw_obj/md4.o \ - $(BUILD_DIR)/gl_qw_obj/menu.o \ - $(BUILD_DIR)/gl_qw_obj/net_chan.o \ - $(BUILD_DIR)/gl_qw_obj/net_udp.o \ - $(BUILD_DIR)/gl_qw_obj/nonintel.o \ - $(BUILD_DIR)/gl_qw_obj/pmove.o \ - $(BUILD_DIR)/gl_qw_obj/pmovetst.o \ - $(BUILD_DIR)/gl_qw_obj/r_part.o \ - $(BUILD_DIR)/gl_qw_obj/sbar.o \ - $(BUILD_DIR)/gl_qw_obj/skin.o \ - $(BUILD_DIR)/gl_qw_obj/snd_dma.o \ - $(BUILD_DIR)/gl_qw_obj/snd_mem.o \ - $(BUILD_DIR)/gl_qw_obj/snd_mix.o \ - $(BUILD_DIR)/gl_qw_obj/view.o \ - $(BUILD_DIR)/gl_qw_obj/wad.o \ - $(BUILD_DIR)/gl_qw_obj/zone.o \ - $(BUILD_DIR)/gl_qw_obj/cd_linux.o \ - $(BUILD_DIR)/gl_qw_obj/sys_linux.o \ - $(BUILD_DIR)/gl_qw_obj/snd_linux.o \ - \ - $(BUILD_DIR)/gl_qw_obj/gl_draw.o \ - $(BUILD_DIR)/gl_qw_obj/gl_mesh.o \ - $(BUILD_DIR)/gl_qw_obj/gl_model.o \ - $(BUILD_DIR)/gl_qw_obj/gl_ngraph.o \ - $(BUILD_DIR)/gl_qw_obj/gl_refrag.o \ - $(BUILD_DIR)/gl_qw_obj/gl_rlight.o \ - $(BUILD_DIR)/gl_qw_obj/gl_rmain.o \ - $(BUILD_DIR)/gl_qw_obj/gl_rmisc.o \ - $(BUILD_DIR)/gl_qw_obj/gl_rsurf.o \ - $(BUILD_DIR)/gl_qw_obj/gl_screen.o \ - $(BUILD_DIR)/gl_qw_obj/gl_warp.o \ - \ - $(BUILD_DIR)/gl_qw_obj/math.o \ - $(BUILD_DIR)/gl_qw_obj/snd_mixa.o \ - $(BUILD_DIR)/gl_qw_obj/sys_dosa.o - -GL_SVGA_OBJS = $(BUILD_DIR)/gl_qw_obj/gl_vidlinux.o -GL_X11_OBJS = $(BUILD_DIR)/gl_qw_obj/gl_vidlinuxglx.o - -$(BUILD_DIR)/qw-client-glide: $(GL_OBJS) $(GL_SVGA_OBJS) - $(CC) $(CFLAGS) -o $@ $(GL_OBJS) $(GL_SVGA_OBJS) $(LDFLAGS) $(GL_SVGA_LDFLAGS) - -$(BUILD_DIR)/qw-client-gl: $(GL_OBJS) $(GL_X11_OBJS) - $(CC) $(CFLAGS) -o $@ $(GL_OBJS) $(GL_X11_OBJS) $(LDFLAGS) $(GL_X11_LDFLAGS) - -$(BUILD_DIR)/gl_qw_obj/cl_demo.o: $(CLIENT_DIR)/cl_demo.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_ents.o: $(CLIENT_DIR)/cl_ents.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_input.o: $(CLIENT_DIR)/cl_input.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_main.o: $(CLIENT_DIR)/cl_main.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_parse.o: $(CLIENT_DIR)/cl_parse.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_pred.o: $(CLIENT_DIR)/cl_pred.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_tent.o: $(CLIENT_DIR)/cl_tent.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cl_cam.o: $(CLIENT_DIR)/cl_cam.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cmd.o: $(QW_COMMON_DIR)/cmd.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/common.o: $(QW_COMMON_DIR)/common.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/console.o: $(QW_COMMON_DIR)/console.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/crc.o: $(COMMON_DIR)/crc.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cvar.o: $(QW_COMMON_DIR)/cvar.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/keys.o: $(CLIENT_DIR)/keys.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/mathlib.o: $(COMMON_DIR)/mathlib.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/md4.o: $(QW_COMMON_DIR)/md4.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/menu.o: $(CLIENT_DIR)/menu.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/net_chan.o: $(QW_COMMON_DIR)/net_chan.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/net_udp.o: $(QW_COMMON_DIR)/net_udp.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/nonintel.o: $(CLIENT_DIR)/nonintel.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/pmove.o: $(QW_COMMON_DIR)/pmove.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/pmovetst.o: $(QW_COMMON_DIR)/pmovetst.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/r_part.o: $(CLIENT_DIR)/r_part.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/sbar.o: $(CLIENT_DIR)/sbar.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/screen.o: $(CLIENT_DIR)/screen.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/skin.o: $(CLIENT_DIR)/skin.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/snd_dma.o: $(COMMON_DIR)/snd_dma.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/snd_mem.o: $(COMMON_DIR)/snd_mem.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/snd_mix.o: $(COMMON_DIR)/snd_mix.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/view.o: $(CLIENT_DIR)/view.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/wad.o: $(COMMON_DIR)/wad.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/zone.o: $(COMMON_DIR)/zone.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/cd_linux.o: $(COMMON_DIR)/cd_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/sys_linux.o: $(CLIENT_DIR)/sys_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/snd_linux.o: $(COMMON_DIR)/snd_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_draw.o: $(CLIENT_DIR)/gl_draw.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_mesh.o: $(CLIENT_DIR)/gl_mesh.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_model.o: $(CLIENT_DIR)/gl_model.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_ngraph.o: $(CLIENT_DIR)/gl_ngraph.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_refrag.o: $(CLIENT_DIR)/gl_refrag.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_rlight.o: $(CLIENT_DIR)/gl_rlight.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_rmain.o: $(CLIENT_DIR)/gl_rmain.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_rmisc.o: $(CLIENT_DIR)/gl_rmisc.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_rsurf.o: $(CLIENT_DIR)/gl_rsurf.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_screen.o: $(CLIENT_DIR)/gl_screen.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_vidlinux.o: $(CLIENT_DIR)/gl_vidlinux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_vidlinuxglx.o: $(COMMON_DIR)/gl_vidlinuxglx.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/gl_warp.o: $(CLIENT_DIR)/gl_warp.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_qw_obj/sys_dosa.o: $(CLIENT_DIR)/sys_dosa.s - $(DO_GL_AS) - -$(BUILD_DIR)/gl_qw_obj/math.o: $(COMMON_DIR)/math.s - $(DO_GL_AS) - -$(BUILD_DIR)/gl_qw_obj/snd_mixa.o: $(COMMON_DIR)/snd_mixa.s - $(DO_GL_AS) - -############################################################################# -# MISC -############################################################################# - -clean: clean-soft clean-gl - -rmdir $(BUILD_DIR) - @echo Done. - -clean-soft: - -rm -rf $(SOFT_TARGETS) $(BUILD_DIR)/soft_qw_obj - -clean-gl: - -rm -rf $(GL_TARGETS) $(BUILD_DIR)/gl_qw_obj diff --git a/qw_client/Makefile.in b/qw_client/Makefile.in new file mode 100644 index 0000000..5aca453 --- /dev/null +++ b/qw_client/Makefile.in @@ -0,0 +1,45 @@ +######################################################################## +# +# Quake general stuff +# +@MAKEFILE_HEADER@ + +PROJECT_DIR = @top_srcdir@ +SRC_DIR = @srcdir@ +QW_COMMON_DIR= $(PROJECT_DIR)/qw_common +BIN_PREFIX = qw-client + +######################################################################## +# +# Client targets +# +@CLIENT_TARGETS@ + +######################################################################## +# +# Source files +# +@SRCFILES@ + +######################################################################## +# +# Directory specific stuff +# +DEFS = @DEFS@ @STRICMP_DEF@ +CFLAGS = -DQUAKEWORLD $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) +ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(QW_X11_VID_SRC) model.c +ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) $(QW_GL_REND_SRC) + +GENERAL_SRC = $(CL_COMMON_SRC) \ + $(QW_CL_SRC) $(QW_NET_SRC) net_chan.c skin.c \ + $(QW_CL_SYS_SRC) \ + $(QW_GENERAL_SRC) +# XXX - add dos/win specifc source + +########################################################################### +# +# Compilation rules +# +@COMP_RULES@ + +@MAKEFILE_TAIL@ diff --git a/qw_client/cl_main.c b/qw_client/cl_main.c index 9d16448..f387c57 100644 --- a/qw_client/cl_main.c +++ b/qw_client/cl_main.c @@ -23,12 +23,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #include "winquake.h" + +#ifdef __sun__ +/* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ +#define model_t sunmodel_t +#endif + #ifdef _WIN32 #include "winsock.h" #else #include #endif +#ifdef __sun__ +#undef model_t +#endif + // we need to declare some mouse variables here, because the menu system // references them even when on a unix system. diff --git a/qw_client/gl_draw.c b/qw_client/gl_draw.c index bf3104d..d31a75b 100644 --- a/qw_client/gl_draw.c +++ b/qw_client/gl_draw.c @@ -747,7 +747,13 @@ void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation) } } - glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE, trans); + glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 64, 64, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, trans); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -1124,7 +1130,14 @@ texels += scaled_width * scaled_height; { if (!mipmap) { - glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); + glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, + scaled_height, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, data); goto done; } memcpy (scaled, data, width*height*4); @@ -1132,7 +1145,14 @@ texels += scaled_width * scaled_height; else GL_ResampleTexture (data, width, height, scaled, scaled_width, scaled_height); - glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled); + glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, + 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, scaled); if (mipmap) { int miplevel; @@ -1148,7 +1168,14 @@ texels += scaled_width * scaled_height; if (scaled_height < 1) scaled_height = 1; miplevel++; - glTexImage2D (GL_TEXTURE_2D, miplevel, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled); + glTexImage2D (GL_TEXTURE_2D, miplevel, samples, + scaled_width, scaled_height, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, scaled); } } done: ; @@ -1214,7 +1241,10 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole { if (!mipmap) { +// FIXME - what if this extension isn't available? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX , GL_UNSIGNED_BYTE, data); +#endif goto done; } memcpy (scaled, data, width*height); @@ -1222,7 +1252,10 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole else GL_Resample8BitTexture (data, width, height, scaled, scaled_width, scaled_height); +// FIXME - what if this extension isn't available? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled); +#endif if (mipmap) { int miplevel; @@ -1238,7 +1271,10 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole if (scaled_height < 1) scaled_height = 1; miplevel++; +// FIXME - what if this extension isn't available? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled); +#endif } } done: ; diff --git a/qw_client/gl_rsurf.c b/qw_client/gl_rsurf.c index c75f0d7..81fac23 100644 --- a/qw_client/gl_rsurf.c +++ b/qw_client/gl_rsurf.c @@ -275,10 +275,8 @@ extern float speedscale; // for top sky and bottom sky void DrawGLWaterPoly (glpoly_t *p); void DrawGLWaterPolyLightmap (glpoly_t *p); -#ifdef _WIN32 lpMTexFUNC qglMTexCoord2fSGIS = NULL; lpSelTexFUNC qglSelectTextureSGIS = NULL; -#endif qboolean mtexenabled = false; diff --git a/qw_client/glquake.h b/qw_client/glquake.h index d93a08d..5d005c4 100644 --- a/qw_client/glquake.h +++ b/qw_client/glquake.h @@ -33,6 +33,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void GL_BeginRendering (int *x, int *y, int *width, int *height); void GL_EndRendering (void); +#ifndef APIENTRY +/* Mesa defines APIENTRY, but other versions of OpenGL do not */ +#ifdef GLAPIENTRY +#define APIENTRY GLAPIENTRY +#else +#define APIENTRY +#endif +#endif // Function prototypes for the Texture Object Extension routines typedef GLboolean (GLAPIENTRY *ARETEXRESFUNCPTR)(GLsizei, const GLuint *, @@ -237,12 +245,10 @@ void GL_Bind (int texnum); #define TEXTURE0_SGIS 0x835E #define TEXTURE1_SGIS 0x835F -#ifdef _WIN32 -typedef void (GLAPIENTRY *lpMTexFUNC) (GLenum, GLfloat, GLfloat); -typedef void (GLAPIENTRY *lpSelTexFUNC) (GLenum); +typedef void (APIENTRY *lpMTexFUNC) (GLenum, GLfloat, GLfloat); +typedef void (APIENTRY *lpSelTexFUNC) (GLenum); extern lpMTexFUNC qglMTexCoord2fSGIS; extern lpSelTexFUNC qglSelectTextureSGIS; -#endif extern qboolean gl_mtexable; diff --git a/qw_client/sys_linux.c b/qw_client/sys_linux.c index e54b11c..ef538f1 100644 --- a/qw_client/sys_linux.c +++ b/qw_client/sys_linux.c @@ -127,7 +127,7 @@ void Sys_Printf (char *fmt, ...) void Sys_Quit (void) { Host_Shutdown(); - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY); exit(0); } @@ -144,7 +144,7 @@ void Sys_Error (char *error, ...) char string[1024]; // change stdin to non blocking - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY); va_start (argptr,error); vsprintf (string,error,argptr); @@ -379,7 +379,7 @@ int main (int c, char **v) noconinput = COM_CheckParm("-noconinput"); if (!noconinput) - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY); if (COM_CheckParm("-nostdout")) nostdout = 1; diff --git a/qw_common/common.c b/qw_common/common.c index 1d824fb..2828877 100644 --- a/qw_common/common.c +++ b/qw_common/common.c @@ -432,8 +432,6 @@ float Q_atof (char *str) ============================================================================ */ -qboolean bigendien; - short (*BigShort) (short l); short (*LittleShort) (short l); int (*BigLong) (int l); @@ -1197,29 +1195,21 @@ COM_Init */ void COM_Init (void) { - byte swaptest[2] = {1,0}; - -// set the byte swapping variables in a portable manner - if ( *(short *)swaptest == 1) - { - bigendien = false; - BigShort = ShortSwap; - LittleShort = ShortNoSwap; - BigLong = LongSwap; - LittleLong = LongNoSwap; - BigFloat = FloatSwap; - LittleFloat = FloatNoSwap; - } - else - { - bigendien = true; - BigShort = ShortNoSwap; - LittleShort = ShortSwap; - BigLong = LongNoSwap; - LittleLong = LongSwap; - BigFloat = FloatNoSwap; - LittleFloat = FloatSwap; - } +#ifdef WORDS_BIGENDIAN + BigShort = ShortNoSwap; + LittleShort = ShortSwap; + BigLong = LongNoSwap; + LittleLong = LongSwap; + BigFloat = FloatNoSwap; + LittleFloat = FloatSwap; +#else + BigShort = ShortSwap; + LittleShort = ShortNoSwap; + BigLong = LongSwap; + LittleLong = LongNoSwap; + BigFloat = FloatSwap; + LittleFloat = FloatNoSwap; +#endif Cvar_RegisterVariable (®istered); Cmd_AddCommand ("path", COM_Path_f); diff --git a/qw_common/common.h b/qw_common/common.h index 1acc9ea..11e7082 100644 --- a/qw_common/common.h +++ b/qw_common/common.h @@ -88,8 +88,6 @@ void InsertLinkAfter (link_t *l, link_t *after); //============================================================================ -extern qboolean bigendien; - extern short (*BigShort) (short l); extern short (*LittleShort) (short l); extern int (*BigLong) (int l); diff --git a/qw_common/net_udp.c b/qw_common/net_udp.c index e1d47b6..3d3cc63 100644 --- a/qw_common/net_udp.c +++ b/qw_common/net_udp.c @@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" +#ifdef __sun__ +/* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ +#define model_t sunmodel_t +#endif #include #include #include @@ -31,12 +35,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include -#if defined(sun) +#ifdef __sun__ #include -#endif - -#ifdef sun #include +#undef model_t #endif #ifdef NeXT diff --git a/qw_server/Makefile b/qw_server/Makefile deleted file mode 100644 index ca985d8..0000000 --- a/qw_server/Makefile +++ /dev/null @@ -1,190 +0,0 @@ -# -# QuakeWorld Makefile for unified tree -# - -VERSION=2.40 - -ifneq (,$(findstring alpha,$(shell uname -m))) -ARCH=axp -else -ARCH=$(shell uname -m | sed s/i.86/i386/) -endif - -PROJECT_DIR=.. - -COMMON_DIR=$(PROJECT_DIR)/common -QW_COMMON_DIR=$(PROJECT_DIR)/qw_common -CLIENT_DIR=$(PROJECT_DIR)/qw_client -SERVER_DIR=$(PROJECT_DIR)/qw_server - -BUILD_DIR=$(PROJECT_DIR)/build - -X11_DIR=/usr/X11R6 - -INCL=-I. -I$(SERVER_DIR) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) -I$(X11_DIR)/include -LIBS=-L$(X11_DIR)/lib - -CC=gcc - -BASE_CFLAGS=-Wall -DQUAKEWORLD -DSERVERONLY -Dstricmp=strcasecmp $(INCL) -DEBUG_CFLAGS=$(BASE_CFLAGS) -g - -ifeq ($(ARCH),i386) -RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ - -malign-jumps=2 -malign-functions=2 -else -RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -endif - -LDFLAGS=-lm - -DO_CC=$(CC) $(CFLAGS) -o $@ -c $< -DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $< -DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< - -############################################################################# -# SETUP AND BUILD -############################################################################# - -TARGETS=$(BUILD_DIR)/qw_server - -all: debug release -.PHONY: all - -debug: $(BUILD_DIR) $(BUILD_DIR)/server_obj - $(MAKE) targets CFLAGS="$(DEBUG_CFLAGS)" - -release: $(BUILD_DIR) $(BUILD_DIR)/server_obj - $(MAKE) targets CFLAGS="$(RELEASE_CFLAGS)" - -targets: $(TARGETS) - -$(BUILD_DIR): - @-mkdir $(BUILD_DIR) - -$(BUILD_DIR)/server_obj: - @-mkdir $(BUILD_DIR)/server_obj - -############################################################################# -# SERVER -############################################################################# - -SERVER_OBJS = \ - $(BUILD_DIR)/server_obj/pr_cmds.o \ - $(BUILD_DIR)/server_obj/pr_edict.o \ - $(BUILD_DIR)/server_obj/pr_exec.o \ - $(BUILD_DIR)/server_obj/sv_init.o \ - $(BUILD_DIR)/server_obj/sv_main.o \ - $(BUILD_DIR)/server_obj/sv_nchan.o \ - $(BUILD_DIR)/server_obj/sv_ents.o \ - $(BUILD_DIR)/server_obj/sv_send.o \ - $(BUILD_DIR)/server_obj/sv_move.o \ - $(BUILD_DIR)/server_obj/sv_phys.o \ - $(BUILD_DIR)/server_obj/sv_user.o \ - $(BUILD_DIR)/server_obj/sv_ccmds.o \ - $(BUILD_DIR)/server_obj/world.o \ - $(BUILD_DIR)/server_obj/sys_unix.o \ - $(BUILD_DIR)/server_obj/model.o \ - $(BUILD_DIR)/server_obj/cmd.o \ - $(BUILD_DIR)/server_obj/common.o \ - $(BUILD_DIR)/server_obj/crc.o \ - $(BUILD_DIR)/server_obj/cvar.o \ - $(BUILD_DIR)/server_obj/mathlib.o \ - $(BUILD_DIR)/server_obj/md4.o \ - $(BUILD_DIR)/server_obj/zone.o \ - $(BUILD_DIR)/server_obj/pmove.o \ - $(BUILD_DIR)/server_obj/pmovetst.o \ - $(BUILD_DIR)/server_obj/net_chan.o \ - $(BUILD_DIR)/server_obj/net_udp.o - -$(BUILD_DIR)/qw_server: $(SERVER_OBJS) - $(CC) $(CFLAGS) -o $@ $(SERVER_OBJS) $(LDFLAGS) - -$(BUILD_DIR)/server_obj/pr_cmds.o: $(SERVER_DIR)/pr_cmds.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/pr_edict.o: $(SERVER_DIR)/pr_edict.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/pr_exec.o: $(SERVER_DIR)/pr_exec.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_init.o: $(SERVER_DIR)/sv_init.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_main.o: $(SERVER_DIR)/sv_main.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_nchan.o: $(SERVER_DIR)/sv_nchan.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_ents.o: $(SERVER_DIR)/sv_ents.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_send.o: $(SERVER_DIR)/sv_send.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_move.o: $(SERVER_DIR)/sv_move.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_phys.o: $(SERVER_DIR)/sv_phys.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_user.o: $(SERVER_DIR)/sv_user.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sv_ccmds.o: $(SERVER_DIR)/sv_ccmds.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/world.o: $(SERVER_DIR)/world.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/sys_unix.o: $(SERVER_DIR)/sys_unix.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/model.o: $(SERVER_DIR)/model.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/crc.o: $(COMMON_DIR)/crc.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/mathlib.o: $(COMMON_DIR)/mathlib.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/zone.o: $(COMMON_DIR)/zone.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/cmd.o: $(QW_COMMON_DIR)/cmd.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/common.o: $(QW_COMMON_DIR)/common.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/cvar.o: $(QW_COMMON_DIR)/cvar.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/md4.o: $(QW_COMMON_DIR)/md4.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/net_chan.o: $(QW_COMMON_DIR)/net_chan.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/net_udp.o: $(QW_COMMON_DIR)/net_udp.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/pmove.o: $(QW_COMMON_DIR)/pmove.c - $(DO_CC) - -$(BUILD_DIR)/server_obj/pmovetst.o: $(QW_COMMON_DIR)/pmovetst.c - $(DO_CC) - -############################################################################# -# MISC -############################################################################# - -clean: - -rm -rf $(TARGETS) $(BUILD_DIR)/server_obj - -rmdir $(BUILD_DIR) - @echo Done. diff --git a/qw_server/Makefile.in b/qw_server/Makefile.in new file mode 100644 index 0000000..228cc9e --- /dev/null +++ b/qw_server/Makefile.in @@ -0,0 +1,84 @@ +######################################################################## +# +# Quake general stuff +# +@MAKEFILE_HEADER@ + +PROJECT_DIR = @top_srcdir@ +SRC_DIR = @srcdir@ +QW_COMMON_DIR= $(PROJECT_DIR)/qw_common + +######################################################################## +# +# Source files +# +@SRCFILES@ + +######################################################################## +# +# Directory specific stuff +# +CFLAGS = -DQUAKEWORLD -DSERVERONLY $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) -I$(QW_COMMON_DIR) -I$(COMMON_DIR) +DEFS = @DEFS@ @STRICMP_DEF@ + +SRVQUAKE = qw-server +targets = $(SRVQUAKE) +.PHONY: $(SRVQUAKE) + +GENERAL_SRC = common.c crc.c cvar.c cmd.c mathlib.c wad.c zone.c \ + $(QW_NET_SRC) net_chan.c $(SRV_SRC) $(QW_SRV_SRC) \ + $(SRV_PR_SRC) $(QW_SRV_SYS_SRC) $(ADDITIONAL_GENERAL_SRC) \ + $(QW_GENERAL_SRC) +ALL_QW_SRV_SRC = $(GENERAL_SRC) $(SRV_VID_SRC) model.c +# XXX - add dos/win specifc source + +x: Makefile + @echo binaries: $(targets) + @echo other targets: distclean + +all: $(targets) + +########################################################################### +# +# qw-server +# +OBJSqw-server = $(patsubst %,$(BUILD_DIR)/srv/%, \ + $(addsuffix .@OBJEXT@, $(basename $(ALL_QW_SRV_SRC) .c .s))) + +SRV_CFLAGS = -DSRV $(X_CFLAGS) +# XXX - Don't use X_EXTRA_LIBS below +SRV_LDFLAGS = @X_EXTRA_LIBS@ -lm + +MAKE_SURE_srv_DIR = @DIR=srv; $(MAKE_SURE_DIR) +$(BUILD_DIR)/srv/%.o: $(SRC_DIR)/%.c + $(MAKE_SURE_srv_DIR) + $(CC) $(CFLAGS) $(SRV_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/srv/%.o: $(SRC_DIR)/%.s + $(MAKE_SURE_srv_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(BUILD_DIR)/srv/%.o: $(COMMON_DIR)/%.c + $(MAKE_SURE_srv_DIR) + $(CC) $(CFLAGS) $(SRV_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/srv/%.o: $(QW_COMMON_DIR)/%.c + $(MAKE_SURE_srv_DIR) + $(CC) $(CFLAGS) $(SRV_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/srv/%.o: $(COMMON_DIR)/%.s + $(MAKE_SURE_srv_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(SRVQUAKE): $(BUILD_DIR)/bin/$(SRVQUAKE) + +$(BUILD_DIR)/bin/$(SRVQUAKE): $(OBJSqw-server) + $(MAKE_SURE_bin_DIR) + $(CC) $(CFLAGS) $(OBJSqw-server) $(SRV_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/bin/$(SRVQUAKE) +# XXX - Can this be automated? +clean-$(SRVQUAKE): + rm -f $(OBJSqw-server) + +clean: clean-$(SRVQUAKE) + +@MAKEFILE_TAIL@ diff --git a/qw_server/sys_unix.c b/qw_server/sys_unix.c index 7ad0030..cca3094 100644 --- a/qw_server/sys_unix.c +++ b/qw_server/sys_unix.c @@ -24,7 +24,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif -#if defined(__linux__) || defined(sun) +// FIXME: use autoconf +#if defined(unix) || defined(_AIX) #include #include #include diff --git a/rules.in b/rules.in new file mode 100644 index 0000000..324e7ea --- /dev/null +++ b/rules.in @@ -0,0 +1,154 @@ +########################################################################### +# +# quake-x11 +# +ifneq ($(X11QUAKE),) + +# Map the list of source files into a list of object files +OBJSquake-x11 = $(patsubst %,$(BUILD_DIR)/x11/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_X11_SRC) .c .s))) + +X11_CFLAGS = -DX11 $(X_CFLAGS) +X11_LDFLAGS = @X_LIBS@ -lX11 @X11_SHM_LIB@ @X_EXTRA_LIBS@ -lm + +# This can be thought of as a macro that makes sure that the x11 +# sub-directory is created +# XXX - can we avoid doing every compile? +MAKE_SURE_x11_DIR = @DIR=x11; $(MAKE_SURE_DIR) + +$(BUILD_DIR)/x11/%.o: $(SRC_DIR)/%.c + $(MAKE_SURE_x11_DIR) + $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/x11/%.o: $(SRC_DIR)/%.s + $(MAKE_SURE_x11_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(BUILD_DIR)/x11/%.o: $(COMMON_DIR)/%.c + $(MAKE_SURE_x11_DIR) + $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< + +ifneq ($(QW_COMMON_DIR),) +$(BUILD_DIR)/x11/%.o: $(QW_COMMON_DIR)/%.c + $(MAKE_SURE_x11_DIR) + $(CC) $(CFLAGS) $(X11_CFLAGS) -o $@ -c $< +endif + +$(BUILD_DIR)/x11/%.o: $(COMMON_DIR)/%.s + $(MAKE_SURE_x11_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(X11QUAKE): $(BUILD_DIR)/bin/$(X11QUAKE) + +$(BUILD_DIR)/bin/$(X11QUAKE): $(OBJSquake-x11) + $(MAKE_SURE_bin_DIR) + $(CC) $(CFLAGS) $(OBJSquake-x11) $(X11_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/bin/$(X11QUAKE) +# XXX - Can this be automated? +clean-$(X11QUAKE): + rm -f $(OBJSquake-x11) +endif + +########################################################################### +# +# quake-svga +# +ifneq ($(SVGAQUAKE),) +ALL_SVGA_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(SVGA_VID_SRC) model.c +OBJSquake-svga= $(patsubst %,$(BUILD_DIR)/svga/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_SVGA_SRC) .c .s))) + +SVGA_CFLAGS = +SVGA_LDFLAGS = -lvga +SVGA_VID_SRC = vid_svgalib.c + +# This can be thought of as a macro that makes sure that the x11 +# sub-directory is created +# XXX - can we avoid doing every compile? +MAKE_SURE_svga_DIR = @DIR=svga; $(MAKE_SURE_DIR) + +# Not sure why this -O is needed, but it is... +$(BUILD_DIR)/svga/vid_svgalib.o: $(COMMON_DIR)/vid_svgalib.c + $(MAKE_SURE_svga_DIR) + $(CC) -O $(CFLAGS) $(SVGA_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/svga/%.o: $(SRC_DIR)/%.c + $(MAKE_SURE_svga_DIR) + $(CC) $(CFLAGS) $(SVGA_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/svga/%.o: $(SRC_DIR)/%.s + $(MAKE_SURE_svga_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(BUILD_DIR)/svga/%.o: $(COMMON_DIR)/%.c + $(MAKE_SURE_svga_DIR) + $(CC) $(CFLAGS) $(SVGA_CFLAGS) -o $@ -c $< + +ifneq ($(QW_COMMON_DIR),) +$(BUILD_DIR)/svga/%.o: $(QW_COMMON_DIR)/%.c + $(MAKE_SURE_svga_DIR) + $(CC) $(CFLAGS) $(SVGA_CFLAGS) -o $@ -c $< +endif + +$(BUILD_DIR)/svga/%.o: $(COMMON_DIR)/%.s + $(MAKE_SURE_svga_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(SVGAQUAKE): $(BUILD_DIR)/bin/$(SVGAQUAKE) + +$(BUILD_DIR)/bin/$(SVGAQUAKE): $(OBJSquake-svga) + $(MAKE_SURE_bin_DIR) + $(CC) $(CFLAGS) $(OBJSquake-svga) $(SVGA_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/bin/$(SVGAQUAKE) +# XXX - Can this be automated? +clean-$(SVGAQUAKE): + rm -f $(OBJSquake-svga) +endif + +########################################################################### +# +# quake-gl +# +ifneq ($(GLQUAKE),) +OBJSquake-gl = $(patsubst %,$(BUILD_DIR)/gl/%,$(addsuffix .@OBJEXT@, $(basename $(ALL_GL_SRC) .c .s))) + +GL_CFLAGS = -DGLQUAKE @OGL_CFLAGS@ +GL_LDFLAGS = $(X11_LDFLAGS) @OGL_LDFLAGS@ -lGL +# XXX - this is for glx +# XXX - is this platform independent? +GL_VID_SRC = gl_vidlinuxglx.c + +# This can be thought of as a macro that makes sure that the x11 +# sub-directory is created +# XXX - can we avoid doing every compile? +MAKE_SURE_gl_DIR = @DIR=gl; $(MAKE_SURE_DIR) + +$(BUILD_DIR)/gl/%.o: $(SRC_DIR)/%.c + $(MAKE_SURE_gl_DIR) + $(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $< + +$(BUILD_DIR)/gl/%.o: $(SRC_DIR)/%.s + $(MAKE_SURE_gl_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(BUILD_DIR)/gl/%.o: $(COMMON_DIR)/%.c + $(MAKE_SURE_gl_DIR) + $(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $< + +ifneq ($(QW_COMMON_DIR),) +$(BUILD_DIR)/gl/%.o: $(QW_COMMON_DIR)/%.c + $(MAKE_SURE_gl_DIR) + $(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $< +endif + +$(BUILD_DIR)/gl/%.o: $(COMMON_DIR)/%.s + $(MAKE_SURE_gl_DIR) + $(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< + +$(GLQUAKE): $(BUILD_DIR)/bin/$(GLQUAKE) + +$(BUILD_DIR)/bin/$(GLQUAKE): $(OBJSquake-gl) + $(MAKE_SURE_bin_DIR) + $(CC) $(CFLAGS) $(OBJSquake-gl) $(GL_LDFLAGS) $(LDFLAGS) -o $(BUILD_DIR)/bin/$(GLQUAKE) + +# XXX - Can this be automated? +clean-$(GLQUAKE): + rm -f $(OBJSquake-gl) +endif + diff --git a/srcfiles.in b/srcfiles.in new file mode 100644 index 0000000..dd57cfc --- /dev/null +++ b/srcfiles.in @@ -0,0 +1,84 @@ +# **** Note - two apps may appear to share source, but they may just share +# source file *names* + +ifeq ($(INTEL_ARCH),yes) +# Source file the Intel archictecture only +UQ_GENERAL_SRC = worlda.s +UQ_SWREND_SRC_PLAT = dosasm.s +CL_ADDITIONAL_GENERAL_SRC = sys_dosa.s math.s +SWREND_SRC_PLAT = d_copy.s d_draw.s d_draw16.s d_parta.s d_polysa.s d_scana.s \ + d_spr8.s d_varsa.s r_aclipa.s r_aliasa.s \ + r_drawa.s r_edgea.s r_varsa.s surf16.s surf8.s +else +# Source files for non-Intel platforms +SWREND_SRC_PLAT = nonintel.c +endif + +# +# System specific source files +# +CD_AUDIO_SRC = @CD_AUDIO_SRC@ + +MACH_SND_SRC = @SND_SRC@ + +X11_VID_SRC = @X11_VID_SRC@ +QW_X11_VID_SRC = vid_x.c + +SYS_SRC = @SYS_SRC@ +QW_CL_SYS_SRC = @QW_CL_SYS_SRC@ +QW_SRV_SYS_SRC = @QW_SRV_SYS_SRC@ + +# +# Networking source files +# +# XXX - Should not assume UNIX +NET_SRC = net_bsd.c net_udp.c +QW_NET_SRC = net_udp.c md4.c +UQ_NET_SRC = net_dgrm.c net_loop.c net_main.c net_vcr.c $(NET_SRC) + +# +# Common source files +# +MISC_SRC = common.c crc.c cvar.c cmd.c mathlib.c wad.c zone.c +SND_SRC = snd_mem.c snd_mix.c $(MACH_SND_SRC) + +# +# Rendering source files +# + +# OpenGL +GL_REND_SRC = gl_screen.c gl_model.c gl_draw.c gl_mesh.c gl_refrag.c \ + gl_rlight.c gl_rmain.c gl_rmisc.c gl_rsurf.c gl_test.c gl_warp.c +QW_GL_REND_SRC = gl_ngraph.c + +# Software source +SW_REND_SRC = screen.c $(SWREND_SRC_PLAT) draw.c \ + d_edge.c d_fill.c d_init.c d_modech.c d_part.c d_polyse.c d_scan.c \ + d_sky.c d_sprite.c d_surf.c d_vars.c d_zpoint.c r_aclip.c r_alias.c \ + r_bsp.c r_draw.c r_edge.c r_efrag.c r_light.c r_main.c r_misc.c \ + r_sky.c r_sprite.c r_surf.c r_vars.c + +# +# Client source files +# +CL_SRC = cl_demo.c cl_input.c cl_main.c cl_parse.c cl_tent.c +QW_CL_SRC = cl_cam.c cl_ents.c cl_pred.c +CL_GUI_SRC= console.c sbar.c view.c keys.c menu.c + +# +# Server source files +# +# Server-related source used by all +SRV_SRC = sv_main.c sv_user.c sv_move.c sv_phys.c +# Server-related source used just by QW server +QW_SRV_SRC = sv_ccmds.c sv_ents.c sv_init.c sv_send.c sv_nchan.c world.c +# Server-related source used just by UQ +UQ_SRV_SRC = host.c host_cmd.c $(SRV_SRC) +SRV_PR_SRC = pr_cmds.c pr_edict.c pr_exec.c + + +QW_GENERAL_SRC = pmove.c pmovetst.c + +# Source common to both UQ and QW-client +CL_COMMON_SRC = $(MISC_SRC) $(CL_GUI_SRC) $(CL_SRC) \ + $(CL_ADDITIONAL_GENERAL_SRC) $(SND_SRC) $(CD_AUDIO_SRC) r_part.c diff --git a/uquake/Makefile b/uquake/Makefile deleted file mode 100644 index 55cfe80..0000000 --- a/uquake/Makefile +++ /dev/null @@ -1,745 +0,0 @@ -# -# UQuake makefile for unified tree -# - -VERSION=0.1.0 - -ARCH=$(shell uname -m | sed -e s/i.86/i386/ ) - -PROJECT_DIR=.. - -COMMON_DIR=$(PROJECT_DIR)/common -UQ_DIR=$(PROJECT_DIR)/uquake - -BUILD_DIR=$(PROJECT_DIR)/build -BUILD_RELEASE_DIR=release-$(ARCH) - -X11_DIR=/usr/X11R6 - -INCL=-I. -I$(UQ_DIR) -I$(COMMON_DIR) -I$(X11_DIR)/include - -CC=gcc - -BASE_CFLAGS=-Wall -Dstricmp=strcasecmp $(INCL) -DEBUG_CFLAGS=$(BASE_CFLAGS) -g - -ifeq ($(ARCH),i386) -RELEASE_CFLAGS=$(BASE_CFLAGS) -m486 -O6 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -malign-loops=2 \ - -malign-jumps=2 -malign-functions=2 -else -RELEASE_CFLAGS=$(BASE_CFLAGS) -O3 -ffast-math -funroll-loops \ - -fomit-frame-pointer -fexpensive-optimizations -endif -GL_CFLAGS=-DGLQUAKE -I$(X11_DIR)/include -I/usr/include/glide - -LDFLAGS=-lm -SVGA_LDFLAGS=$(LDFLAGS) -lvga -X11_LDFLAGS=-L$(X11_DIR)/lib $(LDFLAGS) -lX11 -lXext -GL_X11_LDFLAGS=-L$(X11_DIR)/lib $(LDFLAGS) -lGL -lX11 -lSM -lICE -lXext -lXxf86dga -lXxf86vm -GL_GLIDE_LDFLAGS=-L$(X11_DIR)/lib -lvga -lGL -lglide2x -lX11 -lXext -ldl - -DO_CC=$(CC) $(CFLAGS) -o $@ -c $< -DO_AS=$(CC) $(CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< - -DO_GL_CC=$(CC) $(CFLAGS) $(GL_CFLAGS) -o $@ -c $< -DO_GL_AS=$(CC) $(CFLAGS) $(GL_CFLAGS) -DELF -x assembler-with-cpp -o $@ -c $< - -DO_O_CC=$(CC) -O $(CFLAGS) -o $@ -c $< - -############################################################################# -# SETUP AND BUILD -############################################################################# - -SOFT_TARGETS=$(BUILD_DIR)/quake-svga \ - $(BUILD_DIR)/quake-x11 -GL_TARGETS=$(BUILD_DIR)/quake-gl \ - $(BUILD_DIR)/quake-glide - -debug: debug-soft debug-gl - -release: release-soft release-gl - -all: debug-soft release-soft debug-gl release-gl - -debug-soft: $(BUILD_DIR) $(BUILD_DIR)/soft_uq_obj $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) $(SOFT_X11_OBJS) - - $(MAKE) soft-targets CFLAGS="$(DEBUG_CFLAGS)" - -debug-gl: $(BUILD_DIR) $(BUILD_DIR)/gl_uq_obj $(GL_OBJS) $(GL_AS_OBJS) $(GL_SVGA_OBJS) $(GL_X11_OBJS) - - $(MAKE) gl-targets CFLAGS="$(DEBUG_CFLAGS)" - -release-soft: $(BUILD_DIR) $(BUILD_DIR)/soft_uq_obj $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) $(SOFT_X11_OBJS) - - $(MAKE) soft-targets CFLAGS="$(RELEASE_CFLAGS)" - -release-gl: $(BUILD_DIR) $(BUILD_DIR)/gl_uq_obj $(GL_OBJS) $(GL_AS_OBJS) $(GL_SVGA_OBJS) $(GL_X11_OBJS) - - $(MAKE) gl-targets CFLAGS="$(RELEASE_CFLAGS)" - -soft-targets: $(SOFT_TARGETS) -gl-targets: $(GL_TARGETS) - -$(BUILD_DIR): - @mkdir $(BUILD_DIR) - -$(BUILD_DIR)/soft_uq_obj: - @mkdir $(BUILD_DIR)/soft_uq_obj - -$(BUILD_DIR)/gl_uq_obj: - @mkdir $(BUILD_DIR)/gl_uq_obj - -############################################################################# -# Software Renderer -############################################################################# - -SOFT_OBJS = \ - $(BUILD_DIR)/soft_uq_obj/cl_demo.o \ - $(BUILD_DIR)/soft_uq_obj/cl_input.o \ - $(BUILD_DIR)/soft_uq_obj/cl_main.o \ - $(BUILD_DIR)/soft_uq_obj/cl_parse.o \ - $(BUILD_DIR)/soft_uq_obj/cl_tent.o \ - $(BUILD_DIR)/soft_uq_obj/chase.o \ - $(BUILD_DIR)/soft_uq_obj/cmd.o \ - $(BUILD_DIR)/soft_uq_obj/common.o \ - $(BUILD_DIR)/soft_uq_obj/console.o \ - $(BUILD_DIR)/soft_uq_obj/crc.o \ - $(BUILD_DIR)/soft_uq_obj/cvar.o \ - $(BUILD_DIR)/soft_uq_obj/draw.o \ - $(BUILD_DIR)/soft_uq_obj/d_edge.o \ - $(BUILD_DIR)/soft_uq_obj/d_fill.o \ - $(BUILD_DIR)/soft_uq_obj/d_init.o \ - $(BUILD_DIR)/soft_uq_obj/d_modech.o \ - $(BUILD_DIR)/soft_uq_obj/d_part.o \ - $(BUILD_DIR)/soft_uq_obj/d_polyse.o \ - $(BUILD_DIR)/soft_uq_obj/d_scan.o \ - $(BUILD_DIR)/soft_uq_obj/d_sky.o \ - $(BUILD_DIR)/soft_uq_obj/d_sprite.o \ - $(BUILD_DIR)/soft_uq_obj/d_surf.o \ - $(BUILD_DIR)/soft_uq_obj/d_vars.o \ - $(BUILD_DIR)/soft_uq_obj/d_zpoint.o \ - $(BUILD_DIR)/soft_uq_obj/host.o \ - $(BUILD_DIR)/soft_uq_obj/host_cmd.o \ - $(BUILD_DIR)/soft_uq_obj/keys.o \ - $(BUILD_DIR)/soft_uq_obj/mathlib.o \ - $(BUILD_DIR)/soft_uq_obj/menu.o \ - $(BUILD_DIR)/soft_uq_obj/model.o \ - $(BUILD_DIR)/soft_uq_obj/net_bsd.o \ - $(BUILD_DIR)/soft_uq_obj/net_dgrm.o \ - $(BUILD_DIR)/soft_uq_obj/net_loop.o \ - $(BUILD_DIR)/soft_uq_obj/net_main.o \ - $(BUILD_DIR)/soft_uq_obj/net_udp.o \ - $(BUILD_DIR)/soft_uq_obj/net_vcr.o \ - $(BUILD_DIR)/soft_uq_obj/nonintel.o \ - $(BUILD_DIR)/soft_uq_obj/pr_cmds.o \ - $(BUILD_DIR)/soft_uq_obj/pr_edict.o \ - $(BUILD_DIR)/soft_uq_obj/pr_exec.o \ - $(BUILD_DIR)/soft_uq_obj/r_aclip.o \ - $(BUILD_DIR)/soft_uq_obj/r_alias.o \ - $(BUILD_DIR)/soft_uq_obj/r_bsp.o \ - $(BUILD_DIR)/soft_uq_obj/r_draw.o \ - $(BUILD_DIR)/soft_uq_obj/r_edge.o \ - $(BUILD_DIR)/soft_uq_obj/r_efrag.o \ - $(BUILD_DIR)/soft_uq_obj/r_light.o \ - $(BUILD_DIR)/soft_uq_obj/r_main.o \ - $(BUILD_DIR)/soft_uq_obj/r_misc.o \ - $(BUILD_DIR)/soft_uq_obj/r_part.o \ - $(BUILD_DIR)/soft_uq_obj/r_sky.o \ - $(BUILD_DIR)/soft_uq_obj/r_sprite.o \ - $(BUILD_DIR)/soft_uq_obj/r_surf.o \ - $(BUILD_DIR)/soft_uq_obj/r_vars.o \ - $(BUILD_DIR)/soft_uq_obj/sbar.o \ - $(BUILD_DIR)/soft_uq_obj/screen.o \ - $(BUILD_DIR)/soft_uq_obj/snd_dma.o \ - $(BUILD_DIR)/soft_uq_obj/snd_mem.o \ - $(BUILD_DIR)/soft_uq_obj/snd_mix.o \ - $(BUILD_DIR)/soft_uq_obj/sv_main.o \ - $(BUILD_DIR)/soft_uq_obj/sv_phys.o \ - $(BUILD_DIR)/soft_uq_obj/sv_move.o \ - $(BUILD_DIR)/soft_uq_obj/sv_user.o \ - $(BUILD_DIR)/soft_uq_obj/view.o \ - $(BUILD_DIR)/soft_uq_obj/wad.o \ - $(BUILD_DIR)/soft_uq_obj/world.o \ - $(BUILD_DIR)/soft_uq_obj/zone.o \ - $(BUILD_DIR)/soft_uq_obj/cd_linux.o \ - $(BUILD_DIR)/soft_uq_obj/snd_linux.o \ - $(BUILD_DIR)/soft_uq_obj/sys_linux.o \ - -ifeq ($(ARCH),i386) -SOFT_AS_OBJS = \ - $(BUILD_DIR)/soft_uq_obj/d_copy.o \ - $(BUILD_DIR)/soft_uq_obj/d_draw.o \ - $(BUILD_DIR)/soft_uq_obj/d_draw16.o \ - $(BUILD_DIR)/soft_uq_obj/d_parta.o \ - $(BUILD_DIR)/soft_uq_obj/d_polysa.o \ - $(BUILD_DIR)/soft_uq_obj/d_scana.o \ - $(BUILD_DIR)/soft_uq_obj/d_spr8.o \ - $(BUILD_DIR)/soft_uq_obj/d_varsa.o \ - $(BUILD_DIR)/soft_uq_obj/math.o \ - $(BUILD_DIR)/soft_uq_obj/r_aliasa.o \ - $(BUILD_DIR)/soft_uq_obj/r_drawa.o \ - $(BUILD_DIR)/soft_uq_obj/r_edgea.o \ - $(BUILD_DIR)/soft_uq_obj/r_varsa.o \ - $(BUILD_DIR)/soft_uq_obj/surf16.o \ - $(BUILD_DIR)/soft_uq_obj/surf8.o \ - $(BUILD_DIR)/soft_uq_obj/worlda.o \ - $(BUILD_DIR)/soft_uq_obj/r_aclipa.o \ - $(BUILD_DIR)/soft_uq_obj/snd_mixa.o \ - $(BUILD_DIR)/soft_uq_obj/sys_dosa.o -else -SOFT_AS_OBJS= -endif - -SOFT_SVGA_OBJS = $(BUILD_DIR)/soft_uq_obj/vid_svgalib.o -SOFT_X11_OBJS = $(BUILD_DIR)/soft_uq_obj/vid_x.o - -$(BUILD_DIR)/quake-svga: $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) - $(CC) $(CFLAGS) -o $@ $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_SVGA_OBJS) \ - $(SVGA_LDFLAGS) - -$(BUILD_DIR)/quake-x11: $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_X11_OBJS) - $(CC) $(CFLAGS) -o $@ $(SOFT_OBJS) $(SOFT_AS_OBJS) $(SOFT_X11_OBJS) \ - $(X11_LDFLAGS) - - -$(BUILD_DIR)/soft_uq_obj/cl_demo.o: $(UQ_DIR)/cl_demo.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cl_input.o: $(UQ_DIR)/cl_input.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cl_main.o: $(UQ_DIR)/cl_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cl_parse.o: $(UQ_DIR)/cl_parse.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cl_tent.o: $(UQ_DIR)/cl_tent.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/chase.o: $(UQ_DIR)/chase.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cmd.o: $(UQ_DIR)/cmd.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/common.o: $(UQ_DIR)/common.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/console.o: $(UQ_DIR)/console.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/crc.o: $(UQ_DIR)/crc.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cvar.o: $(UQ_DIR)/cvar.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/draw.o: $(UQ_DIR)/draw.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_edge.o: $(UQ_DIR)/d_edge.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_fill.o: $(UQ_DIR)/d_fill.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_init.o: $(UQ_DIR)/d_init.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_modech.o: $(UQ_DIR)/d_modech.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_part.o: $(UQ_DIR)/d_part.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_polyse.o: $(UQ_DIR)/d_polyse.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_scan.o: $(UQ_DIR)/d_scan.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_sky.o: $(UQ_DIR)/d_sky.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_sprite.o: $(UQ_DIR)/d_sprite.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_surf.o: $(UQ_DIR)/d_surf.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_vars.o: $(UQ_DIR)/d_vars.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/d_zpoint.o: $(UQ_DIR)/d_zpoint.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/host.o : $(UQ_DIR)/host.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/host_cmd.o : $(UQ_DIR)/host_cmd.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/keys.o: $(UQ_DIR)/keys.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/mathlib.o: $(COMMON_DIR)/mathlib.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/menu.o: $(UQ_DIR)/menu.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/model.o: $(UQ_DIR)/model.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_dgrm.o: $(UQ_DIR)/net_dgrm.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_loop.o: $(UQ_DIR)/net_loop.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_main.o: $(UQ_DIR)/net_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_vcr.o: $(UQ_DIR)/net_vcr.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_udp.o: $(UQ_DIR)/net_udp.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/net_bsd.o: $(UQ_DIR)/net_bsd.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/nonintel.o: $(UQ_DIR)/nonintel.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/pr_cmds.o : $(UQ_DIR)/pr_cmds.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/pr_edict.o : $(UQ_DIR)/pr_edict.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/pr_exec.o : $(UQ_DIR)/pr_exec.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_aclip.o: $(UQ_DIR)/r_aclip.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_alias.o: $(UQ_DIR)/r_alias.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_bsp.o: $(UQ_DIR)/r_bsp.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_draw.o: $(UQ_DIR)/r_draw.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_edge.o: $(UQ_DIR)/r_edge.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_efrag.o: $(UQ_DIR)/r_efrag.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_light.o: $(UQ_DIR)/r_light.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_main.o: $(UQ_DIR)/r_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_misc.o: $(UQ_DIR)/r_misc.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_part.o: $(UQ_DIR)/r_part.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_sky.o: $(UQ_DIR)/r_sky.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_sprite.o: $(UQ_DIR)/r_sprite.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_surf.o: $(UQ_DIR)/r_surf.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/r_vars.o: $(UQ_DIR)/r_vars.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sbar.o: $(UQ_DIR)/sbar.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/screen.o: $(UQ_DIR)/screen.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/snd_dma.o: $(COMMON_DIR)/snd_dma.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/snd_mem.o: $(COMMON_DIR)/snd_mem.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/snd_mix.o: $(COMMON_DIR)/snd_mix.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/snd_linux.o: $(COMMON_DIR)/snd_linux.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sv_main.o: $(UQ_DIR)/sv_main.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sv_phys.o: $(UQ_DIR)/sv_phys.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sv_move.o: $(UQ_DIR)/sv_move.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sv_user.o: $(UQ_DIR)/sv_user.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/view.o: $(UQ_DIR)/view.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/wad.o: $(COMMON_DIR)/wad.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/world.o: $(UQ_DIR)/world.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/zone.o: $(COMMON_DIR)/zone.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/cd_linux.o: $(COMMON_DIR)/cd_linux.c - $(DO_CC) - -$(BUILD_DIR)/soft_uq_obj/sys_linux.o: $(UQ_DIR)/sys_linux.c - $(DO_CC) - -# Assembler code - -$(BUILD_DIR)/soft_uq_obj/d_copy.o: $(UQ_DIR)/d_copy.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_draw.o: $(UQ_DIR)/d_draw.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_draw16.o: $(UQ_DIR)/d_draw16.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_parta.o: $(UQ_DIR)/d_parta.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_polysa.o: $(UQ_DIR)/d_polysa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_scana.o: $(UQ_DIR)/d_scana.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_spr8.o: $(UQ_DIR)/d_spr8.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/d_varsa.o: $(UQ_DIR)/d_varsa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/math.o: $(COMMON_DIR)/math.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/r_aclipa.o: $(UQ_DIR)/r_aclipa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/r_aliasa.o: $(UQ_DIR)/r_aliasa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/r_drawa.o: $(UQ_DIR)/r_drawa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/r_edgea.o: $(UQ_DIR)/r_edgea.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/r_varsa.o: $(UQ_DIR)/r_varsa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/surf16.o: $(UQ_DIR)/surf16.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/surf8.o: $(UQ_DIR)/surf8.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/snd_mixa.o: $(COMMON_DIR)/snd_mixa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/sys_dosa.o: $(UQ_DIR)/sys_dosa.s - $(DO_AS) - -$(BUILD_DIR)/soft_uq_obj/worlda.o: $(UQ_DIR)/worlda.s - $(DO_AS) - -# specific things - -$(BUILD_DIR)/soft_uq_obj/vid_svgalib.o: $(COMMON_DIR)/vid_svgalib.c - $(DO_O_CC) - -$(BUILD_DIR)/soft_uq_obj/vid_x.o: $(COMMON_DIR)/vid_x.c - $(DO_CC) - - -# --------------------------------------------------------------------------- -# GL Stuff.. -# --------------------------------------------------------------------------- - -GL_OBJS =\ - $(BUILD_DIR)/gl_uq_obj/cl_demo.o \ - $(BUILD_DIR)/gl_uq_obj/cl_input.o \ - $(BUILD_DIR)/gl_uq_obj/cl_main.o \ - $(BUILD_DIR)/gl_uq_obj/cl_parse.o \ - $(BUILD_DIR)/gl_uq_obj/cl_tent.o \ - $(BUILD_DIR)/gl_uq_obj/chase.o \ - $(BUILD_DIR)/gl_uq_obj/cmd.o \ - $(BUILD_DIR)/gl_uq_obj/common.o \ - $(BUILD_DIR)/gl_uq_obj/console.o \ - $(BUILD_DIR)/gl_uq_obj/crc.o \ - $(BUILD_DIR)/gl_uq_obj/cvar.o \ - \ - $(BUILD_DIR)/gl_uq_obj/gl_draw.o \ - $(BUILD_DIR)/gl_uq_obj/gl_mesh.o \ - $(BUILD_DIR)/gl_uq_obj/gl_model.o \ - $(BUILD_DIR)/gl_uq_obj/gl_refrag.o \ - $(BUILD_DIR)/gl_uq_obj/gl_rlight.o \ - $(BUILD_DIR)/gl_uq_obj/gl_rmain.o \ - $(BUILD_DIR)/gl_uq_obj/gl_rmisc.o \ - $(BUILD_DIR)/gl_uq_obj/gl_rsurf.o \ - $(BUILD_DIR)/gl_uq_obj/gl_screen.o \ - $(BUILD_DIR)/gl_uq_obj/gl_test.o \ - $(BUILD_DIR)/gl_uq_obj/gl_warp.o \ - \ - $(BUILD_DIR)/gl_uq_obj/host.o \ - $(BUILD_DIR)/gl_uq_obj/host_cmd.o \ - $(BUILD_DIR)/gl_uq_obj/keys.o \ - $(BUILD_DIR)/gl_uq_obj/menu.o \ - $(BUILD_DIR)/gl_uq_obj/mathlib.o \ - $(BUILD_DIR)/gl_uq_obj/net_dgrm.o \ - $(BUILD_DIR)/gl_uq_obj/net_loop.o \ - $(BUILD_DIR)/gl_uq_obj/net_main.o \ - $(BUILD_DIR)/gl_uq_obj/net_vcr.o \ - $(BUILD_DIR)/gl_uq_obj/net_udp.o \ - $(BUILD_DIR)/gl_uq_obj/net_bsd.o \ - $(BUILD_DIR)/gl_uq_obj/pr_cmds.o \ - $(BUILD_DIR)/gl_uq_obj/pr_edict.o \ - $(BUILD_DIR)/gl_uq_obj/pr_exec.o \ - $(BUILD_DIR)/gl_uq_obj/r_part.o \ - $(BUILD_DIR)/gl_uq_obj/sbar.o \ - $(BUILD_DIR)/gl_uq_obj/sv_main.o \ - $(BUILD_DIR)/gl_uq_obj/sv_phys.o \ - $(BUILD_DIR)/gl_uq_obj/sv_move.o \ - $(BUILD_DIR)/gl_uq_obj/sv_user.o \ - $(BUILD_DIR)/gl_uq_obj/zone.o \ - $(BUILD_DIR)/gl_uq_obj/view.o \ - $(BUILD_DIR)/gl_uq_obj/wad.o \ - $(BUILD_DIR)/gl_uq_obj/world.o \ - $(BUILD_DIR)/gl_uq_obj/cd_linux.o \ - $(BUILD_DIR)/gl_uq_obj/sys_linux.o \ - $(BUILD_DIR)/gl_uq_obj/snd_dma.o \ - $(BUILD_DIR)/gl_uq_obj/snd_mem.o \ - $(BUILD_DIR)/gl_uq_obj/snd_mix.o \ - $(BUILD_DIR)/gl_uq_obj/snd_linux.o - -GL_AS_OBJS =\ - $(BUILD_DIR)/gl_uq_obj/math.o \ - $(BUILD_DIR)/gl_uq_obj/worlda.o \ - $(BUILD_DIR)/gl_uq_obj/snd_mixa.o \ - $(BUILD_DIR)/gl_uq_obj/sys_dosa.o - -GL_X11_OBJS = $(BUILD_DIR)/gl_uq_obj/gl_vidlinuxglx.o -GL_GLIDE_OBJS = $(BUILD_DIR)/gl_uq_obj/gl_vidlinux.o - -$(BUILD_DIR)/quake-gl: $(GL_OBJS) $(GL_AS_OBJS) $(GL_X11_OBJS) - $(CC) $(CFLAGS) -o $@ $(GL_OBJS) $(GL_AS_OBJS) $(GL_X11_OBJS) $(GL_X11_LDFLAGS) - -$(BUILD_DIR)/quake-glide: $(GL_OBJS) $(GL_AS_OBJS) $(GL_GLIDE_OBJS) - $(CC) $(CFLAGS) -o $@ $(GL_OBJS) $(GL_AS_OBJS) $(GL_GLIDE_OBJS) $(GL_GLIDE_LDFLAGS) - -$(BUILD_DIR)/gl_uq_obj/cl_demo.o : $(UQ_DIR)/cl_demo.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cl_input.o : $(UQ_DIR)/cl_input.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cl_main.o : $(UQ_DIR)/cl_main.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cl_parse.o : $(UQ_DIR)/cl_parse.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cl_tent.o : $(UQ_DIR)/cl_tent.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/chase.o : $(UQ_DIR)/chase.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cmd.o : $(UQ_DIR)/cmd.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/common.o : $(UQ_DIR)/common.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/console.o : $(UQ_DIR)/console.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/crc.o : $(UQ_DIR)/crc.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cvar.o : $(UQ_DIR)/cvar.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_draw.o : $(UQ_DIR)/gl_draw.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_mesh.o : $(UQ_DIR)/gl_mesh.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_model.o : $(UQ_DIR)/gl_model.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_refrag.o : $(UQ_DIR)/gl_refrag.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_rlight.o : $(UQ_DIR)/gl_rlight.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_rmain.o : $(UQ_DIR)/gl_rmain.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_rmisc.o : $(UQ_DIR)/gl_rmisc.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_rsurf.o : $(UQ_DIR)/gl_rsurf.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_screen.o : $(UQ_DIR)/gl_screen.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_test.o : $(UQ_DIR)/gl_test.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_vidlinux.o : $(UQ_DIR)/gl_vidlinux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_vidlinuxglx.o : $(COMMON_DIR)/gl_vidlinuxglx.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/gl_warp.o : $(UQ_DIR)/gl_warp.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/host.o : $(UQ_DIR)/host.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/host_cmd.o : $(UQ_DIR)/host_cmd.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/keys.o : $(UQ_DIR)/keys.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/menu.o : $(UQ_DIR)/menu.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/mathlib.o : $(COMMON_DIR)/mathlib.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_dgrm.o : $(UQ_DIR)/net_dgrm.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_loop.o : $(UQ_DIR)/net_loop.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_main.o : $(UQ_DIR)/net_main.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_vcr.o : $(UQ_DIR)/net_vcr.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_udp.o : $(UQ_DIR)/net_udp.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/net_bsd.o : $(UQ_DIR)/net_bsd.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/pr_cmds.o : $(UQ_DIR)/pr_cmds.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/pr_edict.o : $(UQ_DIR)/pr_edict.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/pr_exec.o : $(UQ_DIR)/pr_exec.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/r_part.o : $(UQ_DIR)/r_part.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sbar.o : $(UQ_DIR)/sbar.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sv_main.o : $(UQ_DIR)/sv_main.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sv_phys.o : $(UQ_DIR)/sv_phys.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sv_move.o : $(UQ_DIR)/sv_move.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sv_user.o : $(UQ_DIR)/sv_user.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/zone.o : $(COMMON_DIR)/zone.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/view.o : $(UQ_DIR)/view.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/wad.o : $(COMMON_DIR)/wad.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/world.o : $(UQ_DIR)/world.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/cd_linux.o : $(COMMON_DIR)/cd_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/sys_linux.o : $(UQ_DIR)/sys_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/snd_dma.o : $(COMMON_DIR)/snd_dma.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/snd_mem.o : $(COMMON_DIR)/snd_mem.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/snd_mix.o : $(COMMON_DIR)/snd_mix.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/snd_linux.o : $(COMMON_DIR)/snd_linux.c - $(DO_GL_CC) - -$(BUILD_DIR)/gl_uq_obj/math.o : $(COMMON_DIR)/math.s - $(DO_GL_AS) - -$(BUILD_DIR)/gl_uq_obj/worlda.o : $(UQ_DIR)/worlda.s - $(DO_GL_AS) - -$(BUILD_DIR)/gl_uq_obj/snd_mixa.o : $(COMMON_DIR)/snd_mixa.s - $(DO_GL_AS) - -$(BUILD_DIR)/gl_uq_obj/sys_dosa.o : $(UQ_DIR)/sys_dosa.s - $(DO_GL_AS) - -############################################################################# -# MISC -############################################################################# - -clean: clean-soft clean-gl - @echo Done. - -clean-soft: - -rm -rf $(SOFT_TARGETS) $(BUILD_DIR)/soft_uq_obj - -clean-gl: - -rm -rf $(GL_TARGETS) $(BUILD_DIR)/gl_uq_obj - diff --git a/uquake/Makefile.in b/uquake/Makefile.in new file mode 100644 index 0000000..d370b5e --- /dev/null +++ b/uquake/Makefile.in @@ -0,0 +1,46 @@ +######################################################################## +# +# Quake general stuff +# +@MAKEFILE_HEADER@ + +PROJECT_DIR = @top_srcdir@ +SRC_DIR = @srcdir@ +UQ_DIR = $(SRC_DIR) +BIN_PREFIX = quake + +######################################################################## +# +# Client targets +# +@CLIENT_TARGETS@ + +######################################################################## +# +# Source files +# +@SRCFILES@ + +######################################################################## +# +# Directory specific stuff +# +DEFS = @DEFS@ +CFLAGS = $(OPTFLAGS) $(DEFS) -I. $(SRC_DIR_INC) -I$(COMMON_DIR) -I$(UQ_DIR)/include +ALL_X11_SRC = $(GENERAL_SRC) $(SW_REND_SRC) $(X11_VID_SRC) model.c +ALL_GL_SRC = $(GENERAL_SRC) $(GL_REND_SRC) $(GL_VID_SRC) + +GENERAL_SRC = $(CL_COMMON_SRC) \ + $(SYS_SRC) chase.c world.c $(SRV_PR_SRC) \ + $(UQ_NET_SRC) $(UQ_SRV_SRC) \ + $(UQ_GENERAL_SRC) $(UQ_SWREND_SRC_PLAT) + +# XXX - add dos/win specific source + +########################################################################### +# +# Compilation rules +# +@COMP_RULES@ + +@MAKEFILE_TAIL@ diff --git a/uquake/common.c b/uquake/common.c index e07e6ce..48f8568 100644 --- a/uquake/common.c +++ b/uquake/common.c @@ -431,8 +431,6 @@ float Q_atof (char *str) ============================================================================ */ -qboolean bigendien; - short (*BigShort) (short l); short (*LittleShort) (short l); int (*BigLong) (int l); @@ -1124,29 +1122,21 @@ COM_Init */ void COM_Init (char *basedir) { - byte swaptest[2] = {1,0}; - -// set the byte swapping variables in a portable manner - if ( *(short *)swaptest == 1) - { - bigendien = false; - BigShort = ShortSwap; - LittleShort = ShortNoSwap; - BigLong = LongSwap; - LittleLong = LongNoSwap; - BigFloat = FloatSwap; - LittleFloat = FloatNoSwap; - } - else - { - bigendien = true; - BigShort = ShortNoSwap; - LittleShort = ShortSwap; - BigLong = LongNoSwap; - LittleLong = LongSwap; - BigFloat = FloatNoSwap; - LittleFloat = FloatSwap; - } +#ifdef WORDS_BIGENDIAN + BigShort = ShortNoSwap; + LittleShort = ShortSwap; + BigLong = LongNoSwap; + LittleLong = LongSwap; + BigFloat = FloatNoSwap; + LittleFloat = FloatSwap; +#else + BigShort = ShortSwap; + LittleShort = ShortNoSwap; + BigLong = LongSwap; + LittleLong = LongNoSwap; + BigFloat = FloatSwap; + LittleFloat = FloatNoSwap; +#endif Cvar_RegisterVariable (®istered); Cvar_RegisterVariable (&cmdline); diff --git a/uquake/common.h b/uquake/common.h index 87d4a55..fb4f472 100644 --- a/uquake/common.h +++ b/uquake/common.h @@ -85,8 +85,6 @@ void InsertLinkAfter (link_t *l, link_t *after); //============================================================================ -extern qboolean bigendien; - extern short (*BigShort) (short l); extern short (*LittleShort) (short l); extern int (*BigLong) (int l); diff --git a/uquake/gl_draw.c b/uquake/gl_draw.c index cd1bd4a..4de7c05 100644 --- a/uquake/gl_draw.c +++ b/uquake/gl_draw.c @@ -23,8 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" -#define GL_COLOR_INDEX8_EXT 0x80E5 - extern unsigned char d_15to8table[65536]; cvar_t gl_nobind = {"gl_nobind", "0"}; @@ -668,7 +666,13 @@ void Draw_TransPicTranslate (int x, int y, qpic_t *pic, byte *translation) } } - glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 64, 64, 0, GL_RGBA, GL_UNSIGNED_BYTE, trans); + glTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 64, 64, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, trans); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); @@ -1031,7 +1035,13 @@ texels += scaled_width * scaled_height; { if (!mipmap) { - glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, data); + glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, data); goto done; } memcpy (scaled, data, width*height*4); @@ -1039,7 +1049,14 @@ texels += scaled_width * scaled_height; else GL_ResampleTexture (data, width, height, scaled, scaled_width, scaled_height); - glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled); + glTexImage2D (GL_TEXTURE_2D, 0, samples, scaled_width, scaled_height, + 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, scaled); if (mipmap) { int miplevel; @@ -1055,7 +1072,14 @@ texels += scaled_width * scaled_height; if (scaled_height < 1) scaled_height = 1; miplevel++; - glTexImage2D (GL_TEXTURE_2D, miplevel, samples, scaled_width, scaled_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, scaled); + glTexImage2D (GL_TEXTURE_2D, miplevel, samples, + scaled_width, scaled_height, 0, +#ifdef WORDS_BIGENDIAN + GL_ABGR_EXT, +#else + GL_RGBA, +#endif + GL_UNSIGNED_BYTE, scaled); } } done: ; @@ -1121,7 +1145,12 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole { if (!mipmap) { +// FIXME - what if this extension is available at compile but not run time? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX , GL_UNSIGNED_BYTE, data); +#else + Sys_Printf("Warning: GL_COLOR_INDEX8_EXT not supported\n"); +#endif goto done; } memcpy (scaled, data, width*height); @@ -1129,7 +1158,12 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole else GL_Resample8BitTexture (data, width, height, scaled, scaled_width, scaled_height); +// FIXME - what if this extension is available at compile but not run time? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, 0, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled); +#else + Sys_Printf("Warning: GL_COLOR_INDEX8_EXT not supported\n"); +#endif if (mipmap) { int miplevel; @@ -1145,7 +1179,10 @@ void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboole if (scaled_height < 1) scaled_height = 1; miplevel++; +// FIXME - what if this extension is available at compile but not run time? +#ifdef HAVE_GL_COLOR_INDEX8_EXT glTexImage2D (GL_TEXTURE_2D, miplevel, GL_COLOR_INDEX8_EXT, scaled_width, scaled_height, 0, GL_COLOR_INDEX, GL_UNSIGNED_BYTE, scaled); +#endif } } done: ; diff --git a/uquake/menu.c b/uquake/menu.c index 6f6c81d..e9c2008 100644 --- a/uquake/menu.c +++ b/uquake/menu.c @@ -17,8 +17,16 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +#ifdef _AIX +/* AIX's level_t in sys/types.h conflicts w/ Quake's level_t */ +#define level_t sunlevel_t +#endif #include "quakedef.h" +#ifdef _AIX +#undef level_t +#endif + #ifdef _WIN32 #include "winquake.h" #endif diff --git a/uquake/net_udp.c b/uquake/net_udp.c index 16487f6..15c1dab 100644 --- a/uquake/net_udp.c +++ b/uquake/net_udp.c @@ -20,11 +20,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // net_udp.c #include "quakedef.h" +#ifdef __sun__ +/* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */ +#define model_t sunmodel_t +#endif #include #include #include -#include #include #include #include @@ -32,6 +35,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifdef __sun__ #include +#undef model_t +#endif + +#if defined(sgi) && defined(sa_family) +/* Get rid of problematic SGI #def */ +#undef sa_family #endif #ifdef NeXT diff --git a/uquake/sys_sun.c b/uquake/sys_sun.c index e47c8e1..d8d6940 100644 --- a/uquake/sys_sun.c +++ b/uquake/sys_sun.c @@ -335,7 +335,8 @@ int main (int argc, char **argv) // unroll the simulation loop to give the video side a chance to see _vid_default_mode Host_Frame( 0.1 ); - VID_SetDefaultMode(); + // FIXME - probably should be deleted - this is just an empty function +// VID_SetDefaultMode(); oldtime = Sys_DoubleTime(); while (1)