slouken@0
|
1 |
dnl Process this file with autoconf to produce a configure script.
|
slouken@0
|
2 |
AC_INIT(README)
|
slouken@0
|
3 |
|
slouken@0
|
4 |
dnl Set various version strings - taken gratefully from the GTk sources
|
slouken@0
|
5 |
#
|
slouken@0
|
6 |
# Making releases:
|
slouken@0
|
7 |
# Edit include/SDL/SDL_version.h and change the version, then:
|
slouken@0
|
8 |
# SDL_MICRO_VERSION += 1;
|
slouken@0
|
9 |
# SDL_INTERFACE_AGE += 1;
|
slouken@0
|
10 |
# SDL_BINARY_AGE += 1;
|
slouken@0
|
11 |
# if any functions have been added, set SDL_INTERFACE_AGE to 0.
|
slouken@0
|
12 |
# if backwards compatibility has been broken,
|
slouken@0
|
13 |
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
slouken@0
|
14 |
#
|
slouken@0
|
15 |
SDL_MAJOR_VERSION=1
|
slouken@0
|
16 |
SDL_MINOR_VERSION=2
|
slouken@350
|
17 |
SDL_MICRO_VERSION=5
|
slouken@350
|
18 |
SDL_INTERFACE_AGE=5
|
slouken@350
|
19 |
SDL_BINARY_AGE=5
|
slouken@0
|
20 |
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
slouken@0
|
21 |
|
slouken@0
|
22 |
AC_SUBST(SDL_MAJOR_VERSION)
|
slouken@0
|
23 |
AC_SUBST(SDL_MINOR_VERSION)
|
slouken@0
|
24 |
AC_SUBST(SDL_MICRO_VERSION)
|
slouken@0
|
25 |
AC_SUBST(SDL_INTERFACE_AGE)
|
slouken@0
|
26 |
AC_SUBST(SDL_BINARY_AGE)
|
slouken@0
|
27 |
AC_SUBST(SDL_VERSION)
|
slouken@0
|
28 |
|
slouken@0
|
29 |
# libtool versioning
|
slouken@0
|
30 |
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
|
slouken@0
|
31 |
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
|
slouken@0
|
32 |
LT_REVISION=$SDL_INTERFACE_AGE
|
slouken@0
|
33 |
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
|
slouken@0
|
34 |
|
slouken@0
|
35 |
AC_SUBST(LT_RELEASE)
|
slouken@0
|
36 |
AC_SUBST(LT_CURRENT)
|
slouken@0
|
37 |
AC_SUBST(LT_REVISION)
|
slouken@0
|
38 |
AC_SUBST(LT_AGE)
|
slouken@0
|
39 |
|
slouken@0
|
40 |
dnl Detect the canonical host and target build environment
|
slouken@0
|
41 |
AC_CANONICAL_HOST
|
slouken@0
|
42 |
AC_CANONICAL_TARGET
|
slouken@0
|
43 |
|
slouken@51
|
44 |
dnl Setup for automake
|
slouken@51
|
45 |
AM_INIT_AUTOMAKE(SDL, $SDL_VERSION)
|
slouken@51
|
46 |
|
slouken@0
|
47 |
dnl Check for tools
|
slouken@0
|
48 |
|
slouken@0
|
49 |
AC_LIBTOOL_WIN32_DLL
|
slouken@0
|
50 |
AM_PROG_LIBTOOL
|
slouken@0
|
51 |
AC_PROG_MAKE_SET
|
slouken@0
|
52 |
AC_PROG_CC
|
slouken@0
|
53 |
AC_C_INLINE
|
slouken@0
|
54 |
AC_C_CONST
|
slouken@200
|
55 |
AC_PROG_CXX
|
slouken@0
|
56 |
AC_PROG_INSTALL
|
slouken@0
|
57 |
AC_FUNC_ALLOCA
|
slouken@258
|
58 |
ASFLAGS=""
|
slouken@258
|
59 |
AC_SUBST(ASFLAGS)
|
slouken@0
|
60 |
|
slouken@0
|
61 |
dnl The alpha architecture needs special flags for binary portability
|
slouken@0
|
62 |
case "$target" in
|
slouken@0
|
63 |
alpha*-*-linux*)
|
slouken@0
|
64 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@0
|
65 |
CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall"
|
slouken@0
|
66 |
fi
|
slouken@0
|
67 |
;;
|
slouken@0
|
68 |
esac
|
slouken@0
|
69 |
|
slouken@0
|
70 |
dnl Add compiler-specific optimization flags
|
slouken@0
|
71 |
|
slouken@0
|
72 |
dnl See if the user wants aggressive optimizations of the code
|
slouken@0
|
73 |
AC_ARG_ENABLE(debug,
|
slouken@0
|
74 |
[ --enable-debug Disable aggressive optimizations [default=yes]],
|
slouken@0
|
75 |
, enable_debug=yes)
|
slouken@0
|
76 |
if test x$enable_debug != xyes; then
|
slouken@0
|
77 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@0
|
78 |
CFLAGS="$CFLAGS -fexpensive-optimizations"
|
slouken@0
|
79 |
# Ack! This breaks the MMX YV12 conversion on gcc 2.95.2
|
slouken@0
|
80 |
# CFLAGS="$CFLAGS -fomit-frame-pointer"
|
slouken@0
|
81 |
fi
|
slouken@0
|
82 |
case "$target" in
|
slouken@0
|
83 |
i486-*-*)
|
slouken@0
|
84 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@0
|
85 |
CFLAGS="$CFLAGS -march=486"
|
slouken@0
|
86 |
fi
|
slouken@0
|
87 |
;;
|
slouken@0
|
88 |
i?86-*-*)
|
slouken@0
|
89 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@0
|
90 |
CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro"
|
slouken@0
|
91 |
fi
|
slouken@0
|
92 |
;;
|
slouken@0
|
93 |
*-*-osf*)
|
slouken@0
|
94 |
if test x$ac_cv_prog_gcc != xyes; then
|
slouken@0
|
95 |
CFLAGS="-g3 -fast -arch host"
|
slouken@0
|
96 |
fi
|
slouken@0
|
97 |
;;
|
slouken@0
|
98 |
esac
|
slouken@0
|
99 |
fi
|
slouken@0
|
100 |
|
slouken@0
|
101 |
dnl Add verbose warnings by default, and allow ANSI compliance checking
|
slouken@0
|
102 |
AC_ARG_ENABLE(strict-ansi,
|
slouken@0
|
103 |
[ --enable-strict-ansi Enable strict ANSI compliance build [default=no]],
|
slouken@0
|
104 |
, enable_strict_ansi=no)
|
slouken@0
|
105 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@0
|
106 |
CFLAGS="$CFLAGS -Wall"
|
slouken@0
|
107 |
if test x$enable_strict_ansi = xyes; then
|
slouken@0
|
108 |
CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE"
|
slouken@0
|
109 |
fi
|
slouken@0
|
110 |
fi
|
slouken@0
|
111 |
|
slouken@0
|
112 |
dnl Initialize the compiler and linker flags for SDL applications
|
slouken@0
|
113 |
|
slouken@0
|
114 |
SDL_CFLAGS=""
|
slouken@0
|
115 |
SDL_LIBS="-lSDL"
|
slouken@0
|
116 |
|
slouken@0
|
117 |
dnl Add the math library for the new gamma correction support
|
slouken@0
|
118 |
|
slouken@0
|
119 |
case "$target" in
|
slouken@0
|
120 |
*-*-cygwin* | *-*-mingw32*)
|
slouken@0
|
121 |
MATHLIB=""
|
slouken@0
|
122 |
;;
|
slouken@0
|
123 |
*-*-beos*)
|
slouken@0
|
124 |
MATHLIB=""
|
slouken@0
|
125 |
;;
|
slouken@0
|
126 |
*-*-darwin*)
|
slouken@0
|
127 |
MATHLIB=""
|
slouken@0
|
128 |
;;
|
slouken@0
|
129 |
*)
|
slouken@0
|
130 |
MATHLIB="-lm"
|
slouken@0
|
131 |
;;
|
slouken@0
|
132 |
esac
|
slouken@0
|
133 |
SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB"
|
slouken@0
|
134 |
|
slouken@0
|
135 |
dnl Enable/disable various subsystems of the SDL library
|
slouken@0
|
136 |
|
slouken@0
|
137 |
AC_ARG_ENABLE(audio,
|
slouken@0
|
138 |
[ --enable-audio Enable the audio subsystem [default=yes]],
|
slouken@0
|
139 |
, enable_audio=yes)
|
slouken@0
|
140 |
if test x$enable_audio = xyes; then
|
slouken@0
|
141 |
SDL_EXTRADIRS="$SDL_EXTRADIRS audio"
|
slouken@0
|
142 |
SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la"
|
slouken@0
|
143 |
else
|
slouken@0
|
144 |
CFLAGS="$CFLAGS -DDISABLE_AUDIO"
|
slouken@0
|
145 |
fi
|
slouken@0
|
146 |
AC_ARG_ENABLE(video,
|
slouken@0
|
147 |
[ --enable-video Enable the video subsystem [default=yes]],
|
slouken@0
|
148 |
, enable_video=yes)
|
slouken@0
|
149 |
if test x$enable_video = xyes; then
|
slouken@0
|
150 |
SDL_EXTRADIRS="$SDL_EXTRADIRS video"
|
slouken@0
|
151 |
SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la"
|
slouken@0
|
152 |
else
|
slouken@0
|
153 |
CFLAGS="$CFLAGS -DDISABLE_VIDEO"
|
slouken@0
|
154 |
fi
|
slouken@0
|
155 |
AC_ARG_ENABLE(events,
|
slouken@0
|
156 |
[ --enable-events Enable the events subsystem [default=yes]],
|
slouken@0
|
157 |
, enable_events=yes)
|
slouken@0
|
158 |
if test x$enable_video = xyes -a x$enable_events = xyes; then
|
slouken@0
|
159 |
SDL_EXTRADIRS="$SDL_EXTRADIRS events"
|
slouken@0
|
160 |
SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la"
|
slouken@0
|
161 |
else
|
slouken@0
|
162 |
CFLAGS="$CFLAGS -DDISABLE_EVENTS"
|
slouken@0
|
163 |
fi
|
slouken@0
|
164 |
AC_ARG_ENABLE(joystick,
|
slouken@0
|
165 |
[ --enable-joystick Enable the joystick subsystem [default=yes]],
|
slouken@0
|
166 |
, enable_joystick=yes)
|
slouken@0
|
167 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
168 |
SDL_EXTRADIRS="$SDL_EXTRADIRS joystick"
|
slouken@0
|
169 |
SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la"
|
slouken@0
|
170 |
else
|
slouken@0
|
171 |
CFLAGS="$CFLAGS -DDISABLE_JOYSTICK"
|
slouken@0
|
172 |
fi
|
slouken@0
|
173 |
AC_ARG_ENABLE(cdrom,
|
slouken@0
|
174 |
[ --enable-cdrom Enable the cdrom subsystem [default=yes]],
|
slouken@0
|
175 |
, enable_cdrom=yes)
|
slouken@0
|
176 |
if test x$enable_cdrom = xyes; then
|
slouken@0
|
177 |
SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom"
|
slouken@0
|
178 |
SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la"
|
slouken@0
|
179 |
else
|
slouken@0
|
180 |
CFLAGS="$CFLAGS -DDISABLE_CDROM"
|
slouken@0
|
181 |
fi
|
slouken@0
|
182 |
AC_ARG_ENABLE(threads,
|
slouken@0
|
183 |
[ --enable-threads Enable the threading subsystem [default=yes]],
|
slouken@0
|
184 |
, enable_threads=yes)
|
slouken@0
|
185 |
SDL_EXTRADIRS="$SDL_EXTRADIRS thread"
|
slouken@0
|
186 |
SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la"
|
slouken@0
|
187 |
if test x$enable_threads != xyes; then
|
slouken@0
|
188 |
CFLAGS="$CFLAGS -DDISABLE_THREADS"
|
slouken@0
|
189 |
COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c)
|
slouken@0
|
190 |
COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h)
|
slouken@0
|
191 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
slouken@0
|
192 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
slouken@0
|
193 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
slouken@0
|
194 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@0
|
195 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@0
|
196 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@0
|
197 |
fi
|
slouken@0
|
198 |
AC_ARG_ENABLE(timers,
|
slouken@0
|
199 |
[ --enable-timers Enable the timer subsystem [default=yes]],
|
slouken@0
|
200 |
, enable_timers=yes)
|
slouken@0
|
201 |
if test x$enable_timers = xyes; then
|
slouken@0
|
202 |
SDL_EXTRADIRS="$SDL_EXTRADIRS timer"
|
slouken@0
|
203 |
SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la"
|
slouken@0
|
204 |
else
|
slouken@0
|
205 |
CFLAGS="$CFLAGS -DDISABLE_TIMERS"
|
slouken@0
|
206 |
fi
|
slouken@0
|
207 |
AC_ARG_ENABLE(endian,
|
slouken@0
|
208 |
[ --enable-endian Enable the endian subsystem [default=yes]],
|
slouken@0
|
209 |
, enable_endian=yes)
|
slouken@0
|
210 |
if test x$enable_endian = xyes; then
|
slouken@0
|
211 |
SDL_EXTRADIRS="$SDL_EXTRADIRS endian"
|
slouken@0
|
212 |
SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la"
|
slouken@0
|
213 |
else
|
slouken@0
|
214 |
CFLAGS="$CFLAGS -DDISABLE_ENDIAN"
|
slouken@0
|
215 |
fi
|
slouken@0
|
216 |
AC_ARG_ENABLE(file,
|
slouken@0
|
217 |
[ --enable-file Enable the file subsystem [default=yes]],
|
slouken@0
|
218 |
, enable_file=yes)
|
slouken@0
|
219 |
if test x$enable_file = xyes; then
|
slouken@0
|
220 |
SDL_EXTRADIRS="$SDL_EXTRADIRS file"
|
slouken@0
|
221 |
SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la"
|
slouken@0
|
222 |
else
|
slouken@0
|
223 |
CFLAGS="$CFLAGS -DDISABLE_FILE"
|
slouken@0
|
224 |
fi
|
slouken@0
|
225 |
|
slouken@0
|
226 |
dnl See if the OSS audio interface is supported
|
slouken@0
|
227 |
CheckOSS()
|
slouken@0
|
228 |
{
|
slouken@0
|
229 |
AC_ARG_ENABLE(oss,
|
slouken@0
|
230 |
[ --enable-oss support the OSS audio API [default=yes]],
|
slouken@0
|
231 |
, enable_oss=yes)
|
slouken@0
|
232 |
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
|
slouken@0
|
233 |
AC_MSG_CHECKING(for OSS audio support)
|
slouken@0
|
234 |
have_oss=no
|
slouken@94
|
235 |
if test x$have_oss != xyes; then
|
slouken@94
|
236 |
AC_TRY_COMPILE([
|
slouken@94
|
237 |
#include <sys/soundcard.h>
|
slouken@94
|
238 |
],[
|
slouken@94
|
239 |
int arg = SNDCTL_DSP_SETFRAGMENT;
|
slouken@94
|
240 |
],[
|
slouken@94
|
241 |
have_oss=yes
|
slouken@94
|
242 |
])
|
slouken@94
|
243 |
fi
|
slouken@94
|
244 |
if test x$have_oss != xyes; then
|
slouken@94
|
245 |
AC_TRY_COMPILE([
|
slouken@94
|
246 |
#include <soundcard.h>
|
slouken@94
|
247 |
],[
|
slouken@94
|
248 |
int arg = SNDCTL_DSP_SETFRAGMENT;
|
slouken@94
|
249 |
],[
|
slouken@94
|
250 |
have_oss=yes
|
slouken@94
|
251 |
CFLAGS="$CFLAGS -DOSS_USE_SOUNDCARD_H"
|
slouken@94
|
252 |
])
|
slouken@94
|
253 |
fi
|
slouken@0
|
254 |
AC_MSG_RESULT($have_oss)
|
slouken@0
|
255 |
if test x$have_oss = xyes; then
|
slouken@0
|
256 |
CFLAGS="$CFLAGS -DOSS_SUPPORT"
|
slouken@0
|
257 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp"
|
slouken@0
|
258 |
AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la"
|
slouken@0
|
259 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma"
|
slouken@0
|
260 |
AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la"
|
slouken@0
|
261 |
fi
|
slouken@0
|
262 |
fi
|
slouken@0
|
263 |
}
|
slouken@0
|
264 |
|
slouken@0
|
265 |
dnl See if the ALSA audio interface is supported
|
slouken@0
|
266 |
CheckALSA()
|
slouken@0
|
267 |
{
|
slouken@0
|
268 |
AC_ARG_ENABLE(alsa,
|
slouken@0
|
269 |
[ --enable-alsa support the ALSA audio API [default=yes]],
|
slouken@0
|
270 |
, enable_alsa=yes)
|
slouken@0
|
271 |
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
slouken@354
|
272 |
AC_MSG_CHECKING(for ALSA audio support)
|
slouken@0
|
273 |
have_alsa=no
|
slouken@354
|
274 |
AC_TRY_COMPILE([
|
slouken@354
|
275 |
#include <alsa/asoundlib.h>
|
slouken@354
|
276 |
],[
|
slouken@354
|
277 |
#if SND_LIB_VERSION < ((0<<16)|(9<<8)|0)
|
slouken@354
|
278 |
#error Your version of ALSA is too old
|
slouken@354
|
279 |
#endif
|
slouken@354
|
280 |
snd_pcm_t *pcm_handle;
|
slouken@354
|
281 |
],[
|
slouken@354
|
282 |
AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes)
|
slouken@354
|
283 |
])
|
slouken@354
|
284 |
if test x$have_alsa = xyes; then
|
slouken@0
|
285 |
CFLAGS="$CFLAGS -DALSA_SUPPORT"
|
slouken@0
|
286 |
SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
|
slouken@0
|
287 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa"
|
slouken@0
|
288 |
AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la"
|
slouken@354
|
289 |
else
|
slouken@354
|
290 |
AC_MSG_RESULT($have_alsa)
|
slouken@0
|
291 |
fi
|
slouken@0
|
292 |
fi
|
slouken@0
|
293 |
}
|
slouken@0
|
294 |
|
slouken@148
|
295 |
dnl Check whether we want to use IRIX 6.5+ native audio or not
|
slouken@148
|
296 |
CheckDMEDIA()
|
slouken@148
|
297 |
{
|
slouken@148
|
298 |
if test x$enable_audio = xyes; then
|
slouken@148
|
299 |
AC_MSG_CHECKING(for dmedia audio support)
|
slouken@148
|
300 |
have_dmedia=no
|
slouken@148
|
301 |
AC_TRY_COMPILE([
|
slouken@148
|
302 |
#include <dmedia/audio.h>
|
slouken@148
|
303 |
],[
|
slouken@148
|
304 |
ALport audio_port;
|
slouken@148
|
305 |
],[
|
slouken@148
|
306 |
have_dmedia=yes
|
slouken@148
|
307 |
])
|
slouken@148
|
308 |
# Set up files for the audio library
|
slouken@148
|
309 |
if test x$have_dmedia = xyes; then
|
slouken@148
|
310 |
CFLAGS="$CFLAGS -DDMEDIA_SUPPORT"
|
slouken@148
|
311 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia"
|
slouken@148
|
312 |
AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la"
|
slouken@148
|
313 |
SYSTEM_LIBS="$SYSTEM_LIBS -laudio"
|
slouken@148
|
314 |
fi
|
slouken@148
|
315 |
fi
|
slouken@148
|
316 |
}
|
slouken@148
|
317 |
|
slouken@0
|
318 |
dnl Find the ESD includes and libraries
|
slouken@0
|
319 |
CheckESD()
|
slouken@0
|
320 |
{
|
slouken@0
|
321 |
AC_ARG_ENABLE(esd,
|
slouken@0
|
322 |
[ --enable-esd support the Enlightened Sound Daemon [default=yes]],
|
slouken@0
|
323 |
, enable_esd=yes)
|
slouken@0
|
324 |
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
|
slouken@371
|
325 |
use_esd=no
|
slouken@294
|
326 |
AM_PATH_ESD(0.2.8, use_esd=yes)
|
slouken@371
|
327 |
if test x$use_esd = xyes; then
|
slouken@294
|
328 |
AC_ARG_ENABLE(esd-shared,
|
slouken@296
|
329 |
[ --enable-esd-shared dynamically load ESD audio support [default=no]],
|
slouken@296
|
330 |
, enable_esd_shared=no)
|
slouken@294
|
331 |
esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
|
slouken@371
|
332 |
esd_lib=`ls $esd_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
|
slouken@371
|
333 |
echo "-- $esd_lib_spec -> $esd_lib"
|
slouken@296
|
334 |
if test x$enable_dlopen != xyes && \
|
slouken@296
|
335 |
test x$enable_esd_shared = xyes; then
|
slouken@296
|
336 |
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
|
slouken@296
|
337 |
fi
|
slouken@294
|
338 |
if test x$enable_dlopen = xyes && \
|
slouken@294
|
339 |
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
|
slouken@294
|
340 |
CFLAGS="$CFLAGS -DESD_SUPPORT -DESD_DYNAMIC=\$(esd_lib) $ESD_CFLAGS"
|
slouken@371
|
341 |
AC_SUBST(esd_lib)
|
slouken@294
|
342 |
else
|
slouken@294
|
343 |
CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS"
|
slouken@294
|
344 |
SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS"
|
slouken@294
|
345 |
fi
|
slouken@0
|
346 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd"
|
slouken@0
|
347 |
AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la"
|
slouken@294
|
348 |
fi
|
slouken@0
|
349 |
fi
|
slouken@0
|
350 |
}
|
slouken@0
|
351 |
|
slouken@0
|
352 |
CheckARTSC()
|
slouken@0
|
353 |
{
|
slouken@0
|
354 |
AC_ARG_ENABLE(arts,
|
slouken@0
|
355 |
[ --enable-arts support the Analog Real Time Synthesizer [default=yes]],
|
slouken@0
|
356 |
, enable_arts=yes)
|
slouken@0
|
357 |
if test x$enable_audio = xyes -a x$enable_arts = xyes; then
|
slouken@0
|
358 |
AC_PATH_PROG(ARTSCCONFIG, artsc-config)
|
slouken@0
|
359 |
if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then
|
slouken@0
|
360 |
: # arts isn't installed
|
slouken@0
|
361 |
else
|
slouken@0
|
362 |
ARTSC_CFLAGS=`$ARTSCCONFIG --cflags`
|
slouken@0
|
363 |
ARTSC_LIBS=`$ARTSCCONFIG --libs`
|
slouken@0
|
364 |
AC_MSG_CHECKING(for aRts development environment)
|
slouken@0
|
365 |
audio_arts=no
|
slouken@0
|
366 |
save_CFLAGS="$CFLAGS"
|
slouken@0
|
367 |
CFLAGS="$CFLAGS $ARTSC_CFLAGS"
|
slouken@0
|
368 |
AC_TRY_COMPILE([
|
slouken@0
|
369 |
#include <artsc.h>
|
slouken@0
|
370 |
],[
|
slouken@0
|
371 |
arts_stream_t stream;
|
slouken@0
|
372 |
],[
|
slouken@0
|
373 |
audio_arts=yes
|
slouken@0
|
374 |
])
|
slouken@0
|
375 |
CFLAGS="$save_CFLAGS"
|
slouken@0
|
376 |
AC_MSG_RESULT($audio_arts)
|
slouken@0
|
377 |
if test x$audio_arts = xyes; then
|
slouken@294
|
378 |
AC_ARG_ENABLE(arts-shared,
|
slouken@296
|
379 |
[ --enable-arts-shared dynamically load aRts audio support [default=no]],
|
slouken@296
|
380 |
, enable_arts_shared=no)
|
slouken@300
|
381 |
arts_lib_spec=`echo $ARTSC_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libartsc.so.*/'`
|
slouken@371
|
382 |
arts_lib=`ls $arts_lib_spec | head -1 | sed 's/.*\/\(.*\)/\1/'`
|
slouken@371
|
383 |
echo "-- $arts_lib_spec -> $arts_lib"
|
slouken@296
|
384 |
if test x$enable_dlopen != xyes && \
|
slouken@296
|
385 |
test x$enable_arts_shared = xyes; then
|
slouken@296
|
386 |
AC_MSG_ERROR([You must have dlopen() support and use the --enable-dlopen option])
|
slouken@296
|
387 |
fi
|
slouken@294
|
388 |
if test x$enable_dlopen = xyes && \
|
slouken@294
|
389 |
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
|
slouken@294
|
390 |
CFLAGS="$CFLAGS -DARTSC_SUPPORT -DARTSC_DYNAMIC=\$(arts_lib) $ARTSC_CFLAGS"
|
slouken@371
|
391 |
AC_SUBST(arts_lib)
|
slouken@294
|
392 |
else
|
slouken@294
|
393 |
CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS"
|
slouken@294
|
394 |
SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS"
|
slouken@294
|
395 |
fi
|
slouken@0
|
396 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts"
|
slouken@0
|
397 |
AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la"
|
slouken@0
|
398 |
fi
|
slouken@0
|
399 |
fi
|
slouken@0
|
400 |
fi
|
slouken@0
|
401 |
}
|
slouken@0
|
402 |
|
slouken@0
|
403 |
dnl See if the NAS audio interface is supported
|
slouken@0
|
404 |
CheckNAS()
|
slouken@0
|
405 |
{
|
slouken@0
|
406 |
AC_ARG_ENABLE(nas,
|
slouken@292
|
407 |
[ --enable-nas support the NAS audio API [default=yes]],
|
slouken@41
|
408 |
, enable_nas=yes)
|
slouken@0
|
409 |
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
|
slouken@41
|
410 |
AC_MSG_CHECKING(for NAS audio support)
|
slouken@41
|
411 |
have_nas=no
|
slouken@41
|
412 |
if test -r /usr/X11R6/include/audio/audiolib.h; then
|
slouken@41
|
413 |
have_nas=yes
|
slouken@41
|
414 |
fi
|
slouken@41
|
415 |
AC_MSG_RESULT($have_nas)
|
slouken@41
|
416 |
if test x$have_nas = xyes; then
|
slouken@41
|
417 |
CFLAGS="$CFLAGS -DNAS_SUPPORT"
|
slouken@41
|
418 |
SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt"
|
slouken@41
|
419 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas"
|
slouken@41
|
420 |
AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la"
|
slouken@41
|
421 |
fi
|
slouken@0
|
422 |
fi
|
slouken@0
|
423 |
}
|
slouken@0
|
424 |
|
slouken@68
|
425 |
dnl rcg07142001 See if the user wants the disk writer audio driver...
|
slouken@68
|
426 |
CheckDiskAudio()
|
slouken@68
|
427 |
{
|
slouken@68
|
428 |
AC_ARG_ENABLE(diskaudio,
|
slouken@292
|
429 |
[ --enable-diskaudio support the disk writer audio driver [default=yes]],
|
slouken@86
|
430 |
, enable_diskaudio=yes)
|
slouken@68
|
431 |
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
|
slouken@68
|
432 |
CFLAGS="$CFLAGS -DDISKAUD_SUPPORT"
|
slouken@68
|
433 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS disk"
|
slouken@68
|
434 |
AUDIO_DRIVERS="$AUDIO_DRIVERS disk/libaudio_disk.la"
|
slouken@68
|
435 |
fi
|
slouken@68
|
436 |
}
|
slouken@68
|
437 |
|
slouken@398
|
438 |
dnl Set up the Atari Audio driver
|
slouken@398
|
439 |
CheckAtariAudio()
|
slouken@398
|
440 |
{
|
slouken@398
|
441 |
AC_ARG_ENABLE(mintaudio,
|
slouken@398
|
442 |
[ --enable-mintaudio support Atari audio driver [default=yes]],
|
slouken@398
|
443 |
, enable_mintaudio=yes)
|
slouken@398
|
444 |
if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
|
slouken@398
|
445 |
mintaudio=no
|
slouken@398
|
446 |
AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
|
slouken@398
|
447 |
if test x$have_mint_falcon_hdr = xyes; then
|
slouken@398
|
448 |
mintaudio=yes
|
slouken@398
|
449 |
CFLAGS="$CFLAGS -DMINTAUDIO_SUPPORT"
|
slouken@398
|
450 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS mint"
|
slouken@398
|
451 |
AUDIO_DRIVERS="$AUDIO_DRIVERS mint/libaudio_mintaudio.la"
|
slouken@398
|
452 |
fi
|
slouken@398
|
453 |
fi
|
slouken@398
|
454 |
}
|
slouken@398
|
455 |
|
slouken@0
|
456 |
dnl See if we can use x86 assembly blitters
|
slouken@212
|
457 |
# NASM is available from: http://nasm.octium.net/
|
slouken@0
|
458 |
CheckNASM()
|
slouken@0
|
459 |
{
|
slouken@0
|
460 |
dnl Make sure we are running on an x86 platform
|
slouken@0
|
461 |
case $target in
|
slouken@0
|
462 |
i?86*)
|
slouken@0
|
463 |
;;
|
slouken@0
|
464 |
*)
|
slouken@0
|
465 |
# Nope, bail early.
|
slouken@0
|
466 |
return
|
slouken@0
|
467 |
;;
|
slouken@0
|
468 |
esac
|
slouken@0
|
469 |
dnl Check for NASM (for assembly blit routines)
|
slouken@0
|
470 |
AC_ARG_ENABLE(nasm,
|
slouken@0
|
471 |
[ --enable-nasm use nasm assembly blitters on x86 [default=yes]],
|
slouken@0
|
472 |
, enable_nasm=yes)
|
slouken@0
|
473 |
if test x$enable_video = xyes -a x$enable_nasm = xyes; then
|
slouken@0
|
474 |
AC_PATH_PROG(NASM, nasm)
|
slouken@0
|
475 |
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
|
slouken@0
|
476 |
: # nasm isn't installed
|
slouken@0
|
477 |
else
|
slouken@0
|
478 |
CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes"
|
slouken@0
|
479 |
case $ARCH in
|
slouken@0
|
480 |
win32)
|
slouken@0
|
481 |
NASMFLAGS="-f win32"
|
slouken@0
|
482 |
;;
|
slouken@360
|
483 |
openbsd)
|
slouken@360
|
484 |
NASMFLAGS="-f aoutb"
|
slouken@360
|
485 |
;;
|
slouken@0
|
486 |
*)
|
slouken@0
|
487 |
NASMFLAGS="-f elf"
|
slouken@0
|
488 |
;;
|
slouken@0
|
489 |
esac
|
slouken@0
|
490 |
AC_SUBST(NASMFLAGS)
|
slouken@0
|
491 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
|
slouken@0
|
492 |
SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
|
slouken@0
|
493 |
SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
|
slouken@0
|
494 |
fi
|
slouken@0
|
495 |
fi
|
slouken@0
|
496 |
}
|
slouken@0
|
497 |
|
slouken@30
|
498 |
dnl Find the nanox include and library directories
|
slouken@30
|
499 |
CheckNANOX()
|
slouken@30
|
500 |
{
|
slouken@292
|
501 |
AC_ARG_ENABLE(video-nanox,
|
slouken@292
|
502 |
[ --enable-video-nanox use nanox video driver [default=no]],
|
slouken@292
|
503 |
, enable_video_nanox=no)
|
slouken@292
|
504 |
AC_ARG_ENABLE(nanox-debug,
|
slouken@292
|
505 |
[ --enable-nanox-debug print debug messages [default=no]],
|
slouken@292
|
506 |
, enable_nanox_debug=no)
|
slouken@292
|
507 |
AC_ARG_ENABLE(nanox-share-memory,
|
slouken@292
|
508 |
[ --enable-nanox-share-memory use share memory [default=no]],
|
slouken@292
|
509 |
, enable_nanox_share_memory=no)
|
slouken@30
|
510 |
|
slouken@292
|
511 |
AC_ARG_WITH(nanox_pixel_type,
|
slouken@292
|
512 |
[ --with-nanox-pixel-type=[rgb/0888/888/565/555/332/pal]])
|
slouken@30
|
513 |
|
slouken@292
|
514 |
if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
|
slouken@292
|
515 |
if test x$enable_nanox_debug = xyes; then
|
slouken@292
|
516 |
CFLAGS="$CFLAGS -DENABLE_NANOX_DEBUG"
|
slouken@292
|
517 |
fi
|
slouken@30
|
518 |
|
slouken@292
|
519 |
if test x$enable_nanox_share_memory = xyes; then
|
slouken@292
|
520 |
CFLAGS="$CFLAGS -DNANOX_SHARE_MEMORY"
|
slouken@292
|
521 |
fi
|
slouken@30
|
522 |
|
slouken@292
|
523 |
case "$with_nanox_pixel_type" in
|
slouken@292
|
524 |
rgb) CFLAGS="$CFLAGS -DNANOX_PIXEL_RGB" ;;
|
slouken@292
|
525 |
0888) CFLAGS="$CFLAGS -DNANOX_PIXEL_0888" ;;
|
slouken@292
|
526 |
888) CFLAGS="$CFLAGS -DNANOX_PIXEL_888" ;;
|
slouken@292
|
527 |
565) CFLAGS="$CFLAGS -DNANOX_PIXEL_565" ;;
|
slouken@292
|
528 |
555) CFLAGS="$CFLAGS -DNANOX_PIXEL_555" ;;
|
slouken@292
|
529 |
332) CFLAGS="$CFLAGS -DNANOX_PIXEL_332" ;;
|
slouken@292
|
530 |
pal) CFLAGS="$CFLAGS -DNANOX_PIXEL_PAL" ;;
|
slouken@292
|
531 |
*) AC_MSG_ERROR([Invalid nanox_pixel_type]);;
|
slouken@292
|
532 |
esac
|
slouken@30
|
533 |
|
slouken@292
|
534 |
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_NANOX"
|
slouken@292
|
535 |
SYSTEM_LIBS="$SYSTEM_LIBS -lnano-X"
|
slouken@292
|
536 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS nanox"
|
slouken@292
|
537 |
VIDEO_DRIVERS="$VIDEO_DRIVERS nanox/libvideo_nanox.la"
|
slouken@292
|
538 |
fi
|
slouken@30
|
539 |
}
|
slouken@30
|
540 |
|
slouken@0
|
541 |
dnl Find the X11 include and library directories
|
slouken@0
|
542 |
CheckX11()
|
slouken@0
|
543 |
{
|
slouken@0
|
544 |
AC_ARG_ENABLE(video-x11,
|
slouken@0
|
545 |
[ --enable-video-x11 use X11 video driver [default=yes]],
|
slouken@0
|
546 |
, enable_video_x11=yes)
|
slouken@0
|
547 |
if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
|
slouken@0
|
548 |
AC_PATH_X
|
slouken@0
|
549 |
AC_PATH_XTRA
|
slouken@0
|
550 |
if test x$have_x = xyes; then
|
slouken@318
|
551 |
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11 -Iinclude -Isrc/video"
|
slouken@0
|
552 |
if test x$ac_cv_func_shmat != xyes; then
|
slouken@0
|
553 |
CFLAGS="$CFLAGS -DNO_SHARED_MEMORY"
|
slouken@0
|
554 |
fi
|
slouken@0
|
555 |
SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext"
|
slouken@0
|
556 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11"
|
slouken@0
|
557 |
VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la"
|
slouken@0
|
558 |
|
slouken@0
|
559 |
AC_ARG_ENABLE(video-x11-vm,
|
slouken@0
|
560 |
[ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]],
|
slouken@0
|
561 |
, enable_video_x11_vm=yes)
|
slouken@0
|
562 |
if test x$enable_video_x11_vm = xyes; then
|
slouken@0
|
563 |
AC_MSG_CHECKING(for XFree86 VidMode 1.0 support)
|
slouken@0
|
564 |
video_x11_vm=no
|
slouken@0
|
565 |
AC_TRY_COMPILE([
|
slouken@0
|
566 |
#include <X11/Xlib.h>
|
slouken@292
|
567 |
#include <XFree86/extensions/xf86vmode.h>
|
slouken@0
|
568 |
],[
|
slouken@0
|
569 |
],[
|
slouken@0
|
570 |
video_x11_vm=yes
|
slouken@0
|
571 |
])
|
slouken@0
|
572 |
AC_MSG_RESULT($video_x11_vm)
|
slouken@0
|
573 |
if test x$video_x11_vm = xyes; then
|
slouken@0
|
574 |
CFLAGS="$CFLAGS -DXFREE86_VM"
|
slouken@292
|
575 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86vm"
|
slouken@292
|
576 |
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86vm/libXFree86_Xxf86vm.la"
|
slouken@0
|
577 |
AC_MSG_CHECKING(for XFree86 VidMode gamma support)
|
slouken@0
|
578 |
video_x11_vmgamma=no
|
slouken@0
|
579 |
AC_TRY_COMPILE([
|
slouken@0
|
580 |
#include <X11/Xlib.h>
|
slouken@292
|
581 |
#include <XFree86/extensions/xf86vmode.h>
|
slouken@0
|
582 |
],[
|
slouken@292
|
583 |
SDL_NAME(XF86VidModeGamma) gamma;
|
slouken@0
|
584 |
],[
|
slouken@0
|
585 |
video_x11_vmgamma=yes
|
slouken@0
|
586 |
])
|
slouken@0
|
587 |
AC_MSG_RESULT($video_x11_vmgamma)
|
slouken@0
|
588 |
if test x$video_x11_vmgamma = xyes; then
|
slouken@0
|
589 |
CFLAGS="$CFLAGS -DXFREE86_VMGAMMA"
|
slouken@0
|
590 |
fi
|
slouken@0
|
591 |
fi
|
slouken@0
|
592 |
fi
|
slouken@16
|
593 |
AC_ARG_ENABLE(dga,
|
slouken@16
|
594 |
[ --enable-dga allow use of X11 DGA code [default=yes]],
|
slouken@16
|
595 |
, enable_dga=yes)
|
slouken@0
|
596 |
AC_ARG_ENABLE(video-x11-dgamouse,
|
slouken@0
|
597 |
[ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]],
|
slouken@0
|
598 |
, enable_video_x11_dgamouse=yes)
|
slouken@16
|
599 |
if test x$enable_dga = xyes; then
|
slouken@16
|
600 |
AC_MSG_CHECKING(for XFree86 DGA 1.0 support)
|
slouken@16
|
601 |
video_x11_dga=no
|
slouken@16
|
602 |
AC_TRY_COMPILE([
|
slouken@16
|
603 |
#include <X11/Xlib.h>
|
slouken@292
|
604 |
#include <XFree86/extensions/xf86dga.h>
|
slouken@16
|
605 |
],[
|
slouken@16
|
606 |
],[
|
slouken@16
|
607 |
video_x11_dga=yes
|
slouken@16
|
608 |
])
|
slouken@16
|
609 |
AC_MSG_RESULT($video_x11_dga)
|
slouken@16
|
610 |
if test x$video_x11_dga = xyes; then
|
slouken@16
|
611 |
CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE"
|
slouken@16
|
612 |
if test x$enable_video_x11_dgamouse = xyes; then
|
slouken@16
|
613 |
CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE"
|
slouken@16
|
614 |
fi
|
slouken@292
|
615 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xxf86dga"
|
slouken@292
|
616 |
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xxf86dga/libXFree86_Xxf86dga.la"
|
slouken@0
|
617 |
fi
|
slouken@0
|
618 |
fi
|
slouken@0
|
619 |
AC_ARG_ENABLE(video-x11-xv,
|
slouken@0
|
620 |
[ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]],
|
slouken@0
|
621 |
, enable_video_x11_xv=yes)
|
slouken@0
|
622 |
if test x$enable_video_x11_xv = xyes; then
|
slouken@0
|
623 |
AC_MSG_CHECKING(for XFree86 XvImage support)
|
slouken@0
|
624 |
video_x11_xv=no
|
slouken@0
|
625 |
AC_TRY_COMPILE([
|
slouken@0
|
626 |
#include <X11/Xlib.h>
|
slouken@0
|
627 |
#include <sys/ipc.h>
|
slouken@0
|
628 |
#include <sys/shm.h>
|
slouken@0
|
629 |
#include <X11/extensions/XShm.h>
|
slouken@292
|
630 |
#include <XFree86/extensions/Xvlib.h>
|
slouken@0
|
631 |
],[
|
slouken@292
|
632 |
SDL_NAME(XvImage) *image;
|
slouken@0
|
633 |
],[
|
slouken@0
|
634 |
video_x11_xv=yes
|
slouken@0
|
635 |
])
|
slouken@0
|
636 |
AC_MSG_RESULT($video_x11_xv)
|
slouken@0
|
637 |
if test x$video_x11_xv = xyes; then
|
slouken@0
|
638 |
CFLAGS="$CFLAGS -DXFREE86_XV"
|
slouken@292
|
639 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xv"
|
slouken@292
|
640 |
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xv/libXFree86_Xv.la"
|
slouken@0
|
641 |
fi
|
slouken@0
|
642 |
fi
|
slouken@227
|
643 |
AC_ARG_ENABLE(video-x11-xinerama,
|
slouken@227
|
644 |
[ --enable-video-x11-xinerama enable X11 Xinerama support [default=yes]],
|
slouken@227
|
645 |
, enable_video_x11_xinerama=yes)
|
slouken@227
|
646 |
if test x$enable_video_x11_xinerama = xyes; then
|
slouken@227
|
647 |
AC_MSG_CHECKING(for X11 Xinerama support)
|
slouken@227
|
648 |
video_x11_xinerama=no
|
slouken@227
|
649 |
AC_TRY_COMPILE([
|
slouken@227
|
650 |
#include <X11/Xlib.h>
|
slouken@292
|
651 |
#include <XFree86/extensions/Xinerama.h>
|
slouken@227
|
652 |
],[
|
slouken@292
|
653 |
SDL_NAME(XineramaScreenInfo) *xinerama;
|
slouken@227
|
654 |
],[
|
slouken@227
|
655 |
video_x11_xinerama=yes
|
slouken@227
|
656 |
])
|
slouken@227
|
657 |
AC_MSG_RESULT($video_x11_xinerama)
|
slouken@227
|
658 |
if test x$video_x11_xinerama = xyes; then
|
slouken@227
|
659 |
CFLAGS="$CFLAGS -DHAVE_XINERAMA"
|
slouken@292
|
660 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS XFree86/Xinerama"
|
slouken@292
|
661 |
VIDEO_DRIVERS="$VIDEO_DRIVERS XFree86/Xinerama/libXFree86_Xinerama.la"
|
slouken@227
|
662 |
fi
|
slouken@227
|
663 |
fi
|
slouken@242
|
664 |
AC_ARG_ENABLE(video-x11-xme,
|
slouken@242
|
665 |
[ --enable-video-x11-xme enable Xi Graphics XME for fullscreen [default=yes]],
|
slouken@242
|
666 |
, enable_video_x11_xme=yes)
|
slouken@242
|
667 |
if test x$enable_video_x11_xme = xyes; then
|
slouken@242
|
668 |
AC_MSG_CHECKING(for Xi Graphics XiGMiscExtension support)
|
slouken@242
|
669 |
video_x11_xme=no
|
slouken@242
|
670 |
AC_TRY_COMPILE([
|
slouken@242
|
671 |
#include <X11/Xlib.h>
|
slouken@242
|
672 |
#include <X11/extensions/xme.h>
|
slouken@242
|
673 |
],[
|
slouken@242
|
674 |
XiGMiscResolutionInfo *resolutions;
|
slouken@242
|
675 |
],[
|
slouken@242
|
676 |
video_x11_xme=yes
|
slouken@242
|
677 |
])
|
slouken@242
|
678 |
AC_MSG_RESULT($video_x11_xme)
|
slouken@242
|
679 |
if test x$video_x11_xme = xyes; then
|
slouken@242
|
680 |
CFLAGS="$CFLAGS -DHAVE_XIGXME"
|
slouken@242
|
681 |
SYSTEM_LIBS="$SYSTEM_LIBS -lxme"
|
slouken@242
|
682 |
fi
|
slouken@242
|
683 |
fi
|
slouken@0
|
684 |
fi
|
slouken@0
|
685 |
fi
|
slouken@0
|
686 |
}
|
slouken@279
|
687 |
|
slouken@292
|
688 |
dnl Find the X11 DGA 2.0 include and library directories
|
slouken@292
|
689 |
CheckDGA()
|
slouken@292
|
690 |
{
|
slouken@292
|
691 |
AC_ARG_ENABLE(video-dga,
|
slouken@292
|
692 |
[ --enable-video-dga use DGA 2.0 video driver [default=yes]],
|
slouken@292
|
693 |
, enable_video_dga=yes)
|
slouken@292
|
694 |
if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then
|
slouken@292
|
695 |
save_CFLAGS="$CFLAGS"; CFLAGS="$CFLAGS -Isrc/video"
|
slouken@292
|
696 |
AC_MSG_CHECKING(for XFree86 DGA 2.0 support)
|
slouken@292
|
697 |
video_x11_dga2=no
|
slouken@292
|
698 |
AC_TRY_COMPILE([
|
slouken@292
|
699 |
#include <X11/Xlib.h>
|
slouken@292
|
700 |
#include <XFree86/extensions/xf86dga.h>
|
slouken@292
|
701 |
],[
|
slouken@292
|
702 |
SDL_NAME(XDGAEvent) xevent;
|
slouken@292
|
703 |
],[
|
slouken@292
|
704 |
video_x11_dga2=yes
|
slouken@292
|
705 |
])
|
slouken@292
|
706 |
AC_MSG_RESULT($video_x11_dga2)
|
slouken@292
|
707 |
if test x$video_x11_dga2 = xyes; then
|
slouken@292
|
708 |
CFLAGS="$CFLAGS -DENABLE_DGA"
|
slouken@292
|
709 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga"
|
slouken@292
|
710 |
VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la"
|
slouken@292
|
711 |
fi
|
slouken@292
|
712 |
fi
|
slouken@292
|
713 |
}
|
slouken@292
|
714 |
|
slouken@0
|
715 |
CheckPHOTON()
|
slouken@0
|
716 |
{
|
slouken@0
|
717 |
AC_ARG_ENABLE(video-photon,
|
slouken@72
|
718 |
[ --enable-video-photon use QNX Photon video driver [default=yes]],
|
slouken@0
|
719 |
, enable_video_photon=yes)
|
slouken@0
|
720 |
if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
|
slouken@0
|
721 |
AC_MSG_CHECKING(for QNX Photon support)
|
slouken@0
|
722 |
video_photon=no
|
slouken@0
|
723 |
AC_TRY_COMPILE([
|
slouken@0
|
724 |
#include <Ph.h>
|
slouken@0
|
725 |
#include <Pt.h>
|
slouken@0
|
726 |
#include <photon/Pg.h>
|
slouken@0
|
727 |
#include <photon/PdDirect.h>
|
slouken@0
|
728 |
],[
|
slouken@0
|
729 |
PgDisplaySettings_t *visual;
|
slouken@0
|
730 |
],[
|
slouken@0
|
731 |
video_photon=yes
|
slouken@0
|
732 |
])
|
slouken@0
|
733 |
AC_MSG_RESULT($video_photon)
|
slouken@0
|
734 |
if test x$video_photon = xyes; then
|
slouken@19
|
735 |
CFLAGS="$CFLAGS -DENABLE_PHOTON"
|
slouken@0
|
736 |
SYSTEM_LIBS="$SYSTEM_LIBS -lph"
|
slouken@0
|
737 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon"
|
slouken@0
|
738 |
VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la"
|
slouken@279
|
739 |
CheckOpenGLQNX
|
slouken@0
|
740 |
fi
|
slouken@0
|
741 |
fi
|
slouken@0
|
742 |
}
|
slouken@0
|
743 |
|
slouken@0
|
744 |
dnl Find the framebuffer console includes
|
slouken@0
|
745 |
CheckFBCON()
|
slouken@0
|
746 |
{
|
slouken@0
|
747 |
AC_ARG_ENABLE(video-fbcon,
|
slouken@0
|
748 |
[ --enable-video-fbcon use framebuffer console video driver [default=yes]],
|
slouken@0
|
749 |
, enable_video_fbcon=yes)
|
slouken@0
|
750 |
if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
|
slouken@0
|
751 |
AC_MSG_CHECKING(for framebuffer console support)
|
slouken@0
|
752 |
video_fbcon=no
|
slouken@0
|
753 |
AC_TRY_COMPILE([
|
slouken@0
|
754 |
#include <linux/fb.h>
|
slouken@0
|
755 |
#include <linux/kd.h>
|
slouken@0
|
756 |
#include <linux/keyboard.h>
|
slouken@0
|
757 |
],[
|
slouken@0
|
758 |
],[
|
slouken@0
|
759 |
video_fbcon=yes
|
slouken@0
|
760 |
])
|
slouken@0
|
761 |
AC_MSG_RESULT($video_fbcon)
|
slouken@0
|
762 |
if test x$video_fbcon = xyes; then
|
slouken@0
|
763 |
CFLAGS="$CFLAGS -DENABLE_FBCON"
|
slouken@0
|
764 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon"
|
slouken@0
|
765 |
VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la"
|
slouken@0
|
766 |
fi
|
slouken@0
|
767 |
fi
|
slouken@0
|
768 |
}
|
slouken@0
|
769 |
|
slouken@167
|
770 |
dnl Find DirectFB
|
slouken@167
|
771 |
CheckDirectFB()
|
slouken@167
|
772 |
{
|
slouken@167
|
773 |
AC_ARG_ENABLE(video-directfb,
|
slouken@167
|
774 |
[ --enable-video-directfb use DirectFB video driver [default=yes]],
|
slouken@167
|
775 |
, enable_video_directfb=yes)
|
slouken@167
|
776 |
if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
|
slouken@167
|
777 |
video_directfb=no
|
slouken@167
|
778 |
|
slouken@167
|
779 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
slouken@167
|
780 |
if test x$PKG_CONFIG = xno ; then
|
slouken@167
|
781 |
AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
|
slouken@167
|
782 |
else
|
slouken@167
|
783 |
AC_MSG_CHECKING(for DirectFB support)
|
slouken@167
|
784 |
|
slouken@222
|
785 |
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.5 ; then
|
slouken@167
|
786 |
AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
|
slouken@167
|
787 |
fi
|
slouken@167
|
788 |
|
slouken@382
|
789 |
DIRECTFB_REQUIRED_VERSION=0.9.11
|
slouken@167
|
790 |
|
slouken@167
|
791 |
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
|
slouken@167
|
792 |
DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
|
slouken@167
|
793 |
DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
|
slouken@167
|
794 |
video_directfb=yes
|
slouken@167
|
795 |
fi
|
slouken@167
|
796 |
fi
|
slouken@167
|
797 |
|
slouken@167
|
798 |
AC_MSG_RESULT($video_directfb)
|
slouken@167
|
799 |
if test x$video_directfb = xyes; then
|
slouken@167
|
800 |
CFLAGS="$CFLAGS -DENABLE_DIRECTFB"
|
slouken@167
|
801 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS directfb"
|
slouken@167
|
802 |
VIDEO_DRIVERS="$VIDEO_DRIVERS directfb/libvideo_directfb.la"
|
slouken@167
|
803 |
|
slouken@167
|
804 |
AC_SUBST(DIRECTFB_CFLAGS)
|
slouken@167
|
805 |
AC_SUBST(DIRECTFB_LIBS)
|
slouken@167
|
806 |
fi
|
slouken@167
|
807 |
fi
|
slouken@167
|
808 |
}
|
slouken@167
|
809 |
|
slouken@70
|
810 |
dnl See if we're running on PlayStation 2 hardware
|
slouken@70
|
811 |
CheckPS2GS()
|
slouken@70
|
812 |
{
|
slouken@72
|
813 |
AC_ARG_ENABLE(video-ps2gs,
|
slouken@72
|
814 |
[ --enable-video-ps2gs use PlayStation 2 GS video driver [default=yes]],
|
slouken@72
|
815 |
, enable_video_ps2gs=yes)
|
slouken@70
|
816 |
if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
|
slouken@72
|
817 |
AC_MSG_CHECKING(for PlayStation 2 GS support)
|
slouken@70
|
818 |
video_ps2gs=no
|
slouken@70
|
819 |
AC_TRY_COMPILE([
|
slouken@70
|
820 |
#include <linux/ps2/dev.h>
|
slouken@70
|
821 |
#include <linux/ps2/gs.h>
|
slouken@70
|
822 |
],[
|
slouken@70
|
823 |
],[
|
slouken@70
|
824 |
video_ps2gs=yes
|
slouken@70
|
825 |
])
|
slouken@72
|
826 |
AC_MSG_RESULT($video_ps2gs)
|
slouken@70
|
827 |
if test x$video_ps2gs = xyes; then
|
slouken@70
|
828 |
CFLAGS="$CFLAGS -DENABLE_PS2GS"
|
slouken@70
|
829 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ps2gs"
|
slouken@70
|
830 |
VIDEO_DRIVERS="$VIDEO_DRIVERS ps2gs/libvideo_ps2gs.la"
|
slouken@70
|
831 |
fi
|
slouken@70
|
832 |
fi
|
slouken@70
|
833 |
}
|
slouken@70
|
834 |
|
slouken@0
|
835 |
dnl Find the GGI includes
|
slouken@0
|
836 |
CheckGGI()
|
slouken@0
|
837 |
{
|
slouken@0
|
838 |
AC_ARG_ENABLE(video-ggi,
|
slouken@0
|
839 |
[ --enable-video-ggi use GGI video driver [default=no]],
|
slouken@0
|
840 |
, enable_video_ggi=no)
|
slouken@0
|
841 |
if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
|
slouken@0
|
842 |
AC_MSG_CHECKING(for GGI support)
|
slouken@0
|
843 |
video_ggi=no
|
slouken@0
|
844 |
AC_TRY_COMPILE([
|
slouken@0
|
845 |
#include <ggi/ggi.h>
|
slouken@0
|
846 |
#include <ggi/gii.h>
|
slouken@0
|
847 |
],[
|
slouken@0
|
848 |
],[
|
slouken@0
|
849 |
video_ggi=yes
|
slouken@0
|
850 |
])
|
slouken@0
|
851 |
AC_MSG_RESULT($video_ggi)
|
slouken@0
|
852 |
if test x$video_ggi = xyes; then
|
slouken@0
|
853 |
CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI"
|
slouken@0
|
854 |
SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg"
|
slouken@0
|
855 |
|
slouken@0
|
856 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi"
|
slouken@0
|
857 |
VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la"
|
slouken@0
|
858 |
fi
|
slouken@0
|
859 |
fi
|
slouken@0
|
860 |
}
|
slouken@0
|
861 |
|
slouken@0
|
862 |
dnl Find the SVGAlib includes and libraries
|
slouken@0
|
863 |
CheckSVGA()
|
slouken@0
|
864 |
{
|
slouken@0
|
865 |
AC_ARG_ENABLE(video-svga,
|
slouken@0
|
866 |
[ --enable-video-svga use SVGAlib video driver [default=no]],
|
slouken@0
|
867 |
, enable_video_svga=no)
|
slouken@0
|
868 |
if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
|
slouken@0
|
869 |
AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
|
slouken@0
|
870 |
video_svga=no
|
slouken@0
|
871 |
AC_TRY_COMPILE([
|
slouken@0
|
872 |
#include <vga.h>
|
slouken@0
|
873 |
#include <vgamouse.h>
|
slouken@0
|
874 |
#include <vgakeyboard.h>
|
slouken@0
|
875 |
],[
|
slouken@0
|
876 |
if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
|
slouken@0
|
877 |
exit(0);
|
slouken@0
|
878 |
}
|
slouken@0
|
879 |
],[
|
slouken@0
|
880 |
video_svga=yes
|
slouken@0
|
881 |
])
|
slouken@0
|
882 |
AC_MSG_RESULT($video_svga)
|
slouken@0
|
883 |
if test x$video_svga = xyes; then
|
slouken@0
|
884 |
CFLAGS="$CFLAGS -DENABLE_SVGALIB"
|
slouken@0
|
885 |
SYSTEM_LIBS="$SYSTEM_LIBS -lvga"
|
slouken@0
|
886 |
|
slouken@0
|
887 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga"
|
slouken@0
|
888 |
VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la"
|
slouken@0
|
889 |
fi
|
slouken@0
|
890 |
fi
|
slouken@0
|
891 |
}
|
slouken@0
|
892 |
|
slouken@75
|
893 |
dnl Find the VGL includes and libraries
|
slouken@75
|
894 |
CheckVGL()
|
slouken@75
|
895 |
{
|
slouken@75
|
896 |
AC_ARG_ENABLE(video-vgl,
|
slouken@75
|
897 |
[ --enable-video-vgl use VGL video driver [default=no]],
|
slouken@75
|
898 |
, enable_video_vgl=no)
|
slouken@75
|
899 |
if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
|
slouken@75
|
900 |
AC_MSG_CHECKING(for libVGL support)
|
slouken@75
|
901 |
video_vgl=no
|
slouken@75
|
902 |
AC_TRY_COMPILE([
|
slouken@75
|
903 |
#include <sys/fbio.h>
|
slouken@75
|
904 |
#include <sys/consio.h>
|
slouken@75
|
905 |
#include <sys/kbio.h>
|
slouken@75
|
906 |
#include <vgl.h>
|
slouken@75
|
907 |
],[
|
slouken@75
|
908 |
VGLBitmap bitmap;
|
slouken@144
|
909 |
exit(bitmap.Bitmap);
|
slouken@75
|
910 |
],[
|
slouken@75
|
911 |
video_vgl=yes
|
slouken@75
|
912 |
])
|
slouken@75
|
913 |
AC_MSG_RESULT($video_vgl)
|
slouken@75
|
914 |
if test x$video_vgl = xyes; then
|
slouken@75
|
915 |
CFLAGS="$CFLAGS -DENABLE_VGL"
|
slouken@75
|
916 |
SYSTEM_LIBS="$SYSTEM_LIBS -lvgl"
|
slouken@75
|
917 |
|
slouken@75
|
918 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS vgl"
|
slouken@75
|
919 |
VIDEO_DRIVERS="$VIDEO_DRIVERS vgl/libvideo_vgl.la"
|
slouken@75
|
920 |
fi
|
slouken@75
|
921 |
fi
|
slouken@75
|
922 |
}
|
slouken@75
|
923 |
|
slouken@0
|
924 |
dnl Find the AAlib includes
|
slouken@0
|
925 |
CheckAAlib()
|
slouken@0
|
926 |
{
|
slouken@0
|
927 |
AC_ARG_ENABLE(video-aalib,
|
slouken@0
|
928 |
[ --enable-video-aalib use AAlib video driver [default=no]],
|
slouken@0
|
929 |
, enable_video_aalib=no)
|
slouken@0
|
930 |
if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
|
slouken@0
|
931 |
AC_MSG_CHECKING(for AAlib support)
|
slouken@0
|
932 |
video_aalib=no
|
slouken@0
|
933 |
AC_TRY_COMPILE([
|
slouken@0
|
934 |
#include <aalib.h>
|
slouken@0
|
935 |
],[
|
slouken@0
|
936 |
],[
|
slouken@0
|
937 |
video_aalib=yes
|
slouken@0
|
938 |
])
|
slouken@0
|
939 |
AC_MSG_RESULT($video_aalib)
|
slouken@0
|
940 |
if test x$video_aalib = xyes; then
|
slouken@0
|
941 |
CFLAGS="$CFLAGS -DENABLE_AALIB"
|
slouken@0
|
942 |
SYSTEM_LIBS="$SYSTEM_LIBS -laa"
|
slouken@0
|
943 |
|
slouken@0
|
944 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib"
|
slouken@0
|
945 |
VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la"
|
slouken@0
|
946 |
fi
|
slouken@0
|
947 |
fi
|
slouken@0
|
948 |
}
|
slouken@0
|
949 |
|
slouken@281
|
950 |
dnl Set up the Atari Xbios driver
|
slouken@281
|
951 |
CheckAtariXbiosVideo()
|
slouken@281
|
952 |
{
|
slouken@281
|
953 |
AC_ARG_ENABLE(xbios,
|
slouken@281
|
954 |
[ --enable-video-xbios use Atari Xbios video driver [default=yes]],
|
slouken@281
|
955 |
, enable_video_xbios=yes)
|
slouken@281
|
956 |
video_xbios=no
|
slouken@281
|
957 |
if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
|
slouken@281
|
958 |
video_xbios=yes
|
slouken@281
|
959 |
CFLAGS="$CFLAGS -DENABLE_XBIOS"
|
slouken@281
|
960 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS xbios"
|
slouken@281
|
961 |
VIDEO_DRIVERS="$VIDEO_DRIVERS xbios/libvideo_xbios.la"
|
slouken@281
|
962 |
fi
|
slouken@281
|
963 |
}
|
slouken@281
|
964 |
|
slouken@281
|
965 |
dnl Set up the Atari Gem driver
|
slouken@281
|
966 |
CheckAtariGemVideo()
|
slouken@281
|
967 |
{
|
slouken@281
|
968 |
AC_ARG_ENABLE(gem,
|
slouken@281
|
969 |
[ --enable-video-gem use Atari Gem video driver [default=yes]],
|
slouken@281
|
970 |
, enable_video_gem=yes)
|
slouken@281
|
971 |
if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
|
slouken@281
|
972 |
video_gem=no
|
slouken@281
|
973 |
AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
|
slouken@281
|
974 |
AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
|
slouken@281
|
975 |
if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
|
slouken@281
|
976 |
video_gem=yes
|
slouken@281
|
977 |
CFLAGS="$CFLAGS -DENABLE_GEM"
|
slouken@281
|
978 |
SYSTEM_LIBS="$SYSTEM_LIBS -lgem"
|
slouken@281
|
979 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS gem"
|
slouken@281
|
980 |
VIDEO_DRIVERS="$VIDEO_DRIVERS gem/libvideo_gem.la"
|
slouken@281
|
981 |
fi
|
slouken@281
|
982 |
fi
|
slouken@281
|
983 |
}
|
slouken@281
|
984 |
|
slouken@281
|
985 |
dnl Set up the Atari Bios keyboard driver
|
slouken@281
|
986 |
CheckAtariBiosEvent()
|
slouken@281
|
987 |
{
|
slouken@281
|
988 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/ataricommon"
|
slouken@281
|
989 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS ataricommon"
|
slouken@281
|
990 |
VIDEO_DRIVERS="$VIDEO_DRIVERS ataricommon/libvideo_ataricommon.la"
|
slouken@281
|
991 |
}
|
slouken@281
|
992 |
|
slouken@1
|
993 |
dnl rcg04172001 Set up the Null video driver.
|
slouken@1
|
994 |
CheckDummyVideo()
|
slouken@1
|
995 |
{
|
slouken@1
|
996 |
AC_ARG_ENABLE(video-dummy,
|
slouken@86
|
997 |
[ --enable-video-dummy use dummy video driver [default=yes]],
|
slouken@86
|
998 |
, enable_video_dummy=yes)
|
slouken@1
|
999 |
if test x$enable_video_dummy = xyes; then
|
slouken@1
|
1000 |
CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO"
|
slouken@1
|
1001 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy"
|
slouken@1
|
1002 |
VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la"
|
slouken@1
|
1003 |
fi
|
slouken@1
|
1004 |
}
|
slouken@1
|
1005 |
|
slouken@0
|
1006 |
dnl Check to see if OpenGL support is desired
|
slouken@0
|
1007 |
AC_ARG_ENABLE(video-opengl,
|
slouken@0
|
1008 |
[ --enable-video-opengl include OpenGL context creation [default=yes]],
|
slouken@0
|
1009 |
, enable_video_opengl=yes)
|
slouken@0
|
1010 |
|
slouken@0
|
1011 |
dnl Find OpenGL
|
slouken@0
|
1012 |
CheckOpenGL()
|
slouken@0
|
1013 |
{
|
slouken@0
|
1014 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@0
|
1015 |
AC_MSG_CHECKING(for OpenGL (GLX) support)
|
slouken@0
|
1016 |
video_opengl=no
|
slouken@0
|
1017 |
AC_TRY_COMPILE([
|
slouken@0
|
1018 |
#include <GL/gl.h>
|
slouken@0
|
1019 |
#include <GL/glx.h>
|
slouken@0
|
1020 |
#include <dlfcn.h> /* For loading extensions */
|
slouken@0
|
1021 |
],[
|
slouken@0
|
1022 |
],[
|
slouken@0
|
1023 |
video_opengl=yes
|
slouken@0
|
1024 |
])
|
slouken@0
|
1025 |
AC_MSG_RESULT($video_opengl)
|
slouken@0
|
1026 |
if test x$video_opengl = xyes; then
|
slouken@0
|
1027 |
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
slouken@296
|
1028 |
if test x$use_dlopen != xyes; then
|
slouken@296
|
1029 |
AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
|
slouken@296
|
1030 |
fi
|
slouken@0
|
1031 |
fi
|
slouken@0
|
1032 |
fi
|
slouken@0
|
1033 |
}
|
slouken@0
|
1034 |
|
slouken@279
|
1035 |
dnl Find QNX RtP OpenGL
|
slouken@279
|
1036 |
CheckOpenGLQNX()
|
slouken@279
|
1037 |
{
|
slouken@279
|
1038 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@279
|
1039 |
AC_MSG_CHECKING(for OpenGL (Photon) support)
|
slouken@279
|
1040 |
video_opengl=no
|
slouken@279
|
1041 |
AC_TRY_COMPILE([
|
slouken@279
|
1042 |
#include <GL/gl.h>
|
slouken@279
|
1043 |
],[
|
slouken@279
|
1044 |
],[
|
slouken@279
|
1045 |
video_opengl=yes
|
slouken@279
|
1046 |
])
|
slouken@279
|
1047 |
AC_MSG_RESULT($video_opengl)
|
slouken@279
|
1048 |
if test x$video_opengl = xyes; then
|
slouken@279
|
1049 |
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
slouken@279
|
1050 |
SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
|
slouken@279
|
1051 |
fi
|
slouken@279
|
1052 |
fi
|
slouken@279
|
1053 |
}
|
slouken@279
|
1054 |
|
slouken@0
|
1055 |
dnl Check for BeOS OpenGL
|
slouken@0
|
1056 |
CheckBeGL()
|
slouken@0
|
1057 |
{
|
slouken@0
|
1058 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@0
|
1059 |
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
slouken@0
|
1060 |
SYSTEM_LIBS="$SYSTEM_LIBS -lGL"
|
slouken@0
|
1061 |
fi
|
slouken@0
|
1062 |
}
|
slouken@0
|
1063 |
|
slouken@0
|
1064 |
dnl Check for MacOS OpenGL
|
slouken@0
|
1065 |
CheckMacGL()
|
slouken@0
|
1066 |
{
|
slouken@0
|
1067 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@0
|
1068 |
CFLAGS="$CFLAGS -DHAVE_OPENGL"
|
slouken@0
|
1069 |
case "$target" in
|
slouken@0
|
1070 |
*-*-darwin*)
|
slouken@387
|
1071 |
SYSTEM_LIBS="$SYSTEM_LIBS -framework OpenGL -framework AGL"
|
slouken@0
|
1072 |
esac
|
slouken@0
|
1073 |
fi
|
slouken@0
|
1074 |
}
|
slouken@0
|
1075 |
|
slouken@0
|
1076 |
dnl See if we can use the new unified event interface in Linux 2.4
|
slouken@0
|
1077 |
CheckInputEvents()
|
slouken@0
|
1078 |
{
|
slouken@0
|
1079 |
dnl Check for Linux 2.4 unified input event interface support
|
slouken@0
|
1080 |
AC_ARG_ENABLE(input-events,
|
slouken@211
|
1081 |
[ --enable-input-events use Linux 2.4 unified input interface [default=yes]],
|
slouken@211
|
1082 |
, enable_input_events=yes)
|
slouken@0
|
1083 |
if test x$enable_input_events = xyes; then
|
slouken@0
|
1084 |
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
slouken@0
|
1085 |
use_input_events=no
|
slouken@0
|
1086 |
AC_TRY_COMPILE([
|
slouken@0
|
1087 |
#include <linux/input.h>
|
slouken@0
|
1088 |
],[
|
slouken@0
|
1089 |
#ifndef EVIOCGNAME
|
slouken@0
|
1090 |
#error EVIOCGNAME() ioctl not available
|
slouken@0
|
1091 |
#endif
|
slouken@0
|
1092 |
],[
|
slouken@0
|
1093 |
use_input_events=yes
|
slouken@0
|
1094 |
])
|
slouken@0
|
1095 |
AC_MSG_RESULT($use_input_events)
|
slouken@0
|
1096 |
if test x$use_input_events = xyes; then
|
slouken@0
|
1097 |
CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS"
|
slouken@0
|
1098 |
fi
|
slouken@0
|
1099 |
fi
|
slouken@0
|
1100 |
}
|
slouken@0
|
1101 |
|
slouken@399
|
1102 |
dnl See if we can use GNU pth library for threads
|
slouken@399
|
1103 |
CheckPTH()
|
slouken@399
|
1104 |
{
|
slouken@399
|
1105 |
dnl Check for pth support
|
slouken@399
|
1106 |
AC_ARG_ENABLE(pth,
|
slouken@399
|
1107 |
[ --enable-pth use GNU pth library for multi-threading [default=yes]],
|
slouken@399
|
1108 |
, enable_pth=yes)
|
slouken@399
|
1109 |
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
slouken@399
|
1110 |
AC_PATH_PROG(PTH_CONFIG, pth-config, no)
|
slouken@399
|
1111 |
if test "$PTH_CONFIG" = "no"; then
|
slouken@399
|
1112 |
use_pth=no
|
slouken@399
|
1113 |
else
|
slouken@399
|
1114 |
PTH_CFLAGS=`$PTH_CONFIG --cflags`
|
slouken@399
|
1115 |
PTH_LIBS=`$PTH_CONFIG --libs --all`
|
slouken@399
|
1116 |
SDL_CFLAGS="$SDL_CFLAGS $PTH_CFLAGS"
|
slouken@399
|
1117 |
SDL_LIBS="$SDL_LIBS $PTH_LIBS"
|
slouken@399
|
1118 |
CFLAGS="$CFLAGS -DENABLE_PTH"
|
slouken@399
|
1119 |
use_pth=yes
|
slouken@399
|
1120 |
fi
|
slouken@399
|
1121 |
AC_MSG_CHECKING(pth)
|
slouken@399
|
1122 |
if test "x$use_pth" = xyes; then
|
slouken@399
|
1123 |
AC_MSG_RESULT(yes)
|
slouken@399
|
1124 |
else
|
slouken@399
|
1125 |
AC_MSG_RESULT(no)
|
slouken@399
|
1126 |
fi
|
slouken@399
|
1127 |
fi
|
slouken@399
|
1128 |
}
|
slouken@399
|
1129 |
|
slouken@0
|
1130 |
dnl See what type of thread model to use on Linux and Solaris
|
slouken@0
|
1131 |
CheckPTHREAD()
|
slouken@0
|
1132 |
{
|
slouken@0
|
1133 |
dnl Check for pthread support
|
slouken@0
|
1134 |
AC_ARG_ENABLE(pthreads,
|
slouken@0
|
1135 |
[ --enable-pthreads use POSIX threads for multi-threading [default=yes]],
|
slouken@0
|
1136 |
, enable_pthreads=yes)
|
slouken@0
|
1137 |
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
slouken@0
|
1138 |
AC_ARG_ENABLE(pthread-sem,
|
slouken@86
|
1139 |
[ --enable-pthread-sem use pthread semaphores [default=yes]],
|
slouken@0
|
1140 |
, enable_pthread_sem=yes)
|
slouken@401
|
1141 |
ac_save_cflags="$CFLAGS"
|
slouken@0
|
1142 |
ac_save_libs="$LIBS"
|
slouken@0
|
1143 |
case "$target" in
|
slouken@0
|
1144 |
*-*-bsdi*)
|
slouken@0
|
1145 |
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1146 |
pthread_lib=""
|
slouken@0
|
1147 |
;;
|
slouken@0
|
1148 |
*-*-darwin*)
|
slouken@0
|
1149 |
pthread_cflags="-D_THREAD_SAFE"
|
slouken@0
|
1150 |
# causes Carbon.p complaints?
|
slouken@0
|
1151 |
# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1152 |
;;
|
slouken@0
|
1153 |
*-*-freebsd*)
|
slouken@0
|
1154 |
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1155 |
pthread_lib="-pthread"
|
slouken@0
|
1156 |
;;
|
slouken@43
|
1157 |
*-*-netbsd*)
|
slouken@43
|
1158 |
pthread_cflags="-I/usr/pkg/include -D_REENTRANT"
|
slouken@43
|
1159 |
pthread_lib="-L/usr/pkg/lib -lpthread -lsem"
|
slouken@43
|
1160 |
;;
|
slouken@0
|
1161 |
*-*-openbsd*)
|
slouken@0
|
1162 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1163 |
pthread_lib="-pthread"
|
slouken@0
|
1164 |
;;
|
slouken@0
|
1165 |
*-*-solaris*)
|
slouken@0
|
1166 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1167 |
pthread_lib="-lpthread -lposix4"
|
slouken@0
|
1168 |
;;
|
slouken@0
|
1169 |
*-*-sysv5*)
|
slouken@0
|
1170 |
pthread_cflags="-D_REENTRANT -Kthread"
|
slouken@0
|
1171 |
pthread_lib=""
|
slouken@0
|
1172 |
;;
|
slouken@0
|
1173 |
*-*-irix*)
|
slouken@0
|
1174 |
pthread_cflags="-D_SGI_MP_SOURCE"
|
slouken@0
|
1175 |
pthread_lib="-lpthread"
|
slouken@0
|
1176 |
;;
|
slouken@0
|
1177 |
*-*-aix*)
|
slouken@0
|
1178 |
pthread_cflags="-D_REENTRANT -mthreads"
|
slouken@0
|
1179 |
pthread_lib="-lpthread"
|
slouken@0
|
1180 |
;;
|
slouken@0
|
1181 |
*-*-qnx*)
|
slouken@0
|
1182 |
pthread_cflags=""
|
slouken@0
|
1183 |
pthread_lib=""
|
slouken@0
|
1184 |
;;
|
slouken@0
|
1185 |
*)
|
slouken@0
|
1186 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1187 |
pthread_lib="-lpthread"
|
slouken@0
|
1188 |
;;
|
slouken@0
|
1189 |
esac
|
slouken@401
|
1190 |
CFLAGS="$CFLAGS $pthread_cflags"
|
slouken@0
|
1191 |
LIBS="$LIBS $pthread_lib"
|
slouken@0
|
1192 |
if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then
|
slouken@0
|
1193 |
AC_MSG_CHECKING(for pthreads)
|
slouken@0
|
1194 |
use_pthreads=no
|
slouken@0
|
1195 |
AC_TRY_LINK([
|
slouken@0
|
1196 |
#include <pthread.h>
|
slouken@0
|
1197 |
],[
|
slouken@0
|
1198 |
pthread_attr_t type;
|
slouken@0
|
1199 |
pthread_attr_init(&type);
|
slouken@0
|
1200 |
],[
|
slouken@0
|
1201 |
use_pthreads=yes
|
slouken@0
|
1202 |
])
|
slouken@0
|
1203 |
AC_MSG_RESULT($use_pthreads)
|
slouken@0
|
1204 |
if test x$use_pthreads = xyes; then
|
slouken@0
|
1205 |
CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS"
|
slouken@0
|
1206 |
SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
|
slouken@0
|
1207 |
SDL_LIBS="$SDL_LIBS $pthread_lib"
|
slouken@0
|
1208 |
|
slouken@0
|
1209 |
# Check to see if recursive mutexes are available
|
slouken@0
|
1210 |
AC_MSG_CHECKING(for recursive mutexes)
|
slouken@0
|
1211 |
has_recursive_mutexes=no
|
slouken@0
|
1212 |
AC_TRY_LINK([
|
slouken@0
|
1213 |
#include <pthread.h>
|
slouken@0
|
1214 |
],[
|
slouken@0
|
1215 |
pthread_mutexattr_t attr;
|
slouken@371
|
1216 |
#if defined(linux) && !(defined(__arm__) && defined(QWS))
|
slouken@0
|
1217 |
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
slouken@0
|
1218 |
#else
|
slouken@0
|
1219 |
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
slouken@0
|
1220 |
#endif
|
slouken@0
|
1221 |
],[
|
slouken@0
|
1222 |
has_recursive_mutexes=yes
|
slouken@0
|
1223 |
])
|
slouken@0
|
1224 |
# Some systems have broken recursive mutex implementations
|
slouken@0
|
1225 |
case "$target" in
|
slouken@399
|
1226 |
*-*-darwin*)
|
slouken@399
|
1227 |
has_recursive_mutexes=no
|
slouken@399
|
1228 |
;;
|
slouken@0
|
1229 |
*-*-solaris*)
|
slouken@0
|
1230 |
has_recursive_mutexes=no
|
slouken@0
|
1231 |
;;
|
slouken@0
|
1232 |
esac
|
slouken@0
|
1233 |
AC_MSG_RESULT($has_recursive_mutexes)
|
slouken@0
|
1234 |
if test x$has_recursive_mutexes != xyes; then
|
slouken@0
|
1235 |
CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX"
|
slouken@0
|
1236 |
fi
|
slouken@0
|
1237 |
|
slouken@94
|
1238 |
# Check to see if pthread semaphore support is missing
|
slouken@94
|
1239 |
if test x$enable_pthread_sem = xyes; then
|
slouken@94
|
1240 |
AC_MSG_CHECKING(for pthread semaphores)
|
slouken@94
|
1241 |
have_pthread_sem=no
|
slouken@94
|
1242 |
AC_TRY_COMPILE([
|
slouken@94
|
1243 |
#include <pthread.h>
|
slouken@94
|
1244 |
#include <semaphore.h>
|
slouken@94
|
1245 |
],[
|
slouken@94
|
1246 |
],[
|
slouken@94
|
1247 |
have_pthread_sem=yes
|
slouken@94
|
1248 |
])
|
slouken@94
|
1249 |
AC_MSG_RESULT($have_pthread_sem)
|
slouken@94
|
1250 |
fi
|
slouken@94
|
1251 |
|
slouken@0
|
1252 |
# Check to see if this is broken glibc 2.0 pthreads
|
slouken@0
|
1253 |
case "$target" in
|
slouken@0
|
1254 |
*-*-linux*)
|
slouken@0
|
1255 |
AC_MSG_CHECKING(for broken glibc 2.0 pthreads)
|
slouken@0
|
1256 |
glibc20_pthreads=no
|
slouken@0
|
1257 |
AC_TRY_COMPILE([
|
slouken@0
|
1258 |
#include <features.h>
|
slouken@0
|
1259 |
#if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0)
|
slouken@0
|
1260 |
#warning Working around a bug in glibc 2.0 pthreads
|
slouken@0
|
1261 |
#else
|
slouken@0
|
1262 |
#error pthread implementation okay
|
slouken@0
|
1263 |
#endif /* glibc 2.0 */
|
slouken@0
|
1264 |
],[
|
slouken@0
|
1265 |
],[
|
slouken@0
|
1266 |
glibc20_pthreads=yes
|
slouken@0
|
1267 |
])
|
slouken@0
|
1268 |
AC_MSG_RESULT($glibc20_pthreads)
|
slouken@0
|
1269 |
esac
|
slouken@0
|
1270 |
fi
|
slouken@0
|
1271 |
fi
|
slouken@401
|
1272 |
CFLAGS="$ac_save_cflags"
|
slouken@0
|
1273 |
LIBS="$ac_save_libs"
|
slouken@0
|
1274 |
|
slouken@0
|
1275 |
AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h)
|
slouken@0
|
1276 |
have_semun=no
|
slouken@0
|
1277 |
AC_TRY_COMPILE([
|
slouken@0
|
1278 |
#include <sys/types.h>
|
slouken@0
|
1279 |
#include <sys/sem.h>
|
slouken@0
|
1280 |
],[
|
slouken@0
|
1281 |
union semun t;
|
slouken@0
|
1282 |
],[
|
slouken@0
|
1283 |
have_semun=yes
|
slouken@0
|
1284 |
])
|
slouken@0
|
1285 |
AC_MSG_RESULT($have_semun)
|
slouken@0
|
1286 |
if test x$have_semun = xyes; then
|
slouken@0
|
1287 |
CFLAGS="$CFLAGS -DHAVE_SEMUN"
|
slouken@0
|
1288 |
fi
|
slouken@0
|
1289 |
|
slouken@399
|
1290 |
# See if we can use GNU Pth or clone() on Linux directly
|
slouken@0
|
1291 |
if test x$enable_threads = xyes -a x$use_pthreads != xyes; then
|
slouken@399
|
1292 |
CheckPTH
|
slouken@399
|
1293 |
if test x$use_pth != xyes; then
|
slouken@399
|
1294 |
case "$target" in
|
slouken@399
|
1295 |
*-*-linux*)
|
slouken@399
|
1296 |
use_clone=yes
|
slouken@399
|
1297 |
;;
|
slouken@399
|
1298 |
esac
|
slouken@399
|
1299 |
fi
|
slouken@0
|
1300 |
fi
|
slouken@0
|
1301 |
}
|
slouken@0
|
1302 |
|
slouken@399
|
1303 |
# Note that we need to have either semaphores or to have mutexes and
|
slouken@399
|
1304 |
# condition variables to implement all thread synchronization primitives
|
slouken@399
|
1305 |
CopyUnixThreadSource()
|
slouken@185
|
1306 |
{
|
slouken@399
|
1307 |
if test x$use_pthreads = xyes -o x$use_clone = xyes; then
|
slouken@399
|
1308 |
# Basic thread creation functions
|
slouken@399
|
1309 |
COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c)
|
slouken@399
|
1310 |
if test x$use_pthreads != xyes; then
|
slouken@399
|
1311 |
COPY_ARCH_SRC(src/thread, linux, clone.S)
|
slouken@399
|
1312 |
fi
|
slouken@399
|
1313 |
COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
|
slouken@399
|
1314 |
|
slouken@399
|
1315 |
# Semaphores
|
slouken@399
|
1316 |
# We can fake these with mutexes and condition variables if necessary
|
slouken@399
|
1317 |
if test x$use_pthreads = xyes -a x$have_pthread_sem != xyes; then
|
slouken@399
|
1318 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
slouken@185
|
1319 |
else
|
slouken@399
|
1320 |
COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
|
slouken@185
|
1321 |
fi
|
slouken@399
|
1322 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@399
|
1323 |
|
slouken@399
|
1324 |
# Mutexes
|
slouken@399
|
1325 |
# We can fake these with semaphores if necessary
|
slouken@399
|
1326 |
case "$target" in
|
slouken@399
|
1327 |
*-*-bsdi*)
|
slouken@399
|
1328 |
COPY_ARCH_SRC(src/thread, bsdi, SDL_syssem.c)
|
slouken@399
|
1329 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@399
|
1330 |
;;
|
slouken@399
|
1331 |
*)
|
slouken@399
|
1332 |
if test x$glibc20_pthreads = xyes; then
|
slouken@399
|
1333 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
slouken@399
|
1334 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
slouken@399
|
1335 |
else
|
slouken@399
|
1336 |
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
slouken@399
|
1337 |
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
slouken@399
|
1338 |
fi
|
slouken@399
|
1339 |
;;
|
slouken@399
|
1340 |
esac
|
slouken@399
|
1341 |
|
slouken@399
|
1342 |
# Condition variables
|
slouken@399
|
1343 |
# We can fake these with semaphores and mutexes if necessary
|
slouken@399
|
1344 |
if test x$glibc20_pthreads = xyes -o x$has_recursive_mutexes != xyes; then
|
slouken@399
|
1345 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@185
|
1346 |
else
|
slouken@399
|
1347 |
COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
|
slouken@185
|
1348 |
fi
|
slouken@399
|
1349 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@399
|
1350 |
|
slouken@400
|
1351 |
elif test x$use_pth = xyes; then
|
slouken@399
|
1352 |
COPY_ARCH_SRC(src/thread, pth, SDL_systhread.c)
|
slouken@399
|
1353 |
COPY_ARCH_SRC(src/thread, pth, SDL_systhread_c.h)
|
slouken@399
|
1354 |
COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex.c)
|
slouken@399
|
1355 |
COPY_ARCH_SRC(src/thread, pth, SDL_sysmutex_c.h)
|
slouken@399
|
1356 |
COPY_ARCH_SRC(src/thread, pth, SDL_syscond.c)
|
slouken@399
|
1357 |
COPY_ARCH_SRC(src/thread, pth, SDL_syscond_c.h)
|
slouken@399
|
1358 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
|
slouken@399
|
1359 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@399
|
1360 |
else
|
slouken@399
|
1361 |
AC_MSG_ERROR([
|
slouken@399
|
1362 |
*** No thread support detected
|
slouken@399
|
1363 |
])
|
slouken@185
|
1364 |
fi
|
slouken@185
|
1365 |
}
|
slouken@185
|
1366 |
|
slouken@0
|
1367 |
dnl Determine whether the compiler can produce Win32 executables
|
slouken@0
|
1368 |
CheckWIN32()
|
slouken@0
|
1369 |
{
|
slouken@0
|
1370 |
AC_MSG_CHECKING(Win32 compiler)
|
slouken@0
|
1371 |
have_win32_gcc=no
|
slouken@0
|
1372 |
AC_TRY_COMPILE([
|
slouken@0
|
1373 |
#include <windows.h>
|
slouken@0
|
1374 |
],[
|
slouken@0
|
1375 |
],[
|
slouken@0
|
1376 |
have_win32_gcc=yes
|
slouken@0
|
1377 |
])
|
slouken@0
|
1378 |
AC_MSG_RESULT($have_win32_gcc)
|
slouken@0
|
1379 |
if test x$have_win32_gcc != xyes; then
|
slouken@0
|
1380 |
AC_MSG_ERROR([
|
slouken@0
|
1381 |
*** Your compiler ($CC) does not produce Win32 executables!
|
slouken@0
|
1382 |
])
|
slouken@0
|
1383 |
fi
|
slouken@0
|
1384 |
|
slouken@0
|
1385 |
dnl See if the user wants to redirect standard output to files
|
slouken@0
|
1386 |
AC_ARG_ENABLE(stdio-redirect,
|
slouken@0
|
1387 |
[ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]],
|
slouken@0
|
1388 |
, enable_stdio_redirect=yes)
|
slouken@0
|
1389 |
if test x$enable_stdio_redirect != xyes; then
|
slouken@0
|
1390 |
CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT"
|
slouken@0
|
1391 |
fi
|
slouken@0
|
1392 |
}
|
slouken@0
|
1393 |
|
slouken@0
|
1394 |
dnl Find the DirectX includes and libraries
|
slouken@0
|
1395 |
CheckDIRECTX()
|
slouken@0
|
1396 |
{
|
slouken@0
|
1397 |
AC_ARG_ENABLE(directx,
|
slouken@0
|
1398 |
[ --enable-directx use DirectX for Win32 audio/video [default=yes]],
|
slouken@0
|
1399 |
, enable_directx=yes)
|
slouken@0
|
1400 |
if test x$enable_directx = xyes; then
|
slouken@0
|
1401 |
AC_MSG_CHECKING(for DirectX headers and libraries)
|
slouken@0
|
1402 |
use_directx=no
|
slouken@0
|
1403 |
AC_TRY_COMPILE([
|
slouken@0
|
1404 |
#include "src/video/windx5/directx.h"
|
slouken@0
|
1405 |
],[
|
slouken@0
|
1406 |
],[
|
slouken@0
|
1407 |
use_directx=yes
|
slouken@0
|
1408 |
])
|
slouken@0
|
1409 |
AC_MSG_RESULT($use_directx)
|
slouken@0
|
1410 |
fi
|
slouken@0
|
1411 |
|
slouken@0
|
1412 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon"
|
slouken@0
|
1413 |
SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm"
|
slouken@0
|
1414 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon"
|
slouken@0
|
1415 |
VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la"
|
slouken@0
|
1416 |
# Enable the DIB driver
|
slouken@0
|
1417 |
CFLAGS="$CFLAGS -DENABLE_WINDIB"
|
slouken@0
|
1418 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib"
|
slouken@0
|
1419 |
VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la"
|
slouken@0
|
1420 |
# See if we should enable the DirectX driver
|
slouken@0
|
1421 |
if test x$use_directx = xyes; then
|
slouken@0
|
1422 |
CFLAGS="$CFLAGS -DENABLE_DIRECTX"
|
slouken@0
|
1423 |
SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid"
|
slouken@0
|
1424 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5"
|
slouken@0
|
1425 |
VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la"
|
slouken@0
|
1426 |
fi
|
slouken@0
|
1427 |
}
|
slouken@0
|
1428 |
|
slouken@0
|
1429 |
dnl Set up the BWindow video driver on BeOS
|
slouken@0
|
1430 |
CheckBWINDOW()
|
slouken@0
|
1431 |
{
|
slouken@0
|
1432 |
CFLAGS="$CFLAGS -DENABLE_BWINDOW"
|
slouken@0
|
1433 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow"
|
slouken@0
|
1434 |
VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la"
|
slouken@0
|
1435 |
}
|
slouken@0
|
1436 |
|
slouken@371
|
1437 |
dnl Set up the QTopia video driver if enabled
|
slouken@371
|
1438 |
CheckQtopia()
|
slouken@371
|
1439 |
{
|
slouken@371
|
1440 |
AC_ARG_ENABLE(video-qtopia,
|
slouken@371
|
1441 |
[ --enable-video-qtopia use Qtopia video driver [default=no]],
|
slouken@371
|
1442 |
, enable_video_qtopia=no)
|
slouken@371
|
1443 |
if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
|
slouken@371
|
1444 |
AC_MSG_CHECKING(for Qtopia support)
|
slouken@371
|
1445 |
video_qtopia=no
|
slouken@371
|
1446 |
AC_LANG_CPLUSPLUS
|
slouken@371
|
1447 |
OLD_CXX="$CXXFLAGS"
|
slouken@371
|
1448 |
CXXFLAGS="-DQT_QWS_EBX -fno-rtti -fno-exceptions -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG"
|
slouken@371
|
1449 |
AC_TRY_COMPILE([
|
slouken@371
|
1450 |
#include <qpe/qpeapplication.h>
|
slouken@371
|
1451 |
],[
|
slouken@371
|
1452 |
],[
|
slouken@371
|
1453 |
video_qtopia=yes
|
slouken@371
|
1454 |
])
|
slouken@371
|
1455 |
CXXFLAGS="$OLD_CXX"
|
slouken@371
|
1456 |
AC_MSG_RESULT($video_qtopia)
|
slouken@371
|
1457 |
if test x$video_qtopia = xyes; then
|
slouken@371
|
1458 |
CFLAGS="$CFLAGS -DENABLE_QTOPIA -DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
|
slouken@378
|
1459 |
SDL_LIBS="$SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
|
slouken@371
|
1460 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS qtopia"
|
slouken@371
|
1461 |
VIDEO_DRIVERS="$VIDEO_DRIVERS qtopia/libvideo_qtopia.la"
|
slouken@371
|
1462 |
fi
|
slouken@371
|
1463 |
AC_LANG_C
|
slouken@371
|
1464 |
fi
|
slouken@371
|
1465 |
}
|
slouken@371
|
1466 |
|
slouken@0
|
1467 |
dnl Set up the Mac toolbox video driver for Mac OS 7-9
|
slouken@0
|
1468 |
CheckTOOLBOX()
|
slouken@0
|
1469 |
{
|
slouken@0
|
1470 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
|
slouken@0
|
1471 |
VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
|
slouken@0
|
1472 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
|
slouken@0
|
1473 |
VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
|
slouken@0
|
1474 |
}
|
slouken@0
|
1475 |
|
slouken@0
|
1476 |
dnl Set up the Mac toolbox video driver for Mac OS X
|
slouken@0
|
1477 |
CheckCARBON()
|
slouken@0
|
1478 |
{
|
slouken@0
|
1479 |
# "MACOSX" is not an official definition, but it's commonly
|
slouken@0
|
1480 |
# accepted as a way to differentiate between what runs on X
|
slouken@0
|
1481 |
# and what runs on older Macs - while in theory "Carbon" defns
|
slouken@0
|
1482 |
# are consistent between the two, in practice Carbon is still
|
slouken@0
|
1483 |
# changing. -sts Aug 2000
|
slouken@0
|
1484 |
mac_autoconf_target_workaround="MAC"
|
slouken@0
|
1485 |
CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
|
slouken@0
|
1486 |
-fpascal-strings -DENABLE_TOOLBOX -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/maccommon -I\$(top_srcdir)/src/video/macrom -I\$(top_srcdir)/src/video/macdsp"
|
slouken@0
|
1487 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon"
|
slouken@0
|
1488 |
VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la"
|
slouken@0
|
1489 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom"
|
slouken@0
|
1490 |
VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la"
|
slouken@0
|
1491 |
}
|
slouken@0
|
1492 |
|
slouken@158
|
1493 |
dnl Set up the Mac toolbox video driver for Mac OS X
|
slouken@158
|
1494 |
CheckQUARTZ()
|
slouken@158
|
1495 |
{
|
slouken@158
|
1496 |
# "MACOSX" is not an official definition, but it's commonly
|
slouken@158
|
1497 |
# accepted as a way to differentiate between what runs on X
|
slouken@158
|
1498 |
# and what runs on older Macs - while in theory "Carbon" defns
|
slouken@158
|
1499 |
# are consistent between the two, in practice Carbon is still
|
slouken@158
|
1500 |
# changing. -sts Aug 2000
|
slouken@166
|
1501 |
mac_autoconf_target_workaround="MAC"
|
slouken@158
|
1502 |
CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \
|
slouken@158
|
1503 |
-I/System/Library/Frameworks/Cocoa.framework/Headers -fpascal-strings \
|
slouken@166
|
1504 |
-DENABLE_QUARTZ -DMACOSX -DTARGET_API_${mac_autoconf_target_workaround}_CARBON=1 -I\$(top_srcdir)/src/video/quartz"
|
slouken@158
|
1505 |
VIDEO_SUBDIRS="$VIDEO_SUBDIRS quartz"
|
slouken@158
|
1506 |
VIDEO_DRIVERS="$VIDEO_DRIVERS quartz/libvideo_quartz.la"
|
slouken@158
|
1507 |
}
|
slouken@158
|
1508 |
|
slouken@294
|
1509 |
dnl Check for the dlfcn.h interface for dynamically loading objects
|
slouken@294
|
1510 |
CheckDLOPEN()
|
slouken@294
|
1511 |
{
|
slouken@294
|
1512 |
AC_ARG_ENABLE(dlopen,
|
slouken@296
|
1513 |
[ --enable-dlopen use dlopen for shared object loading [default=no]],
|
slouken@296
|
1514 |
, enable_dlopen=no)
|
slouken@294
|
1515 |
if test x$enable_dlopen = xyes; then
|
slouken@294
|
1516 |
AC_MSG_CHECKING(for dlopen)
|
slouken@294
|
1517 |
use_dlopen=no
|
slouken@294
|
1518 |
AC_TRY_COMPILE([
|
slouken@294
|
1519 |
#include <dlfcn.h>
|
slouken@294
|
1520 |
],[
|
slouken@294
|
1521 |
],[
|
slouken@294
|
1522 |
use_dlopen=yes
|
slouken@294
|
1523 |
])
|
slouken@294
|
1524 |
AC_MSG_RESULT($use_dlopen)
|
slouken@294
|
1525 |
|
slouken@294
|
1526 |
if test x$use_dlopen = xyes; then
|
slouken@294
|
1527 |
CFLAGS="$CFLAGS -DUSE_DLOPEN"
|
slouken@296
|
1528 |
AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl")
|
slouken@294
|
1529 |
fi
|
slouken@294
|
1530 |
fi
|
slouken@294
|
1531 |
}
|
slouken@294
|
1532 |
|
slouken@381
|
1533 |
dnl Check for the usbhid(3) library on *BSD
|
slouken@381
|
1534 |
CheckUSBHID()
|
slouken@381
|
1535 |
{
|
slouken@381
|
1536 |
if test x$enable_joystick = xyes; then
|
slouken@381
|
1537 |
have_libusbhid=no
|
slouken@381
|
1538 |
have_libusb=no
|
slouken@381
|
1539 |
AC_CHECK_LIB(usbhid, hid_init, have_libusbhid=yes)
|
slouken@381
|
1540 |
AC_CHECK_LIB(usb, hid_init, have_libusb=yes)
|
slouken@381
|
1541 |
if test x$have_libusbhid = xyes; then
|
slouken@381
|
1542 |
SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
|
slouken@381
|
1543 |
fi
|
slouken@381
|
1544 |
if test x$have_libusb = xyes; then
|
slouken@381
|
1545 |
SYSTEM_LIBS="$SYSTEM_LIBS -lusb"
|
slouken@381
|
1546 |
fi
|
slouken@381
|
1547 |
|
slouken@381
|
1548 |
AC_CHECK_HEADER(usbhid.h, have_usbhid_h=yes)
|
slouken@381
|
1549 |
AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
|
slouken@381
|
1550 |
AC_CHECK_HEADER(libusbhid.h, have_libusbhid_h=yes)
|
slouken@381
|
1551 |
if test x$have_usbhid_h = xyes; then
|
slouken@381
|
1552 |
CFLAGS="$CFLAGS -DHAVE_USBHID_H"
|
slouken@381
|
1553 |
fi
|
slouken@381
|
1554 |
if test x$have_libusb_h = xyes; then
|
slouken@381
|
1555 |
CFLAGS="$CFLAGS -DHAVE_LIBUSB_H"
|
slouken@381
|
1556 |
fi
|
slouken@381
|
1557 |
if test x$have_libusbhid_h = xyes; then
|
slouken@381
|
1558 |
CFLAGS="$CFLAGS -DHAVE_LIBUSBHID_H"
|
slouken@381
|
1559 |
fi
|
slouken@381
|
1560 |
|
slouken@381
|
1561 |
AC_MSG_CHECKING(for usbhid)
|
slouken@381
|
1562 |
have_usbhid=no
|
slouken@381
|
1563 |
AC_TRY_COMPILE([
|
slouken@381
|
1564 |
#include <dev/usb/usb.h>
|
slouken@381
|
1565 |
#include <dev/usb/usbhid.h>
|
slouken@381
|
1566 |
#if defined(HAVE_USBHID_H)
|
slouken@381
|
1567 |
#include <usbhid.h>
|
slouken@381
|
1568 |
#elif defined(HAVE_LIBUSB_H)
|
slouken@381
|
1569 |
#include <libusb.h>
|
slouken@381
|
1570 |
#elif defined(HAVE_LIBUSBHID_H)
|
slouken@381
|
1571 |
#include <libusbhid.h>
|
slouken@381
|
1572 |
#endif
|
slouken@381
|
1573 |
],[
|
slouken@381
|
1574 |
struct report_desc *repdesc;
|
slouken@381
|
1575 |
struct usb_ctl_report *repbuf;
|
slouken@381
|
1576 |
enum hid_kind hidkind;
|
slouken@381
|
1577 |
],[
|
slouken@381
|
1578 |
have_usbhid=yes
|
slouken@381
|
1579 |
])
|
slouken@381
|
1580 |
AC_MSG_RESULT($have_usbhid)
|
slouken@381
|
1581 |
|
slouken@381
|
1582 |
if test x$have_usbhid = xyes; then
|
slouken@381
|
1583 |
AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
|
slouken@381
|
1584 |
have_usbhid_ucr_data=no
|
slouken@381
|
1585 |
AC_TRY_COMPILE([
|
slouken@381
|
1586 |
#include <dev/usb/usb.h>
|
slouken@381
|
1587 |
#include <dev/usb/usbhid.h>
|
slouken@381
|
1588 |
#include <stdio.h>
|
slouken@381
|
1589 |
#if defined(HAVE_USBHID_H)
|
slouken@381
|
1590 |
#include <usbhid.h>
|
slouken@381
|
1591 |
#elif defined(HAVE_LIBUSB_H)
|
slouken@381
|
1592 |
#include <libusb.h>
|
slouken@381
|
1593 |
#elif defined(HAVE_LIBUSBHID_H)
|
slouken@381
|
1594 |
#include <libusbhid.h>
|
slouken@381
|
1595 |
#endif
|
slouken@381
|
1596 |
],[
|
slouken@381
|
1597 |
struct usb_ctl_report buf;
|
slouken@381
|
1598 |
if (buf.ucr_data) { }
|
slouken@381
|
1599 |
],[
|
slouken@381
|
1600 |
have_usbhid_ucr_data=yes
|
slouken@381
|
1601 |
])
|
slouken@381
|
1602 |
if test x$have_usbhid_ucr_data = xyes; then
|
slouken@381
|
1603 |
CFLAGS="$CFLAGS -DUSBHID_UCR_DATA"
|
slouken@381
|
1604 |
fi
|
slouken@381
|
1605 |
AC_MSG_RESULT($have_usbhid_ucr_data)
|
slouken@381
|
1606 |
|
slouken@381
|
1607 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
|
slouken@381
|
1608 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
|
slouken@381
|
1609 |
fi
|
slouken@381
|
1610 |
fi
|
slouken@381
|
1611 |
}
|
slouken@381
|
1612 |
|
slouken@0
|
1613 |
case "$target" in
|
slouken@0
|
1614 |
*-*-linux*)
|
slouken@0
|
1615 |
ARCH=linux
|
slouken@1
|
1616 |
CheckDummyVideo
|
slouken@68
|
1617 |
CheckDiskAudio
|
slouken@371
|
1618 |
CheckDLOPEN
|
slouken@0
|
1619 |
CheckNASM
|
slouken@0
|
1620 |
CheckOSS
|
slouken@0
|
1621 |
CheckALSA
|
slouken@0
|
1622 |
CheckARTSC
|
slouken@0
|
1623 |
CheckESD
|
slouken@0
|
1624 |
CheckNAS
|
slouken@0
|
1625 |
CheckX11
|
slouken@30
|
1626 |
CheckNANOX
|
slouken@0
|
1627 |
CheckDGA
|
slouken@0
|
1628 |
CheckFBCON
|
slouken@167
|
1629 |
CheckDirectFB
|
slouken@70
|
1630 |
CheckPS2GS
|
slouken@0
|
1631 |
CheckGGI
|
slouken@0
|
1632 |
CheckSVGA
|
slouken@0
|
1633 |
CheckAAlib
|
slouken@371
|
1634 |
CheckQtopia
|
slouken@0
|
1635 |
CheckOpenGL
|
slouken@0
|
1636 |
CheckInputEvents
|
slouken@0
|
1637 |
CheckPTHREAD
|
slouken@0
|
1638 |
# Set up files for the main() stub
|
slouken@371
|
1639 |
if test "x$video_qtopia" = "xyes"; then
|
slouken@371
|
1640 |
COPY_ARCH_SRC(src/main, linux, SDL_Qtopia_main.cc)
|
slouken@371
|
1641 |
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
slouken@371
|
1642 |
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
slouken@371
|
1643 |
else
|
slouken@371
|
1644 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@371
|
1645 |
fi
|
slouken@0
|
1646 |
# Set up files for the audio library
|
slouken@0
|
1647 |
# We use the OSS and ALSA API's, not the Sun audio API
|
slouken@0
|
1648 |
#if test x$enable_audio = xyes; then
|
slouken@148
|
1649 |
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1650 |
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1651 |
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1652 |
#fi
|
slouken@0
|
1653 |
# Set up files for the joystick library
|
slouken@0
|
1654 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
1655 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux"
|
slouken@0
|
1656 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la"
|
slouken@0
|
1657 |
fi
|
slouken@0
|
1658 |
# Set up files for the cdrom library
|
slouken@0
|
1659 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1660 |
CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
|
slouken@153
|
1661 |
CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
|
slouken@0
|
1662 |
fi
|
slouken@0
|
1663 |
# Set up files for the thread library
|
slouken@0
|
1664 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1665 |
CopyUnixThreadSource
|
slouken@0
|
1666 |
fi
|
slouken@0
|
1667 |
# Set up files for the timer library
|
slouken@0
|
1668 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1669 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1670 |
fi
|
slouken@0
|
1671 |
;;
|
slouken@0
|
1672 |
*-*-bsdi*)
|
slouken@0
|
1673 |
ARCH=bsdi
|
slouken@1
|
1674 |
CheckDummyVideo
|
slouken@68
|
1675 |
CheckDiskAudio
|
slouken@371
|
1676 |
CheckDLOPEN
|
slouken@0
|
1677 |
CheckNASM
|
slouken@0
|
1678 |
CheckOSS
|
slouken@35
|
1679 |
CheckARTSC
|
slouken@35
|
1680 |
CheckESD
|
slouken@0
|
1681 |
CheckNAS
|
slouken@0
|
1682 |
CheckX11
|
slouken@0
|
1683 |
CheckDGA
|
slouken@0
|
1684 |
CheckSVGA
|
slouken@0
|
1685 |
CheckAAlib
|
slouken@0
|
1686 |
CheckOpenGL
|
slouken@0
|
1687 |
CheckPTHREAD
|
slouken@0
|
1688 |
# Set up files for the main() stub
|
slouken@0
|
1689 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@148
|
1690 |
# Set up files for the audio library
|
slouken@148
|
1691 |
# We use the OSS and ALSA API's, not the Sun audio API
|
slouken@148
|
1692 |
#if test x$enable_audio = xyes; then
|
slouken@148
|
1693 |
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@148
|
1694 |
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@148
|
1695 |
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@148
|
1696 |
#fi
|
slouken@0
|
1697 |
# Set up files for the joystick library
|
slouken@0
|
1698 |
# (No joystick support yet)
|
slouken@0
|
1699 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
1700 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
1701 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
1702 |
fi
|
slouken@0
|
1703 |
# Set up files for the cdrom library
|
slouken@0
|
1704 |
if test x$enable_cdrom = xyes; then
|
slouken@178
|
1705 |
CDROM_SUBDIRS="$CDROM_SUBDIRS bsdi"
|
slouken@178
|
1706 |
CDROM_DRIVERS="$CDROM_DRIVERS bsdi/libcdrom_bsdi.la"
|
slouken@0
|
1707 |
fi
|
slouken@0
|
1708 |
# Set up files for the thread library
|
slouken@0
|
1709 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1710 |
CopyUnixThreadSource
|
slouken@0
|
1711 |
fi
|
slouken@0
|
1712 |
# Set up files for the timer library
|
slouken@0
|
1713 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1714 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1715 |
fi
|
slouken@0
|
1716 |
;;
|
slouken@0
|
1717 |
*-*-freebsd*)
|
slouken@0
|
1718 |
ARCH=freebsd
|
slouken@1
|
1719 |
CheckDummyVideo
|
slouken@68
|
1720 |
CheckDiskAudio
|
slouken@371
|
1721 |
CheckDLOPEN
|
slouken@129
|
1722 |
CheckVGL
|
slouken@0
|
1723 |
CheckNASM
|
slouken@0
|
1724 |
CheckOSS
|
slouken@0
|
1725 |
CheckARTSC
|
slouken@0
|
1726 |
CheckESD
|
slouken@0
|
1727 |
CheckNAS
|
slouken@0
|
1728 |
CheckX11
|
slouken@0
|
1729 |
CheckDGA
|
slouken@0
|
1730 |
CheckSVGA
|
slouken@0
|
1731 |
CheckAAlib
|
slouken@0
|
1732 |
CheckOpenGL
|
slouken@0
|
1733 |
CheckPTHREAD
|
slouken@381
|
1734 |
CheckUSBHID
|
slouken@0
|
1735 |
# Set up files for the main() stub
|
slouken@0
|
1736 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1737 |
# Set up files for the audio library
|
slouken@0
|
1738 |
# We use the OSS and ALSA API's, not the Sun audio API
|
slouken@0
|
1739 |
#if test x$enable_audio = xyes; then
|
slouken@148
|
1740 |
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1741 |
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1742 |
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1743 |
#fi
|
slouken@0
|
1744 |
# Set up files for the cdrom library
|
slouken@0
|
1745 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1746 |
CDROM_SUBDIRS="$CDROM_SUBDIRS freebsd"
|
slouken@153
|
1747 |
CDROM_DRIVERS="$CDROM_DRIVERS freebsd/libcdrom_freebsd.la"
|
slouken@0
|
1748 |
fi
|
slouken@0
|
1749 |
# Set up files for the thread library
|
slouken@0
|
1750 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1751 |
CopyUnixThreadSource
|
slouken@0
|
1752 |
fi
|
slouken@0
|
1753 |
# Set up files for the timer library
|
slouken@0
|
1754 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1755 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1756 |
fi
|
slouken@0
|
1757 |
;;
|
slouken@0
|
1758 |
*-*-netbsd*)
|
slouken@0
|
1759 |
ARCH=netbsd
|
slouken@1
|
1760 |
CheckDummyVideo
|
slouken@68
|
1761 |
CheckDiskAudio
|
slouken@371
|
1762 |
CheckDLOPEN
|
slouken@0
|
1763 |
CheckNASM
|
slouken@0
|
1764 |
CheckOSS
|
slouken@0
|
1765 |
CheckARTSC
|
slouken@0
|
1766 |
CheckESD
|
slouken@0
|
1767 |
CheckNAS
|
slouken@0
|
1768 |
CheckX11
|
slouken@0
|
1769 |
CheckAAlib
|
slouken@0
|
1770 |
CheckOpenGL
|
slouken@0
|
1771 |
CheckPTHREAD
|
slouken@381
|
1772 |
CheckUSBHID
|
slouken@0
|
1773 |
# Set up files for the main() stub
|
slouken@0
|
1774 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1775 |
# Set up files for the audio library
|
slouken@0
|
1776 |
if test x$enable_audio = xyes; then
|
slouken@148
|
1777 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1778 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1779 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1780 |
fi
|
slouken@0
|
1781 |
# Set up files for the cdrom library
|
slouken@0
|
1782 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1783 |
CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
|
slouken@153
|
1784 |
CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
|
slouken@0
|
1785 |
fi
|
slouken@0
|
1786 |
# Set up files for the thread library
|
slouken@0
|
1787 |
if test x$enable_threads = xyes; then
|
slouken@401
|
1788 |
if test x$use_pthreads = xyes; then
|
slouken@401
|
1789 |
CFLAGS="$CFLAGS -D_POSIX_THREAD_SYSCALL_SOFT=1"
|
slouken@401
|
1790 |
fi
|
slouken@399
|
1791 |
CopyUnixThreadSource
|
slouken@0
|
1792 |
fi
|
slouken@0
|
1793 |
# Set up files for the timer library
|
slouken@0
|
1794 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1795 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1796 |
fi
|
slouken@0
|
1797 |
# NetBSD does not define "unix"
|
slouken@401
|
1798 |
CFLAGS="$CFLAGS -Dunix"
|
slouken@0
|
1799 |
;;
|
slouken@0
|
1800 |
*-*-openbsd*)
|
slouken@0
|
1801 |
ARCH=openbsd
|
slouken@1
|
1802 |
CheckDummyVideo
|
slouken@68
|
1803 |
CheckDiskAudio
|
slouken@371
|
1804 |
CheckDLOPEN
|
slouken@0
|
1805 |
CheckNASM
|
slouken@0
|
1806 |
CheckOSS
|
slouken@0
|
1807 |
CheckARTSC
|
slouken@0
|
1808 |
CheckESD
|
slouken@0
|
1809 |
CheckNAS
|
slouken@0
|
1810 |
CheckX11
|
slouken@0
|
1811 |
CheckAAlib
|
slouken@0
|
1812 |
CheckOpenGL
|
slouken@0
|
1813 |
CheckPTHREAD
|
slouken@381
|
1814 |
CheckUSBHID
|
slouken@0
|
1815 |
# Set up files for the main() stub
|
slouken@0
|
1816 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1817 |
# Set up files for the audio library
|
slouken@360
|
1818 |
if test x$enable_audio = xyes; then
|
slouken@360
|
1819 |
CFLAGS="$CFLAGS -DOPENBSD_AUDIO_SUPPORT"
|
slouken@360
|
1820 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS openbsd"
|
slouken@360
|
1821 |
AUDIO_DRIVERS="$AUDIO_DRIVERS openbsd/libaudio_openbsd.la"
|
slouken@360
|
1822 |
fi
|
slouken@94
|
1823 |
# OpenBSD needs linking with ossaudio emulation library
|
slouken@94
|
1824 |
if test x$have_oss = xyes; then
|
slouken@94
|
1825 |
SYSTEM_LIBS="$SYSTEM_LIBS -lossaudio"
|
slouken@94
|
1826 |
fi
|
slouken@0
|
1827 |
# Set up files for the cdrom library
|
slouken@0
|
1828 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1829 |
CDROM_SUBDIRS="$CDROM_SUBDIRS openbsd"
|
slouken@153
|
1830 |
CDROM_DRIVERS="$CDROM_DRIVERS openbsd/libcdrom_openbsd.la"
|
slouken@0
|
1831 |
fi
|
slouken@0
|
1832 |
# Set up files for the thread library
|
slouken@0
|
1833 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1834 |
CopyUnixThreadSource
|
slouken@0
|
1835 |
fi
|
slouken@0
|
1836 |
# Set up files for the timer library
|
slouken@0
|
1837 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1838 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1839 |
fi
|
slouken@37
|
1840 |
# OpenBSD does not define "unix"
|
slouken@37
|
1841 |
CFLAGS="$CFLAGS -Dunix"
|
slouken@0
|
1842 |
;;
|
slouken@0
|
1843 |
*-*-sysv5*)
|
slouken@0
|
1844 |
ARCH=sysv5
|
slouken@1
|
1845 |
CheckDummyVideo
|
slouken@68
|
1846 |
CheckDiskAudio
|
slouken@371
|
1847 |
CheckDLOPEN
|
slouken@0
|
1848 |
CheckNASM
|
slouken@0
|
1849 |
CheckOSS
|
slouken@0
|
1850 |
CheckARTSC
|
slouken@0
|
1851 |
CheckESD
|
slouken@0
|
1852 |
CheckNAS
|
slouken@0
|
1853 |
CheckX11
|
slouken@0
|
1854 |
CheckAAlib
|
slouken@0
|
1855 |
CheckOpenGL
|
slouken@0
|
1856 |
CheckPTHREAD
|
slouken@0
|
1857 |
# Set up files for the main() stub
|
slouken@0
|
1858 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1859 |
# Set up files for the audio library
|
slouken@0
|
1860 |
if test x$enable_audio = xyes; then
|
slouken@148
|
1861 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1862 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1863 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1864 |
fi
|
slouken@0
|
1865 |
# Set up files for the joystick library
|
slouken@0
|
1866 |
# (No joystick support yet)
|
slouken@0
|
1867 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
1868 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
1869 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
1870 |
fi
|
slouken@0
|
1871 |
# Set up files for the cdrom library
|
slouken@0
|
1872 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1873 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@153
|
1874 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@0
|
1875 |
fi
|
slouken@0
|
1876 |
# Set up files for the thread library
|
slouken@0
|
1877 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1878 |
CopyUnixThreadSource
|
slouken@0
|
1879 |
fi
|
slouken@0
|
1880 |
# Set up files for the timer library
|
slouken@0
|
1881 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1882 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1883 |
fi
|
slouken@0
|
1884 |
;;
|
slouken@0
|
1885 |
*-*-solaris*)
|
slouken@0
|
1886 |
ARCH=solaris
|
slouken@1
|
1887 |
CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86
|
slouken@1
|
1888 |
CheckDummyVideo
|
slouken@68
|
1889 |
CheckDiskAudio
|
slouken@371
|
1890 |
CheckDLOPEN
|
slouken@0
|
1891 |
CheckNASM
|
slouken@35
|
1892 |
CheckOSS
|
slouken@0
|
1893 |
CheckARTSC
|
slouken@0
|
1894 |
CheckESD
|
slouken@0
|
1895 |
CheckNAS
|
slouken@0
|
1896 |
CheckX11
|
slouken@0
|
1897 |
CheckAAlib
|
slouken@0
|
1898 |
CheckOpenGL
|
slouken@0
|
1899 |
CheckPTHREAD
|
slouken@0
|
1900 |
# Set up files for the main() stub
|
slouken@0
|
1901 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1902 |
# Set up files for the audio library
|
slouken@0
|
1903 |
if test x$enable_audio = xyes; then
|
slouken@148
|
1904 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1905 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1906 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1907 |
fi
|
slouken@0
|
1908 |
# Set up files for the joystick library
|
slouken@0
|
1909 |
# (No joystick support yet)
|
slouken@0
|
1910 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
1911 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
1912 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
1913 |
fi
|
slouken@0
|
1914 |
# Set up files for the cdrom library
|
slouken@0
|
1915 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1916 |
CDROM_SUBDIRS="$CDROM_SUBDIRS linux"
|
slouken@153
|
1917 |
CDROM_DRIVERS="$CDROM_DRIVERS linux/libcdrom_linux.la"
|
slouken@0
|
1918 |
fi
|
slouken@0
|
1919 |
# Set up files for the thread library
|
slouken@0
|
1920 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1921 |
CopyUnixThreadSource
|
slouken@0
|
1922 |
fi
|
slouken@0
|
1923 |
# Set up files for the timer library
|
slouken@0
|
1924 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1925 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1926 |
fi
|
slouken@0
|
1927 |
;;
|
slouken@0
|
1928 |
*-*-irix*)
|
slouken@0
|
1929 |
ARCH=irix
|
slouken@1
|
1930 |
CheckDummyVideo
|
slouken@68
|
1931 |
CheckDiskAudio
|
slouken@371
|
1932 |
CheckDLOPEN
|
slouken@148
|
1933 |
CheckDMEDIA
|
slouken@148
|
1934 |
CheckESD
|
slouken@0
|
1935 |
CheckNAS
|
slouken@0
|
1936 |
CheckX11
|
slouken@0
|
1937 |
CheckAAlib
|
slouken@0
|
1938 |
CheckOpenGL
|
slouken@0
|
1939 |
CheckPTHREAD
|
slouken@0
|
1940 |
# Set up files for the main() stub
|
slouken@0
|
1941 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@148
|
1942 |
# We use the dmedia audio API, not the Sun audio API
|
slouken@148
|
1943 |
#if test x$enable_audio = xyes; then
|
slouken@148
|
1944 |
# CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@148
|
1945 |
# AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@148
|
1946 |
# AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@148
|
1947 |
#fi
|
slouken@0
|
1948 |
# Set up files for the joystick library
|
slouken@0
|
1949 |
# (No joystick support yet)
|
slouken@0
|
1950 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
1951 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
1952 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
1953 |
fi
|
slouken@0
|
1954 |
# Set up files for the cdrom library
|
slouken@0
|
1955 |
# (No CD-ROM support yet)
|
slouken@0
|
1956 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
1957 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@153
|
1958 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@0
|
1959 |
fi
|
slouken@0
|
1960 |
# Set up files for the thread library
|
slouken@0
|
1961 |
if test x$enable_threads = xyes; then
|
slouken@399
|
1962 |
if test x$use_pthreads = xyes -o x$use_pth = xyes; then
|
slouken@399
|
1963 |
CopyUnixThreadSource
|
slouken@0
|
1964 |
else
|
slouken@0
|
1965 |
COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c)
|
slouken@0
|
1966 |
COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h)
|
slouken@0
|
1967 |
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
|
slouken@0
|
1968 |
COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
|
slouken@0
|
1969 |
COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
|
slouken@0
|
1970 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@0
|
1971 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@0
|
1972 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@0
|
1973 |
fi
|
slouken@0
|
1974 |
fi
|
slouken@0
|
1975 |
# Set up files for the timer library
|
slouken@0
|
1976 |
if test x$enable_timers = xyes; then
|
slouken@0
|
1977 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
1978 |
fi
|
slouken@0
|
1979 |
;;
|
slouken@0
|
1980 |
*-*-hpux*)
|
slouken@0
|
1981 |
ARCH=hpux
|
slouken@1
|
1982 |
CheckDummyVideo
|
slouken@68
|
1983 |
CheckDiskAudio
|
slouken@371
|
1984 |
CheckDLOPEN
|
slouken@35
|
1985 |
CheckOSS
|
slouken@0
|
1986 |
CheckNAS
|
slouken@0
|
1987 |
CheckX11
|
slouken@0
|
1988 |
CheckGGI
|
slouken@0
|
1989 |
CheckAAlib
|
slouken@0
|
1990 |
CheckOpenGL
|
slouken@0
|
1991 |
CheckPTHREAD
|
slouken@0
|
1992 |
# Set up files for the main() stub
|
slouken@0
|
1993 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
1994 |
# Set up files for the audio library
|
slouken@0
|
1995 |
if test x$enable_audio = xyes; then
|
slouken@148
|
1996 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
1997 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
1998 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
1999 |
fi
|
slouken@0
|
2000 |
# Set up files for the joystick library
|
slouken@0
|
2001 |
# (No joystick support yet)
|
slouken@0
|
2002 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2003 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
2004 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
2005 |
fi
|
slouken@0
|
2006 |
# Set up files for the cdrom library
|
slouken@0
|
2007 |
# (No CD-ROM support yet)
|
slouken@0
|
2008 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2009 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@153
|
2010 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@0
|
2011 |
fi
|
slouken@0
|
2012 |
# Set up files for the thread library
|
slouken@0
|
2013 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2014 |
CopyUnixThreadSource
|
slouken@0
|
2015 |
fi
|
slouken@0
|
2016 |
# Set up files for the timer library
|
slouken@0
|
2017 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2018 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
2019 |
fi
|
slouken@0
|
2020 |
;;
|
slouken@0
|
2021 |
*-*-aix*)
|
slouken@0
|
2022 |
ARCH=aix
|
slouken@1
|
2023 |
CheckDummyVideo
|
slouken@68
|
2024 |
CheckDiskAudio
|
slouken@371
|
2025 |
CheckDLOPEN
|
slouken@35
|
2026 |
CheckOSS
|
slouken@0
|
2027 |
CheckNAS
|
slouken@0
|
2028 |
CheckX11
|
slouken@0
|
2029 |
CheckGGI
|
slouken@0
|
2030 |
CheckAAlib
|
slouken@0
|
2031 |
CheckOpenGL
|
slouken@0
|
2032 |
CheckPTHREAD
|
slouken@0
|
2033 |
# Set up files for the main() stub
|
slouken@0
|
2034 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
2035 |
# Set up files for the audio library
|
slouken@0
|
2036 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2037 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio"
|
slouken@0
|
2038 |
AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la"
|
slouken@0
|
2039 |
fi
|
slouken@0
|
2040 |
# Set up files for the joystick library
|
slouken@0
|
2041 |
# (No joystick support yet)
|
slouken@0
|
2042 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2043 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
2044 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
2045 |
fi
|
slouken@0
|
2046 |
# Set up files for the cdrom library
|
slouken@0
|
2047 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2048 |
CDROM_SUBDIRS="$CDROM_SUBDIRS aix"
|
slouken@153
|
2049 |
CDROM_DRIVERS="$CDROM_DRIVERS aix/libcdrom_aix.la"
|
slouken@0
|
2050 |
fi
|
slouken@0
|
2051 |
# Set up files for the thread library
|
slouken@0
|
2052 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2053 |
CopyUnixThreadSource
|
slouken@0
|
2054 |
fi
|
slouken@0
|
2055 |
# Set up files for the timer library
|
slouken@0
|
2056 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2057 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
2058 |
fi
|
slouken@0
|
2059 |
;;
|
slouken@0
|
2060 |
*-*-osf*)
|
slouken@0
|
2061 |
ARCH=osf
|
slouken@1
|
2062 |
CheckDummyVideo
|
slouken@68
|
2063 |
CheckDiskAudio
|
slouken@371
|
2064 |
CheckDLOPEN
|
slouken@0
|
2065 |
CheckNAS
|
slouken@0
|
2066 |
CheckX11
|
slouken@0
|
2067 |
CheckGGI
|
slouken@0
|
2068 |
CheckAAlib
|
slouken@0
|
2069 |
CheckOpenGL
|
slouken@0
|
2070 |
CheckPTHREAD
|
slouken@0
|
2071 |
# Set up files for the main() stub
|
slouken@0
|
2072 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
2073 |
# Set up files for the audio library
|
slouken@0
|
2074 |
if test x$enable_audio = xyes; then
|
slouken@148
|
2075 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@0
|
2076 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@0
|
2077 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@0
|
2078 |
fi
|
slouken@0
|
2079 |
# Set up files for the joystick library
|
slouken@0
|
2080 |
# (No joystick support yet)
|
slouken@0
|
2081 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2082 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
2083 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
2084 |
fi
|
slouken@0
|
2085 |
# Set up files for the cdrom library
|
slouken@0
|
2086 |
# (No cdrom support yet)
|
slouken@0
|
2087 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2088 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@153
|
2089 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@0
|
2090 |
fi
|
slouken@0
|
2091 |
# Set up files for the thread library
|
slouken@0
|
2092 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2093 |
CopyUnixThreadSource
|
slouken@0
|
2094 |
fi
|
slouken@0
|
2095 |
# Set up files for the timer library
|
slouken@0
|
2096 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2097 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
2098 |
fi
|
slouken@0
|
2099 |
;;
|
slouken@0
|
2100 |
*-*-qnx*)
|
slouken@0
|
2101 |
ARCH=qnx
|
slouken@1
|
2102 |
CheckDummyVideo
|
slouken@68
|
2103 |
CheckDiskAudio
|
slouken@371
|
2104 |
CheckDLOPEN
|
slouken@0
|
2105 |
CheckNAS
|
slouken@0
|
2106 |
CheckPHOTON
|
slouken@0
|
2107 |
CheckX11
|
slouken@0
|
2108 |
CheckOpenGL
|
slouken@0
|
2109 |
CheckPTHREAD
|
slouken@0
|
2110 |
# Set up files for the main() stub
|
slouken@0
|
2111 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
2112 |
# Set up files for the audio library
|
slouken@0
|
2113 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2114 |
CFLAGS="$CFLAGS -DALSA_SUPPORT"
|
slouken@0
|
2115 |
SYSTEM_LIBS="$SYSTEM_LIBS -lasound"
|
slouken@0
|
2116 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto"
|
slouken@0
|
2117 |
AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la"
|
slouken@0
|
2118 |
fi
|
slouken@0
|
2119 |
# Set up files for the joystick library
|
slouken@0
|
2120 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2121 |
# (No joystick support yet)
|
slouken@0
|
2122 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy"
|
slouken@0
|
2123 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la"
|
slouken@0
|
2124 |
fi
|
slouken@0
|
2125 |
# Set up files for the cdrom library
|
slouken@0
|
2126 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2127 |
CDROM_SUBDIRS="$CDROM_SUBDIRS qnx"
|
slouken@153
|
2128 |
CDROM_DRIVERS="$CDROM_DRIVERS qnx/libcdrom_qnx.la"
|
slouken@0
|
2129 |
fi
|
slouken@0
|
2130 |
# Set up files for the thread library
|
slouken@0
|
2131 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2132 |
CopyUnixThreadSource
|
slouken@0
|
2133 |
fi
|
slouken@0
|
2134 |
# Set up files for the timer library
|
slouken@0
|
2135 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2136 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
2137 |
fi
|
slouken@0
|
2138 |
;;
|
slouken@0
|
2139 |
*-*-cygwin* | *-*-mingw32*)
|
slouken@0
|
2140 |
ARCH=win32
|
slouken@0
|
2141 |
if test "$build" != "$target"; then # cross-compiling
|
slouken@0
|
2142 |
# Default cross-compile location
|
slouken@0
|
2143 |
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
|
slouken@0
|
2144 |
else
|
slouken@0
|
2145 |
# Look for the location of the tools and install there
|
slouken@1
|
2146 |
if [ "$BUILD_PREFIX" != "" ]; then
|
slouken@1
|
2147 |
ac_default_prefix=$BUILD_PREFIX
|
slouken@1
|
2148 |
fi
|
slouken@0
|
2149 |
fi
|
slouken@1
|
2150 |
CheckDummyVideo
|
slouken@68
|
2151 |
CheckDiskAudio
|
slouken@0
|
2152 |
CheckWIN32
|
slouken@0
|
2153 |
CheckDIRECTX
|
slouken@0
|
2154 |
CheckNASM
|
slouken@0
|
2155 |
# Set up files for the main() stub
|
slouken@0
|
2156 |
COPY_ARCH_SRC(src/main, win32, SDL_main.c)
|
slouken@0
|
2157 |
# Set up files for the audio library
|
slouken@0
|
2158 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2159 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib"
|
slouken@0
|
2160 |
AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la"
|
slouken@0
|
2161 |
if test x$use_directx = xyes; then
|
slouken@41
|
2162 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5"
|
slouken@41
|
2163 |
AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la"
|
slouken@0
|
2164 |
fi
|
slouken@0
|
2165 |
fi
|
slouken@0
|
2166 |
# Set up files for the joystick library
|
slouken@0
|
2167 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2168 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32"
|
slouken@0
|
2169 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la"
|
slouken@0
|
2170 |
fi
|
slouken@0
|
2171 |
# Set up files for the cdrom library
|
slouken@0
|
2172 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2173 |
CDROM_SUBDIRS="$CDROM_SUBDIRS win32"
|
slouken@153
|
2174 |
CDROM_DRIVERS="$CDROM_DRIVERS win32/libcdrom_win32.la"
|
slouken@0
|
2175 |
fi
|
slouken@0
|
2176 |
# Set up files for the thread library
|
slouken@0
|
2177 |
if test x$enable_threads = xyes; then
|
slouken@0
|
2178 |
COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c)
|
slouken@0
|
2179 |
COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h)
|
slouken@0
|
2180 |
COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c)
|
slouken@0
|
2181 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
slouken@0
|
2182 |
COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c)
|
slouken@0
|
2183 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@0
|
2184 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@0
|
2185 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@0
|
2186 |
fi
|
slouken@0
|
2187 |
# Set up files for the timer library
|
slouken@0
|
2188 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2189 |
COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c)
|
slouken@0
|
2190 |
fi
|
slouken@0
|
2191 |
# The Win32 platform requires special setup
|
slouken@0
|
2192 |
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
slouken@1
|
2193 |
case "$target" in
|
slouken@1
|
2194 |
*-*-cygwin*)
|
slouken@263
|
2195 |
CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
|
slouken@263
|
2196 |
SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
|
slouken@1
|
2197 |
LIBS="$LIBS -mno-cygwin"
|
slouken@1
|
2198 |
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin"
|
slouken@1
|
2199 |
;;
|
slouken@1
|
2200 |
*-*-mingw32*)
|
slouken@1
|
2201 |
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
|
slouken@1
|
2202 |
;;
|
slouken@1
|
2203 |
esac
|
slouken@0
|
2204 |
;;
|
slouken@0
|
2205 |
*-*-beos*)
|
slouken@0
|
2206 |
ARCH=beos
|
slouken@0
|
2207 |
ac_default_prefix=/boot/develop/tools/gnupro
|
slouken@1
|
2208 |
CheckDummyVideo
|
slouken@68
|
2209 |
CheckDiskAudio
|
slouken@0
|
2210 |
CheckNASM
|
slouken@0
|
2211 |
CheckBWINDOW
|
slouken@0
|
2212 |
CheckBeGL
|
slouken@0
|
2213 |
# Set up files for the main() stub
|
slouken@0
|
2214 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@0
|
2215 |
COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc)
|
slouken@0
|
2216 |
COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h)
|
slouken@0
|
2217 |
# Set up files for the audio library
|
slouken@0
|
2218 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2219 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio"
|
slouken@0
|
2220 |
AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la"
|
slouken@0
|
2221 |
fi
|
slouken@0
|
2222 |
# Set up files for the joystick library
|
slouken@0
|
2223 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2224 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos"
|
slouken@0
|
2225 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la"
|
slouken@0
|
2226 |
fi
|
slouken@0
|
2227 |
# Set up files for the cdrom library
|
slouken@0
|
2228 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2229 |
CDROM_SUBDIRS="$CDROM_SUBDIRS beos"
|
slouken@153
|
2230 |
CDROM_DRIVERS="$CDROM_DRIVERS beos/libcdrom_beos.la"
|
slouken@0
|
2231 |
fi
|
slouken@0
|
2232 |
# Set up files for the thread library
|
slouken@0
|
2233 |
if test x$enable_threads = xyes; then
|
slouken@0
|
2234 |
COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c)
|
slouken@0
|
2235 |
COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h)
|
slouken@0
|
2236 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
slouken@0
|
2237 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
slouken@0
|
2238 |
COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c)
|
slouken@0
|
2239 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@0
|
2240 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@0
|
2241 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@0
|
2242 |
fi
|
slouken@0
|
2243 |
# Set up files for the timer library
|
slouken@0
|
2244 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2245 |
COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c)
|
slouken@0
|
2246 |
fi
|
slouken@0
|
2247 |
# The BeOS platform requires special libraries
|
slouken@0
|
2248 |
SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
slouken@0
|
2249 |
;;
|
slouken@0
|
2250 |
*-*-macos*)
|
slouken@0
|
2251 |
# This would be used if cross-compiling to MacOS 9. No way to
|
slouken@0
|
2252 |
# use it at present, but Apple is working on a X-to-9 compiler
|
slouken@0
|
2253 |
# for which this case would be handy.
|
slouken@0
|
2254 |
ARCH=macos
|
slouken@1
|
2255 |
CheckDummyVideo
|
slouken@68
|
2256 |
CheckDiskAudio
|
slouken@0
|
2257 |
CheckTOOLBOX
|
slouken@0
|
2258 |
CheckMacGL
|
slouken@0
|
2259 |
# Set up files for the main() stub
|
slouken@0
|
2260 |
COPY_ARCH_SRC(src/main, macos, SDL_main.c)
|
slouken@0
|
2261 |
# Set up files for the audio library
|
slouken@0
|
2262 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2263 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
|
slouken@0
|
2264 |
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
|
slouken@0
|
2265 |
fi
|
slouken@0
|
2266 |
# Set up files for the joystick library
|
slouken@0
|
2267 |
if test x$enable_joystick = xyes; then
|
slouken@0
|
2268 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos"
|
slouken@0
|
2269 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la"
|
slouken@0
|
2270 |
fi
|
slouken@0
|
2271 |
# Set up files for the cdrom library
|
slouken@0
|
2272 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2273 |
CDROM_SUBDIRS="$CDROM_SUBDIRS macos"
|
slouken@153
|
2274 |
CDROM_DRIVERS="$CDROM_DRIVERS macos/libcdrom_macos.la"
|
slouken@0
|
2275 |
fi
|
slouken@0
|
2276 |
# Set up files for the thread library
|
slouken@0
|
2277 |
if test x$enable_threads = xyes; then
|
slouken@0
|
2278 |
COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c)
|
slouken@0
|
2279 |
COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h)
|
slouken@0
|
2280 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c)
|
slouken@0
|
2281 |
COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h)
|
slouken@0
|
2282 |
COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c)
|
slouken@0
|
2283 |
COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
|
slouken@0
|
2284 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c)
|
slouken@0
|
2285 |
COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
|
slouken@0
|
2286 |
fi
|
slouken@0
|
2287 |
# Set up files for the timer library
|
slouken@0
|
2288 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2289 |
COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c)
|
slouken@0
|
2290 |
fi
|
slouken@0
|
2291 |
# The MacOS platform requires special setup
|
slouken@0
|
2292 |
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
slouken@0
|
2293 |
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
slouken@0
|
2294 |
;;
|
slouken@0
|
2295 |
*-*-darwin* )
|
slouken@0
|
2296 |
# Strictly speaking, we want "Mac OS X", not "Darwin", which is
|
slouken@158
|
2297 |
# just the OS X kernel sans upper layers like Carbon and Cocoa.
|
slouken@158
|
2298 |
# But config.guess comes back with "darwin", so go with the flow.
|
slouken@158
|
2299 |
ARCH=macosx
|
slouken@1
|
2300 |
CheckDummyVideo
|
slouken@68
|
2301 |
CheckDiskAudio
|
slouken@158
|
2302 |
CheckQUARTZ
|
slouken@0
|
2303 |
CheckMacGL
|
slouken@0
|
2304 |
CheckPTHREAD
|
slouken@0
|
2305 |
# Set up files for the main() stub
|
slouken@194
|
2306 |
COPY_ARCH_SRC(src/main, macosx, SDLMain.m)
|
slouken@194
|
2307 |
COPY_ARCH_SRC(src/main, macosx, SDLMain.h)
|
slouken@0
|
2308 |
# Set up files for the audio library
|
slouken@0
|
2309 |
if test x$enable_audio = xyes; then
|
slouken@0
|
2310 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom"
|
slouken@0
|
2311 |
AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la"
|
slouken@0
|
2312 |
fi
|
slouken@0
|
2313 |
# Set up files for the joystick library
|
slouken@0
|
2314 |
if test x$enable_joystick = xyes; then
|
slouken@172
|
2315 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS darwin"
|
slouken@172
|
2316 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS darwin/libjoystick_darwin.la"
|
slouken@387
|
2317 |
SYSTEM_LIBS="$SYSTEM_LIBS -framework IOKit"
|
slouken@0
|
2318 |
fi
|
slouken@0
|
2319 |
# Set up files for the cdrom library
|
slouken@0
|
2320 |
if test x$enable_cdrom = xyes; then
|
slouken@153
|
2321 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@153
|
2322 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@0
|
2323 |
fi
|
slouken@0
|
2324 |
# Set up files for the thread library
|
slouken@0
|
2325 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2326 |
CopyUnixThreadSource
|
slouken@0
|
2327 |
fi
|
slouken@0
|
2328 |
# Set up files for the timer library
|
slouken@0
|
2329 |
if test x$enable_timers = xyes; then
|
slouken@0
|
2330 |
COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c)
|
slouken@0
|
2331 |
fi
|
slouken@387
|
2332 |
# The MacOS X platform requires special setup.
|
slouken@387
|
2333 |
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
slouken@387
|
2334 |
# The Cocoa backend still needs Carbon, and the YUV code QuickTime
|
slouken@387
|
2335 |
SYSTEM_LIBS="$SYSTEM_LIBS -framework Cocoa -framework Carbon -framework QuickTime"
|
slouken@0
|
2336 |
;;
|
slouken@281
|
2337 |
*-*-mint*)
|
slouken@281
|
2338 |
ARCH=mint
|
slouken@281
|
2339 |
CheckDummyVideo
|
slouken@281
|
2340 |
CheckDiskAudio
|
slouken@281
|
2341 |
CheckAtariBiosEvent
|
slouken@281
|
2342 |
CheckAtariXbiosVideo
|
slouken@281
|
2343 |
CheckAtariGemVideo
|
slouken@398
|
2344 |
CheckAtariAudio
|
slouken@281
|
2345 |
CheckPTH
|
slouken@281
|
2346 |
# Set up files for the main() stub
|
slouken@281
|
2347 |
COPY_ARCH_SRC(src/main, linux, SDL_main.c)
|
slouken@281
|
2348 |
# Set up files for the audio library
|
slouken@398
|
2349 |
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
slouken@398
|
2350 |
if test x$enable_audio = xyes; then
|
slouken@398
|
2351 |
CFLAGS="$CFLAGS -DSUNAUDIO_SUPPORT"
|
slouken@398
|
2352 |
AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun"
|
slouken@398
|
2353 |
AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la"
|
slouken@398
|
2354 |
fi
|
slouken@281
|
2355 |
fi
|
slouken@281
|
2356 |
# Set up files for the joystick library
|
slouken@281
|
2357 |
if test x$enable_joystick = xyes; then
|
slouken@302
|
2358 |
JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS mint"
|
slouken@302
|
2359 |
JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS mint/libjoystick_mint.la"
|
slouken@281
|
2360 |
fi
|
slouken@281
|
2361 |
# Set up files for the cdrom library
|
slouken@281
|
2362 |
if test x$enable_cdrom = xyes; then
|
slouken@281
|
2363 |
CDROM_SUBDIRS="$CDROM_SUBDIRS dummy"
|
slouken@281
|
2364 |
CDROM_DRIVERS="$CDROM_DRIVERS dummy/libcdrom_dummy.la"
|
slouken@281
|
2365 |
fi
|
slouken@281
|
2366 |
# Set up files for the thread library
|
slouken@281
|
2367 |
if test x$enable_threads = xyes; then
|
slouken@399
|
2368 |
CopyUnixThreadSource
|
slouken@281
|
2369 |
fi
|
slouken@281
|
2370 |
# Set up files for the timer library
|
slouken@281
|
2371 |
if test x$enable_timers = xyes; then
|
slouken@281
|
2372 |
COPY_ARCH_SRC(src/timer, mint, SDL_systimer.c)
|
slouken@281
|
2373 |
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer.S)
|
slouken@281
|
2374 |
COPY_ARCH_SRC(src/timer, mint, SDL_vbltimer_s.h)
|
slouken@281
|
2375 |
fi
|
slouken@281
|
2376 |
# MiNT does not define "unix"
|
slouken@281
|
2377 |
CFLAGS="$CFLAGS -Dunix"
|
slouken@281
|
2378 |
;;
|
slouken@0
|
2379 |
*)
|
slouken@0
|
2380 |
AC_MSG_ERROR(Unsupported target: Please add to configure.in)
|
slouken@0
|
2381 |
;;
|
slouken@0
|
2382 |
esac
|
slouken@0
|
2383 |
AC_SUBST(ARCH)
|
slouken@0
|
2384 |
|
slouken@0
|
2385 |
# Set the conditional variables for this target
|
slouken@0
|
2386 |
AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux)
|
slouken@371
|
2387 |
AM_CONDITIONAL(TARGET_QTOPIA, test "x$video_qtopia" = "xyes")
|
slouken@0
|
2388 |
AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris)
|
slouken@0
|
2389 |
AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix)
|
slouken@0
|
2390 |
AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi)
|
slouken@0
|
2391 |
AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd)
|
slouken@39
|
2392 |
AM_CONDITIONAL(TARGET_NETBSD, test $ARCH = netbsd)
|
slouken@0
|
2393 |
AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd)
|
slouken@0
|
2394 |
AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix)
|
slouken@0
|
2395 |
AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32)
|
slouken@0
|
2396 |
AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos)
|
slouken@0
|
2397 |
AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos)
|
slouken@158
|
2398 |
AM_CONDITIONAL(TARGET_MACOSX, test $ARCH = macosx)
|
slouken@279
|
2399 |
AM_CONDITIONAL(TARGET_QNX, test $ARCH = qnx)
|
slouken@281
|
2400 |
AM_CONDITIONAL(TARGET_MINT, test $ARCH = mint)
|
slouken@0
|
2401 |
|
slouken@387
|
2402 |
# More automake conditionals
|
slouken@387
|
2403 |
AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes)
|
slouken@387
|
2404 |
AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes)
|
slouken@387
|
2405 |
|
slouken@0
|
2406 |
# Set conditional variables for shared and static library selection.
|
slouken@0
|
2407 |
# These are not used in any Makefile.am but in sdl-config.in.
|
slouken@0
|
2408 |
AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes])
|
slouken@0
|
2409 |
AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes])
|
slouken@0
|
2410 |
|
slouken@0
|
2411 |
# Set runtime shared library paths as needed
|
slouken@0
|
2412 |
|
slouken@0
|
2413 |
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
|
slouken@0
|
2414 |
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
slouken@0
|
2415 |
fi
|
slouken@0
|
2416 |
if test $ARCH = solaris; then
|
slouken@0
|
2417 |
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
slouken@0
|
2418 |
fi
|
slouken@387
|
2419 |
|
slouken@387
|
2420 |
case "$ARCH" in
|
slouken@401
|
2421 |
openbsd | netbsd | bsdi)
|
slouken@257
|
2422 |
SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
|
slouken@387
|
2423 |
;;
|
slouken@387
|
2424 |
macosx)
|
slouken@387
|
2425 |
SHARED_SYSTEM_LIBS="-framework Cocoa"
|
slouken@387
|
2426 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@387
|
2427 |
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
|
slouken@387
|
2428 |
fi
|
slouken@387
|
2429 |
;;
|
slouken@387
|
2430 |
*)
|
slouken@257
|
2431 |
SHARED_SYSTEM_LIBS=""
|
slouken@387
|
2432 |
;;
|
slouken@387
|
2433 |
esac
|
slouken@387
|
2434 |
|
slouken@257
|
2435 |
STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
|
slouken@1
|
2436 |
|
slouken@0
|
2437 |
dnl Output the video drivers we use
|
slouken@0
|
2438 |
if test x$enable_video = xtrue; then
|
slouken@0
|
2439 |
if test "$VIDEO_SUBDIRS" = ""; then
|
slouken@0
|
2440 |
AC_MSG_ERROR(*** No video drivers are enabled!)
|
slouken@0
|
2441 |
fi
|
slouken@0
|
2442 |
fi
|
slouken@0
|
2443 |
AC_SUBST(AUDIO_SUBDIRS)
|
slouken@0
|
2444 |
AC_SUBST(AUDIO_DRIVERS)
|
slouken@0
|
2445 |
AC_SUBST(VIDEO_SUBDIRS)
|
slouken@0
|
2446 |
AC_SUBST(VIDEO_DRIVERS)
|
slouken@0
|
2447 |
AC_SUBST(JOYSTICK_SUBDIRS)
|
slouken@0
|
2448 |
AC_SUBST(JOYSTICK_DRIVERS)
|
slouken@153
|
2449 |
AC_SUBST(CDROM_SUBDIRS)
|
slouken@153
|
2450 |
AC_SUBST(CDROM_DRIVERS)
|
slouken@0
|
2451 |
AC_SUBST(SDL_EXTRADIRS)
|
slouken@0
|
2452 |
AC_SUBST(SDL_EXTRALIBS)
|
slouken@0
|
2453 |
|
slouken@0
|
2454 |
dnl Expand the cflags and libraries needed by apps using SDL
|
slouken@0
|
2455 |
AC_SUBST(SDL_CFLAGS)
|
slouken@0
|
2456 |
AC_SUBST(SDL_LIBS)
|
slouken@0
|
2457 |
AC_SUBST(SDL_RLD_FLAGS)
|
slouken@0
|
2458 |
|
slouken@257
|
2459 |
dnl Expand the libraries needed for static and dynamic linking
|
slouken@257
|
2460 |
AC_SUBST(STATIC_SYSTEM_LIBS)
|
slouken@257
|
2461 |
AC_SUBST(SHARED_SYSTEM_LIBS)
|
slouken@261
|
2462 |
AC_SUBST(SYSTEM_LIBS)
|
slouken@257
|
2463 |
|
slouken@0
|
2464 |
dnl Expand the include directories for building SDL
|
slouken@0
|
2465 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/include"
|
slouken@0
|
2466 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL"
|
slouken@0
|
2467 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH"
|
slouken@0
|
2468 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main"
|
slouken@0
|
2469 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio"
|
slouken@0
|
2470 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video"
|
slouken@292
|
2471 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/XFree86/extensions"
|
slouken@0
|
2472 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events"
|
slouken@0
|
2473 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick"
|
slouken@0
|
2474 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom"
|
slouken@0
|
2475 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread"
|
slouken@0
|
2476 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer"
|
slouken@0
|
2477 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian"
|
slouken@0
|
2478 |
CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file"
|
slouken@0
|
2479 |
CXXFLAGS="$CFLAGS"
|
slouken@0
|
2480 |
|
slouken@158
|
2481 |
|
slouken@158
|
2482 |
# Check for darwin at the very end and set up the Objective C compiler
|
slouken@158
|
2483 |
# We do this here so that we get the full CFLAGS into OBJCFLAGS
|
slouken@158
|
2484 |
case "$target" in
|
slouken@158
|
2485 |
*-*-darwin*)
|
slouken@158
|
2486 |
OBJC="cc"
|
slouken@158
|
2487 |
OBJCFLAGS="$CFLAGS"
|
slouken@200
|
2488 |
OBJCDEPMODE="$CCDEPMODE"
|
slouken@158
|
2489 |
AC_SUBST(OBJC)
|
slouken@158
|
2490 |
AC_SUBST(OBJCFLAGS)
|
slouken@200
|
2491 |
AC_SUBST(OBJCDEPMODE)
|
slouken@158
|
2492 |
;;
|
slouken@158
|
2493 |
esac
|
slouken@158
|
2494 |
|
slouken@0
|
2495 |
# Finally create all the generated files
|
slouken@0
|
2496 |
dnl Important: Any directory that you want to be in the distcheck should
|
slouken@0
|
2497 |
dnl have a file listed here, so that configure generates the
|
slouken@0
|
2498 |
dnl subdirectories on the build target.
|
slouken@0
|
2499 |
AC_OUTPUT([
|
slouken@0
|
2500 |
Makefile
|
slouken@0
|
2501 |
docs/Makefile
|
slouken@0
|
2502 |
docs/html/Makefile
|
slouken@0
|
2503 |
docs/man3/Makefile
|
slouken@0
|
2504 |
include/Makefile
|
slouken@0
|
2505 |
src/Makefile
|
slouken@0
|
2506 |
src/main/Makefile
|
slouken@168
|
2507 |
src/main/macosx/Makefile
|
slouken@172
|
2508 |
src/main/macosx/Info.plist
|
slouken@0
|
2509 |
src/audio/Makefile
|
slouken@0
|
2510 |
src/audio/alsa/Makefile
|
slouken@0
|
2511 |
src/audio/arts/Makefile
|
slouken@0
|
2512 |
src/audio/baudio/Makefile
|
slouken@0
|
2513 |
src/audio/dma/Makefile
|
slouken@0
|
2514 |
src/audio/dmedia/Makefile
|
slouken@0
|
2515 |
src/audio/dsp/Makefile
|
slouken@0
|
2516 |
src/audio/esd/Makefile
|
slouken@0
|
2517 |
src/audio/macrom/Makefile
|
slouken@0
|
2518 |
src/audio/nas/Makefile
|
slouken@0
|
2519 |
src/audio/nto/Makefile
|
slouken@37
|
2520 |
src/audio/openbsd/Makefile
|
slouken@0
|
2521 |
src/audio/paudio/Makefile
|
slouken@0
|
2522 |
src/audio/sun/Makefile
|
slouken@0
|
2523 |
src/audio/ums/Makefile
|
slouken@0
|
2524 |
src/audio/windib/Makefile
|
slouken@0
|
2525 |
src/audio/windx5/Makefile
|
slouken@68
|
2526 |
src/audio/disk/Makefile
|
slouken@398
|
2527 |
src/audio/mint/Makefile
|
slouken@0
|
2528 |
src/video/Makefile
|
slouken@292
|
2529 |
src/video/XFree86/Makefile
|
slouken@292
|
2530 |
src/video/XFree86/extensions/Makefile
|
slouken@292
|
2531 |
src/video/XFree86/Xinerama/Makefile
|
slouken@292
|
2532 |
src/video/XFree86/Xv/Makefile
|
slouken@292
|
2533 |
src/video/XFree86/Xxf86dga/Makefile
|
slouken@292
|
2534 |
src/video/XFree86/Xxf86vm/Makefile
|
slouken@0
|
2535 |
src/video/cybergfx/Makefile
|
slouken@0
|
2536 |
src/video/x11/Makefile
|
slouken@0
|
2537 |
src/video/dga/Makefile
|
slouken@30
|
2538 |
src/video/nanox/Makefile
|
slouken@0
|
2539 |
src/video/fbcon/Makefile
|
slouken@167
|
2540 |
src/video/directfb/Makefile
|
slouken@70
|
2541 |
src/video/ps2gs/Makefile
|
slouken@0
|
2542 |
src/video/ggi/Makefile
|
slouken@0
|
2543 |
src/video/maccommon/Makefile
|
slouken@0
|
2544 |
src/video/macdsp/Makefile
|
slouken@0
|
2545 |
src/video/macrom/Makefile
|
slouken@47
|
2546 |
src/video/quartz/Makefile
|
slouken@0
|
2547 |
src/video/svga/Makefile
|
slouken@75
|
2548 |
src/video/vgl/Makefile
|
slouken@0
|
2549 |
src/video/aalib/Makefile
|
slouken@0
|
2550 |
src/video/wincommon/Makefile
|
slouken@0
|
2551 |
src/video/windib/Makefile
|
slouken@0
|
2552 |
src/video/windx5/Makefile
|
slouken@0
|
2553 |
src/video/bwindow/Makefile
|
slouken@0
|
2554 |
src/video/photon/Makefile
|
slouken@174
|
2555 |
src/video/epoc/Makefile
|
slouken@1
|
2556 |
src/video/dummy/Makefile
|
slouken@281
|
2557 |
src/video/ataricommon/Makefile
|
slouken@281
|
2558 |
src/video/xbios/Makefile
|
slouken@281
|
2559 |
src/video/gem/Makefile
|
slouken@371
|
2560 |
src/video/qtopia/Makefile
|
slouken@0
|
2561 |
src/events/Makefile
|
slouken@0
|
2562 |
src/joystick/Makefile
|
slouken@21
|
2563 |
src/joystick/amigaos/Makefile
|
slouken@0
|
2564 |
src/joystick/beos/Makefile
|
slouken@281
|
2565 |
src/joystick/bsd/Makefile
|
slouken@172
|
2566 |
src/joystick/darwin/Makefile
|
slouken@0
|
2567 |
src/joystick/dummy/Makefile
|
slouken@0
|
2568 |
src/joystick/linux/Makefile
|
slouken@0
|
2569 |
src/joystick/macos/Makefile
|
slouken@302
|
2570 |
src/joystick/mint/Makefile
|
slouken@0
|
2571 |
src/joystick/win32/Makefile
|
slouken@0
|
2572 |
src/cdrom/Makefile
|
slouken@153
|
2573 |
src/cdrom/aix/Makefile
|
slouken@153
|
2574 |
src/cdrom/beos/Makefile
|
slouken@153
|
2575 |
src/cdrom/dummy/Makefile
|
slouken@178
|
2576 |
src/cdrom/bsdi/Makefile
|
slouken@153
|
2577 |
src/cdrom/freebsd/Makefile
|
slouken@153
|
2578 |
src/cdrom/linux/Makefile
|
slouken@153
|
2579 |
src/cdrom/macos/Makefile
|
slouken@153
|
2580 |
src/cdrom/openbsd/Makefile
|
slouken@153
|
2581 |
src/cdrom/qnx/Makefile
|
slouken@153
|
2582 |
src/cdrom/win32/Makefile
|
slouken@0
|
2583 |
src/thread/Makefile
|
slouken@0
|
2584 |
src/timer/Makefile
|
slouken@0
|
2585 |
src/endian/Makefile
|
slouken@0
|
2586 |
src/file/Makefile
|
slouken@0
|
2587 |
src/hermes/Makefile
|
slouken@0
|
2588 |
sdl-config
|
slouken@0
|
2589 |
SDL.spec
|
slouken@0
|
2590 |
], [chmod +x sdl-config])
|