File: configure.in

package info (click to toggle)
glide 2002.04.10ds1-16
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 59,540 kB
  • sloc: ansic: 290,125; asm: 23,305; sh: 8,089; pascal: 3,854; makefile: 1,276; perl: 73
file content (307 lines) | stat: -rw-r--r-- 12,297 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
dnl Process this file with autoconf to produce a configure script.
#
# THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY
# PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT
# TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX
# INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE 
# DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). 
# THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER 
# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A
# FULL TEXT OF THE NON-WARRANTY PROVISIONS.  
#
# USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO
# RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN
# TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013,
# AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR
# SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF
# THE UNITED STATES.  
#
# COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
#
# $Revision: 1.8 $
# $Date: 2000/10/20 19:07:00 $
#
AC_INIT([glide], [3.0])
AC_PREREQ(2.53)
AC_CONFIG_SRCDIR([h5/glide3/src/glfb.c])
AC_PREFIX_DEFAULT([/usr])
includedir='${prefix}/include/glide3'
AM_INIT_AUTOMAKE([foreign 1.7])
AM_MAINTAINER_MODE
AM_CONFIG_HEADER([swlibs/include/config.h])
#
# Variables local to the build.
#
FX_HW_PROJECTS=glide3
AC_SUBST(FX_HW_PROJECTS)
#
# --enable-fx-glide-hw chooses which ASIC to build for.
#
AC_ARG_ENABLE([fx-glide-hw],
              [dnl
  --enable-fx-glide-hw=ASIC   Build for the given ASIC
                                h5: VoodooV
                                h3: Voodoo3
                                cvg: Voodoo2
                                [default=h5]],
            [case ${enableval} in
             h3|h5|cvg)
                 FX_GLIDE_HW="${enableval}"
                 ;;
            *)
                 AC_MSG_ERROR([Illegal value ($enable_fx_glide_hw) for --enable-fx-glide-hw])
                 ;;
            esac],[FX_GLIDE_HW=h5])
AC_SUBST(FX_GLIDE_HW)
#
# --enable-fx-dri-build chooses to build with or without DRI.
#
AC_ARG_ENABLE([fx-dri-build],
              [dnl
  --enable-fx-build-dri       Build for DRI. [default=yes]],
              [case ${enableval} in
               true|yes)
                   DRI_BUILD=true
                   ;;
               false|no)
                   DRI_BUILD=false
                   ;;
               *)
                   AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-build-dri])
                   ;;
               esac],[DRI_BUILD=true])
AM_CONDITIONAL(DRI_BUILD,test x$DRI_BUILD = xtrue)
AC_SUBST(DRI_BUILD)
#
# This is makefile.linux behavior.  I don't know exactly
# what this does.
#
AM_CONDITIONAL(HAL_HW, test "$FX_GLIDE_HW"=cvg && test ! -z "$HAL_HW")
#
# Define debugging
#
AC_ARG_ENABLE([fx-debug],
              [dnl
  --enable-fx-debug           Enable a debugging glide build [default=no]],
              [case ${enableval} in
               true|yes)
                   GLIDE_DEBUG=true
                   ;;
               false|no)
                   GLIDE_DEBUG=false
                   ;;
               *)
                   AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-debug])
                   ;;
               esac],[GLIDE_DEBUG=false])
AM_CONDITIONAL(GLIDE_DEBUG,test x$GLIDE_DEBUG = xtrue)
AC_SUBST(GLIDE_DEBUG)
#
# Define --enable-amd3d
#
AC_ARG_ENABLE([amd3d],
              [dnl
  --enable-amd3d              Enable AMD 3DNow instructions [default=no]],
              [case ${enableval} in
               true|yes)
                   enable_amd3d=true
                   ;;
               false|no)
                   enable_amd3d=false
                   ;;
               *)
                   AC_MSG_ERROR([Illegal value (${enableval}) for --enable-amd3d])
                   ;;
               esac],[enable_amd3d=false])
AM_CONDITIONAL(GL_AMD3D,     test x$enable_amd3d = xtrue)
#
# --enable-fx-texlib=texus2 enables new texus library.
#
AC_ARG_ENABLE([fx-texlib],
              [dnl
  --enable-fx-tex=dir         Enable enhanced texture utilities library
                                texus  - original library
                                texus2 - library for compressed textures
                                [default=texus2]],
              [case ${enableval} in
               texus|texus2)
                   TEXTURE_UTILITIES_DIR=${enableval}
                   ;;
               *)
                   AC_MSG_ERROR([Illegal value (${enableval}) for --enable-fx-texus])
                   ;;
               esac],[TEXTURE_UTILITIES_DIR=texus2])
AC_SUBST(TEXTURE_UTILITIES_DIR)
#
# These are conditional variables whose value is set by
# one of the other enable macros.
#
AM_CONDITIONAL(FX_GLIDE_H3,  test x$FX_GLIDE_HW = xh3)
AM_CONDITIONAL(FX_GLIDE_H5,  test x$FX_GLIDE_HW = xh5)
AM_CONDITIONAL(FX_GLIDE_CVG, test x$FX_GLIDE_HW = xcvg)
#
# Architecture
#
AC_ARG_ENABLE([build-architecture],
              [dnl
  --enable-build-architecture Enable AMD 3DNow instructions [default=current]],
              [case ${enableval} in
               i[3456]86|x86_64|alpha)
                   FX_GLIDE_BUILD_ARCHITECTURE=${enableval}
                   ;;
               *)
                   AC_MSG_ERROR([Illegal value (${enableval}) for --enable-build-architecture])
                   ;;
               esac],[FX_GLIDE_BUILD_ARCHITECTURE=`uname -m`])
AC_SUBST(FX_GLIDE_BUILD_ARCHITECTURE)
#
# Various tests needed at points in the build
# First, we set defaults.
#
FX_GLIDE_PACKET_FIFO=true
FX_GLIDE3=true
FX_GLIDE_PACKET_FIFO=true
FX_GLIDE_SW_SETUP=false
FX_CHRIS_DENIS_ANTHONY_HACK=false
FX_GLIDE_ALT_TAB=false
FX_GLIDE_DIRECT_WRITE=false
HAL_CSIM=false
FX_GLIDE_NO_FIFO=false
FX_GLIDE_DEBUG_FIFO=false
FX_GLIDE_NO_PLUG=false
FX_GLIDE_NO_SPLASH=false
GLIDE_SANITY_ALL=false
GLIDE_SANITY_SIZE=false
FX_DLL_BUILD=false
FX_GLIDE_HW_CULL=false
# Here we define whether we use C versions of cpu detection and triangle setup
FX_GLIDE_CTRISETUP=false
FX_GLIDE_C_CPU_DETECT=false
# Override based on architecture
if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "alpha"; then
FX_GLIDE_CTRISETUP=true
FX_GLIDE_C_CPU_DETECT=true
fi
if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "ia64"; then
FX_GLIDE_CTRISETUP=true
fi
if test "$FX_GLIDE_BUILD_ARCHITECTURE" = "x86_64"; then
FX_GLIDE_CTRISETUP=true
FX_GLIDE_C_CPU_DETECT=true
fi
# Next, we read some configuration options
# statically.  This is to avoid creating a bunch of
# not-terribly-useful --enable options.
#
if test -f $srcdir/swlibs/include/make/3dfx.config.sh  ; then
    . $srcdir/swlibs/include/make/3dfx.config.sh
fi
AM_CONDITIONAL(FX_GLIDE3,
               test x$FX_GLIDE3 = xtrue)
AM_CONDITIONAL(FX_CHRIS_DENIS_ANTHONY_HACK,dnl
               test x$FX_CHRIS_DENIS_ANTHONY_HACK = xtrue)
AM_CONDITIONAL(FX_GLIDE_ALT_TAB,dnl
               test x$FX_GLIDE_ALT_TAB = xtrue)
AM_CONDITIONAL(FX_GLIDE_DIRECT_WRITE,dnl
               test x$FX_GLIDE_DIRECT_WRITE = xtrue)
AM_CONDITIONAL(HAL_CSIM,dnl
               test x$HAL_CSIM = xtrue)
AM_CONDITIONAL(FX_GLIDE_SW_SETUP,dnl
               test x$FX_GLIDE_SW_SETUP = xtrue)
AM_CONDITIONAL(FX_GLIDE_NO_FIFO,dnl
               test x$FX_GLIDE_NO_FIFO = xtrue)
AM_CONDITIONAL(FX_GLIDE_DEBUG_FIFO,dnl
               test x$FX_GLIDE_DEBUG_FIFO = xtrue)
AM_CONDITIONAL(FX_GLIDE_NO_PLUG,dnl
               test x$FX_GLIDE_NO_PLUG = xtrue)
AM_CONDITIONAL(FX_GLIDE_NO_SPLASH,dnl
               test x$FX_GLIDE_NO_SPLASH = xtrue)
AM_CONDITIONAL(GLIDE_SANITY_ALL,dnl
               test x$GLIDE_SANITY_ALL = xtrue)
AM_CONDITIONAL(GLIDE_SANITY_SIZE,dnl
               test x$GLIDE_SANITY_SIZE = xtrue)
AM_CONDITIONAL(FX_DLL_BUILD,dnl
               test x$FX_DLL_BUILD = xtrue)
AM_CONDITIONAL(FX_GLIDE_HW_CULL,dnl
               test x$FX_GLIDE_HW_CULL = xtrue)
AM_CONDITIONAL(FX_GLIDE_CTRISETUP,dnl
               test x$FX_GLIDE_CTRISETUP = xtrue)
AM_CONDITIONAL(FX_GLIDE_C_CPU_DETECT,dnl
               test x$FX_GLIDE_C_CPU_DETECT = xtrue)
AM_CONDITIONAL(FX_GLIDE_PACKET_FIFO,dnl
               test x$FX_GLIDE_PACKET_FIFO = xtrue)
AM_CONDITIONAL(FX_GLIDE_VERTEX_TABLE,dnl
               test x$FX_GLIDE_VERTEX_TABLE = xtrue)
AM_CONDITIONAL(FX_HOOPTI_TRI_SETUP_COMPARE,dnl
               test x$FX_HOOPTI_TRI_SETUP_COMPARE = xtrue)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_CPP
AM_PROG_AS
AC_CHECK_TOOL(OBJDUMP, objdump, false)
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
AC_CHECK_TOOL(CP, cp, false)
AC_PROG_INSTALL
AM_PROG_LIBTOOL
MAKE="make -f makefile.autoconf"
AC_SUBST(MAKE)
dnl Checks for libraries.

dnl Checks for header files.
AC_PATH_X
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h limits.h malloc.h sys/ioctl.h sys/time.h unistd.h)

dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_FUNC_MEMCMP
AC_FUNC_MMAP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(ftime gethostname select strcspn strdup strstr strtoul)

dnl
dnl This is complicated perhaps.  We create a makefile by concatenating
dnl the two files:
dnl     o $makefile.in
dnl     o swlibs/include/make/makefile.autoconf.bottom
dnl where $makefile is the makefile name.
dnl
AC_CONFIG_FILES([build.3dfx
          makefile.autoconf:makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          cvg/makefile.autoconf:cvg/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          cvg/incsrc/makefile.autoconf:cvg/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          cvg/init/makefile.autoconf:cvg/init/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          cvg/glide3/makefile.autoconf:cvg/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          cvg/glide3/src/makefile.autoconf:cvg/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h3/makefile.autoconf:h3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h3/incsrc/makefile.autoconf:h3/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h3/minihwc/makefile.autoconf:h3/minihwc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h3/glide3/makefile.autoconf:h3/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h3/glide3/src/makefile.autoconf:h3/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h5/makefile.autoconf:h5/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h5/glide3/makefile.autoconf:h5/glide3/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h5/glide3/src/makefile.autoconf:h5/glide3/src/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h5/incsrc/makefile.autoconf:h5/incsrc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          h5/minihwc/makefile.autoconf:h5/minihwc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/makefile.autoconf:swlibs/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/fxmisc/makefile.autoconf:swlibs/fxmisc/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/newpci/makefile.autoconf:swlibs/newpci/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/newpci/pcilib/makefile.autoconf:swlibs/newpci/pcilib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/texus/makefile.autoconf:swlibs/texus/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/texus/lib/makefile.autoconf:swlibs/texus/lib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/texus2/makefile.autoconf:swlibs/texus2/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/texus2/lib/makefile.autoconf:swlibs/texus2/lib/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          swlibs/texus2/cmd/makefile.autoconf:swlibs/texus2/cmd/makefile.autoconf.in:swlibs/include/make/makefile.autoconf.bottom
          ], [chmod +x build.3dfx])
AC_OUTPUT