Mercurial > sdl-ios-xcode
annotate configure.in @ 5:ea6d917c9d51
Improved robustness for the ELO touchpad (thanks Alex!)
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 26 Apr 2001 16:55:37 +0000 |
parents | cf2af46e9e2a |
children | 735e5a8696d0 |
rev | line source |
---|---|
0 | 1 dnl Process this file with autoconf to produce a configure script. |
2 AC_INIT(README) | |
3 | |
4 dnl Set various version strings - taken gratefully from the GTk sources | |
5 # | |
6 # Making releases: | |
7 # Edit include/SDL/SDL_version.h and change the version, then: | |
8 # SDL_MICRO_VERSION += 1; | |
9 # SDL_INTERFACE_AGE += 1; | |
10 # SDL_BINARY_AGE += 1; | |
11 # if any functions have been added, set SDL_INTERFACE_AGE to 0. | |
12 # if backwards compatibility has been broken, | |
13 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0. | |
14 # | |
15 SDL_MAJOR_VERSION=1 | |
16 SDL_MINOR_VERSION=2 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
17 SDL_MICRO_VERSION=1 |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
18 SDL_INTERFACE_AGE=1 |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
19 SDL_BINARY_AGE=1 |
0 | 20 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION |
21 | |
22 AC_SUBST(SDL_MAJOR_VERSION) | |
23 AC_SUBST(SDL_MINOR_VERSION) | |
24 AC_SUBST(SDL_MICRO_VERSION) | |
25 AC_SUBST(SDL_INTERFACE_AGE) | |
26 AC_SUBST(SDL_BINARY_AGE) | |
27 AC_SUBST(SDL_VERSION) | |
28 | |
29 # libtool versioning | |
30 LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION | |
31 LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE` | |
32 LT_REVISION=$SDL_INTERFACE_AGE | |
33 LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE` | |
34 | |
35 AC_SUBST(LT_RELEASE) | |
36 AC_SUBST(LT_CURRENT) | |
37 AC_SUBST(LT_REVISION) | |
38 AC_SUBST(LT_AGE) | |
39 | |
40 dnl Setup for automake | |
41 AM_INIT_AUTOMAKE(SDL, $SDL_VERSION) | |
42 | |
43 dnl Detect the canonical host and target build environment | |
44 AC_CANONICAL_HOST | |
45 AC_CANONICAL_TARGET | |
46 | |
47 dnl Check for tools | |
48 | |
49 AC_LIBTOOL_WIN32_DLL | |
50 AM_PROG_LIBTOOL | |
51 AC_PROG_MAKE_SET | |
52 AC_PROG_CC | |
53 AC_C_INLINE | |
54 AC_C_CONST | |
55 case "$target" in | |
56 *-*-beos*) | |
57 AC_PROG_CXX | |
58 ;; | |
59 *-*-aix*) | |
60 AC_PROG_CXX | |
61 ;; | |
62 # This is stupid, but necessary on some versions of Linux (joysticks) | |
63 *-*-linux*) | |
64 AC_PROG_CXX | |
65 ;; | |
66 esac | |
67 AC_PROG_INSTALL | |
68 AC_FUNC_ALLOCA | |
69 | |
70 dnl The alpha architecture needs special flags for binary portability | |
71 case "$target" in | |
72 alpha*-*-linux*) | |
73 if test x$ac_cv_prog_gcc = xyes; then | |
74 CFLAGS="$CFLAGS -mcpu=ev4 -Wa,-mall" | |
75 fi | |
76 ;; | |
77 esac | |
78 | |
79 dnl Add compiler-specific optimization flags | |
80 | |
81 dnl See if the user wants aggressive optimizations of the code | |
82 AC_ARG_ENABLE(debug, | |
83 [ --enable-debug Disable aggressive optimizations [default=yes]], | |
84 , enable_debug=yes) | |
85 if test x$enable_debug != xyes; then | |
86 if test x$ac_cv_prog_gcc = xyes; then | |
87 CFLAGS="$CFLAGS -fexpensive-optimizations" | |
88 # Ack! This breaks the MMX YV12 conversion on gcc 2.95.2 | |
89 # CFLAGS="$CFLAGS -fomit-frame-pointer" | |
90 fi | |
91 case "$target" in | |
92 i486-*-*) | |
93 if test x$ac_cv_prog_gcc = xyes; then | |
94 CFLAGS="$CFLAGS -march=486" | |
95 fi | |
96 ;; | |
97 i?86-*-*) | |
98 if test x$ac_cv_prog_gcc = xyes; then | |
99 CFLAGS="$CFLAGS -march=pentium -mcpu=pentiumpro" | |
100 fi | |
101 ;; | |
102 *-*-osf*) | |
103 if test x$ac_cv_prog_gcc != xyes; then | |
104 CFLAGS="-g3 -fast -arch host" | |
105 fi | |
106 ;; | |
107 esac | |
108 fi | |
109 | |
110 dnl Add verbose warnings by default, and allow ANSI compliance checking | |
111 AC_ARG_ENABLE(strict-ansi, | |
112 [ --enable-strict-ansi Enable strict ANSI compliance build [default=no]], | |
113 , enable_strict_ansi=no) | |
114 if test x$ac_cv_prog_gcc = xyes; then | |
115 CFLAGS="$CFLAGS -Wall" | |
116 if test x$enable_strict_ansi = xyes; then | |
117 CFLAGS="$CFLAGS -ansi -pedantic -D_XOPEN_SOURCE" | |
118 fi | |
119 fi | |
120 | |
121 dnl Initialize the compiler and linker flags for SDL applications | |
122 | |
123 SDL_CFLAGS="" | |
124 SDL_LIBS="-lSDL" | |
125 | |
126 dnl Add the math library for the new gamma correction support | |
127 | |
128 case "$target" in | |
129 *-*-cygwin* | *-*-mingw32*) | |
130 MATHLIB="" | |
131 ;; | |
132 *-*-beos*) | |
133 MATHLIB="" | |
134 ;; | |
135 *-*-darwin*) | |
136 MATHLIB="" | |
137 ;; | |
138 *) | |
139 MATHLIB="-lm" | |
140 ;; | |
141 esac | |
142 SYSTEM_LIBS="$SYSTEM_LIBS $MATHLIB" | |
143 | |
144 dnl Enable/disable various subsystems of the SDL library | |
145 | |
146 AC_ARG_ENABLE(audio, | |
147 [ --enable-audio Enable the audio subsystem [default=yes]], | |
148 , enable_audio=yes) | |
149 if test x$enable_audio = xyes; then | |
150 SDL_EXTRADIRS="$SDL_EXTRADIRS audio" | |
151 SDL_EXTRALIBS="$SDL_EXTRALIBS audio/libaudio.la" | |
152 else | |
153 CFLAGS="$CFLAGS -DDISABLE_AUDIO" | |
154 fi | |
155 AC_ARG_ENABLE(video, | |
156 [ --enable-video Enable the video subsystem [default=yes]], | |
157 , enable_video=yes) | |
158 if test x$enable_video = xyes; then | |
159 SDL_EXTRADIRS="$SDL_EXTRADIRS video" | |
160 SDL_EXTRALIBS="$SDL_EXTRALIBS video/libvideo.la" | |
161 else | |
162 CFLAGS="$CFLAGS -DDISABLE_VIDEO" | |
163 fi | |
164 AC_ARG_ENABLE(events, | |
165 [ --enable-events Enable the events subsystem [default=yes]], | |
166 , enable_events=yes) | |
167 if test x$enable_video = xyes -a x$enable_events = xyes; then | |
168 SDL_EXTRADIRS="$SDL_EXTRADIRS events" | |
169 SDL_EXTRALIBS="$SDL_EXTRALIBS events/libevents.la" | |
170 else | |
171 CFLAGS="$CFLAGS -DDISABLE_EVENTS" | |
172 fi | |
173 AC_ARG_ENABLE(joystick, | |
174 [ --enable-joystick Enable the joystick subsystem [default=yes]], | |
175 , enable_joystick=yes) | |
176 if test x$enable_joystick = xyes; then | |
177 SDL_EXTRADIRS="$SDL_EXTRADIRS joystick" | |
178 SDL_EXTRALIBS="$SDL_EXTRALIBS joystick/libjoystick.la" | |
179 else | |
180 CFLAGS="$CFLAGS -DDISABLE_JOYSTICK" | |
181 fi | |
182 AC_ARG_ENABLE(cdrom, | |
183 [ --enable-cdrom Enable the cdrom subsystem [default=yes]], | |
184 , enable_cdrom=yes) | |
185 if test x$enable_cdrom = xyes; then | |
186 SDL_EXTRADIRS="$SDL_EXTRADIRS cdrom" | |
187 SDL_EXTRALIBS="$SDL_EXTRALIBS cdrom/libcdrom.la" | |
188 else | |
189 CFLAGS="$CFLAGS -DDISABLE_CDROM" | |
190 fi | |
191 AC_ARG_ENABLE(threads, | |
192 [ --enable-threads Enable the threading subsystem [default=yes]], | |
193 , enable_threads=yes) | |
194 SDL_EXTRADIRS="$SDL_EXTRADIRS thread" | |
195 SDL_EXTRALIBS="$SDL_EXTRALIBS thread/libthread.la" | |
196 if test x$enable_threads != xyes; then | |
197 CFLAGS="$CFLAGS -DDISABLE_THREADS" | |
198 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) | |
199 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h) | |
200 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
201 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
202 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
203 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
204 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
205 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
206 fi | |
207 AC_ARG_ENABLE(timers, | |
208 [ --enable-timers Enable the timer subsystem [default=yes]], | |
209 , enable_timers=yes) | |
210 if test x$enable_timers = xyes; then | |
211 SDL_EXTRADIRS="$SDL_EXTRADIRS timer" | |
212 SDL_EXTRALIBS="$SDL_EXTRALIBS timer/libtimer.la" | |
213 else | |
214 CFLAGS="$CFLAGS -DDISABLE_TIMERS" | |
215 fi | |
216 AC_ARG_ENABLE(endian, | |
217 [ --enable-endian Enable the endian subsystem [default=yes]], | |
218 , enable_endian=yes) | |
219 if test x$enable_endian = xyes; then | |
220 SDL_EXTRADIRS="$SDL_EXTRADIRS endian" | |
221 SDL_EXTRALIBS="$SDL_EXTRALIBS endian/libendian.la" | |
222 else | |
223 CFLAGS="$CFLAGS -DDISABLE_ENDIAN" | |
224 fi | |
225 AC_ARG_ENABLE(file, | |
226 [ --enable-file Enable the file subsystem [default=yes]], | |
227 , enable_file=yes) | |
228 if test x$enable_file = xyes; then | |
229 SDL_EXTRADIRS="$SDL_EXTRADIRS file" | |
230 SDL_EXTRALIBS="$SDL_EXTRALIBS file/libfile.la" | |
231 else | |
232 CFLAGS="$CFLAGS -DDISABLE_FILE" | |
233 fi | |
234 | |
235 dnl See if the OSS audio interface is supported | |
236 CheckOSS() | |
237 { | |
238 AC_ARG_ENABLE(oss, | |
239 [ --enable-oss support the OSS audio API [default=yes]], | |
240 , enable_oss=yes) | |
241 if test x$enable_audio = xyes -a x$enable_oss = xyes; then | |
242 AC_MSG_CHECKING(for OSS audio support) | |
243 have_oss=no | |
244 AC_TRY_COMPILE([ | |
245 #ifdef linux | |
246 #include <linux/soundcard.h> | |
247 #endif | |
248 #ifdef __FreeBSD__ | |
249 #include <machine/soundcard.h> | |
250 #endif | |
251 #ifdef __bsdi__ | |
252 #include <sys/soundcard.h> | |
253 #endif | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
254 #ifdef __OpenBSD__ |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
255 #include <soundcard.h> |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
256 #endif |
0 | 257 #ifdef __USLC__ |
258 #include <sys/soundcard.h> | |
259 #endif | |
260 ],[ | |
261 int arg = SNDCTL_DSP_SETFRAGMENT; | |
262 ],[ | |
263 have_oss=yes | |
264 ]) | |
265 AC_MSG_RESULT($have_oss) | |
266 if test x$have_oss = xyes; then | |
267 CFLAGS="$CFLAGS -DOSS_SUPPORT" | |
268 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dsp" | |
269 AUDIO_DRIVERS="$AUDIO_DRIVERS dsp/libaudio_dsp.la" | |
270 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dma" | |
271 AUDIO_DRIVERS="$AUDIO_DRIVERS dma/libaudio_dma.la" | |
272 fi | |
273 fi | |
274 } | |
275 | |
276 dnl See if the ALSA audio interface is supported | |
277 CheckALSA() | |
278 { | |
279 AC_ARG_ENABLE(alsa, | |
280 [ --enable-alsa support the ALSA audio API [default=yes]], | |
281 , enable_alsa=yes) | |
282 if test x$enable_audio = xyes -a x$enable_alsa = xyes; then | |
283 have_alsa=no | |
284 AC_CHECK_HEADER(sys/asoundlib.h, have_alsa_hdr=yes) | |
285 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa_lib=yes) | |
286 if test x$have_alsa_hdr = xyes -a x$have_alsa_lib = xyes; then | |
287 CFLAGS="$CFLAGS -DALSA_SUPPORT" | |
288 SYSTEM_LIBS="$SYSTEM_LIBS -lasound" | |
289 AUDIO_SUBDIRS="$AUDIO_SUBDIRS alsa" | |
290 AUDIO_DRIVERS="$AUDIO_DRIVERS alsa/libaudio_alsa.la" | |
291 fi | |
292 fi | |
293 } | |
294 | |
295 dnl Find the ESD includes and libraries | |
296 CheckESD() | |
297 { | |
298 AC_ARG_ENABLE(esd, | |
299 [ --enable-esd support the Enlightened Sound Daemon [default=yes]], | |
300 , enable_esd=yes) | |
301 if test x$enable_audio = xyes -a x$enable_esd = xyes; then | |
302 AM_PATH_ESD(0.2.8, [ | |
303 CFLAGS="$CFLAGS -DESD_SUPPORT $ESD_CFLAGS" | |
304 SYSTEM_LIBS="$SYSTEM_LIBS $ESD_LIBS" | |
305 AUDIO_SUBDIRS="$AUDIO_SUBDIRS esd" | |
306 AUDIO_DRIVERS="$AUDIO_DRIVERS esd/libaudio_esd.la" | |
307 ]) | |
308 fi | |
309 } | |
310 | |
311 CheckARTSC() | |
312 { | |
313 AC_ARG_ENABLE(arts, | |
314 [ --enable-arts support the Analog Real Time Synthesizer [default=yes]], | |
315 , enable_arts=yes) | |
316 if test x$enable_audio = xyes -a x$enable_arts = xyes; then | |
317 AC_PATH_PROG(ARTSCCONFIG, artsc-config) | |
318 if test x$ARTSCCONFIG = x -o x$ARTSCCONFIG = x'"$ARTSCCONFIG"'; then | |
319 : # arts isn't installed | |
320 else | |
321 ARTSC_CFLAGS=`$ARTSCCONFIG --cflags` | |
322 ARTSC_LIBS=`$ARTSCCONFIG --libs` | |
323 AC_MSG_CHECKING(for aRts development environment) | |
324 audio_arts=no | |
325 save_CFLAGS="$CFLAGS" | |
326 CFLAGS="$CFLAGS $ARTSC_CFLAGS" | |
327 AC_TRY_COMPILE([ | |
328 #include <artsc.h> | |
329 ],[ | |
330 arts_stream_t stream; | |
331 ],[ | |
332 audio_arts=yes | |
333 ]) | |
334 CFLAGS="$save_CFLAGS" | |
335 AC_MSG_RESULT($audio_arts) | |
336 if test x$audio_arts = xyes; then | |
337 CFLAGS="$CFLAGS -DARTSC_SUPPORT $ARTSC_CFLAGS" | |
338 SYSTEM_LIBS="$SYSTEM_LIBS $ARTSC_LIBS" | |
339 AUDIO_SUBDIRS="$AUDIO_SUBDIRS arts" | |
340 AUDIO_DRIVERS="$AUDIO_DRIVERS arts/libaudio_arts.la" | |
341 fi | |
342 fi | |
343 fi | |
344 } | |
345 | |
346 dnl See if the NAS audio interface is supported | |
347 CheckNAS() | |
348 { | |
349 AC_ARG_ENABLE(nas, | |
350 [ --enable-nas support the NAS audio API [default=yes]], | |
351 , enable_nas=yes) | |
352 if test x$enable_audio = xyes -a x$enable_nas = xyes; then | |
353 AC_MSG_CHECKING(for NAS audio support) | |
354 have_nas=no | |
355 if test -r /usr/X11R6/include/audio/audiolib.h ; then | |
356 have_nas=yes | |
357 fi | |
358 AC_MSG_RESULT($have_nas) | |
359 if test x$have_nas = xyes; then | |
360 CFLAGS="$CFLAGS -DNAS_SUPPORT" | |
361 SYSTEM_LIBS="$SYSTEM_LIBS -laudio -lXt" | |
362 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nas" | |
363 AUDIO_DRIVERS="$AUDIO_DRIVERS nas/libaudio_nas.la" | |
364 fi | |
365 fi | |
366 } | |
367 | |
368 dnl See if we can use x86 assembly blitters | |
369 CheckNASM() | |
370 { | |
371 dnl Make sure we are running on an x86 platform | |
372 case $target in | |
373 i?86*) | |
374 ;; | |
375 *) | |
376 # Nope, bail early. | |
377 return | |
378 ;; | |
379 esac | |
380 dnl Check for NASM (for assembly blit routines) | |
381 AC_ARG_ENABLE(nasm, | |
382 [ --enable-nasm use nasm assembly blitters on x86 [default=yes]], | |
383 , enable_nasm=yes) | |
384 if test x$enable_video = xyes -a x$enable_nasm = xyes; then | |
385 AC_PATH_PROG(NASM, nasm) | |
386 if test x$NASM = x -o x$NASM = x'"$NASM"'; then | |
387 : # nasm isn't installed | |
388 else | |
389 CFLAGS="$CFLAGS -DUSE_ASMBLIT -I$srcdir/hermes" | |
390 case $ARCH in | |
391 win32) | |
392 NASMFLAGS="-f win32" | |
393 ;; | |
394 *) | |
395 NASMFLAGS="-f elf" | |
396 ;; | |
397 esac | |
398 AC_SUBST(NASMFLAGS) | |
399 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes" | |
400 SDL_EXTRADIRS="$SDL_EXTRADIRS hermes" | |
401 SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la" | |
402 fi | |
403 fi | |
404 } | |
405 | |
406 dnl Find the X11 include and library directories | |
407 CheckX11() | |
408 { | |
409 AC_ARG_ENABLE(video-x11, | |
410 [ --enable-video-x11 use X11 video driver [default=yes]], | |
411 , enable_video_x11=yes) | |
412 if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then | |
413 AC_PATH_X | |
414 AC_PATH_XTRA | |
415 if test x$have_x = xyes; then | |
416 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_X11" | |
417 if test x$ac_cv_func_shmat != xyes; then | |
418 CFLAGS="$CFLAGS -DNO_SHARED_MEMORY" | |
419 fi | |
420 SYSTEM_LIBS="$SYSTEM_LIBS $X_LIBS -lX11 -lXext" | |
421 VIDEO_SUBDIRS="$VIDEO_SUBDIRS x11" | |
422 VIDEO_DRIVERS="$VIDEO_DRIVERS x11/libvideo_x11.la" | |
423 | |
424 AC_ARG_ENABLE(video-x11-vm, | |
425 [ --enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]], | |
426 , enable_video_x11_vm=yes) | |
427 if test x$enable_video_x11_vm = xyes; then | |
428 AC_MSG_CHECKING(for XFree86 VidMode 1.0 support) | |
429 video_x11_vm=no | |
430 AC_TRY_COMPILE([ | |
431 #include <X11/Xlib.h> | |
432 #include <X11/extensions/xf86vmode.h> | |
433 ],[ | |
434 ],[ | |
435 video_x11_vm=yes | |
436 ]) | |
437 AC_MSG_RESULT($video_x11_vm) | |
438 if test x$video_x11_vm = xyes; then | |
439 CFLAGS="$CFLAGS -DXFREE86_VM" | |
440 # Check for nasty XFree86 4.0/Glide hack | |
441 AC_ARG_ENABLE(xfree86_glidehack, | |
442 [ --enable-xfree86-glidehack Alternate vidmode lib for old Glide [default=no]], | |
443 , enable_xfreeglidehack=no) | |
444 if test x$enable_xfree86_glidehack = xyes; then | |
445 ac_save_libs="$LIBS" | |
446 LIBS="$LIBS $X_LIBS -lX11 -lXext" | |
447 if test x$xfree86_glidehack = x; then | |
448 AC_CHECK_LIB(Xxf86vm, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm) | |
449 fi | |
450 if test x$xfree86_glidehack = x; then | |
451 AC_CHECK_LIB(Xxf86vm40, XF40VidModeQueryExtension, xfree86_glidehack=Xxf86vm40) | |
452 fi | |
453 LIBS="$ac_save_libs" | |
454 fi | |
455 if test x$xfree86_glidehack != x; then | |
456 CFLAGS="$CFLAGS -DXFREE86_VM_DYNAMIC_HACK" | |
457 SYSTEM_LIBS="$SYSTEM_LIBS -l$xfree86_glidehack" | |
458 else | |
459 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86vm" | |
460 fi | |
461 AC_MSG_CHECKING(for XFree86 VidMode gamma support) | |
462 video_x11_vmgamma=no | |
463 AC_TRY_COMPILE([ | |
464 #include <X11/Xlib.h> | |
465 #include <X11/extensions/xf86vmode.h> | |
466 ],[ | |
467 XF86VidModeGamma gamma; | |
468 ],[ | |
469 video_x11_vmgamma=yes | |
470 ]) | |
471 AC_MSG_RESULT($video_x11_vmgamma) | |
472 if test x$video_x11_vmgamma = xyes; then | |
473 CFLAGS="$CFLAGS -DXFREE86_VMGAMMA" | |
474 fi | |
475 fi | |
476 fi | |
477 AC_ARG_ENABLE(video-x11-dgamouse, | |
478 [ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]], | |
479 , enable_video_x11_dgamouse=yes) | |
480 AC_MSG_CHECKING(for XFree86 DGA 1.0 support) | |
481 video_x11_dga=no | |
482 AC_TRY_COMPILE([ | |
483 #include <X11/Xlib.h> | |
484 #include <X11/extensions/xf86dga.h> | |
485 ],[ | |
486 ],[ | |
487 video_x11_dga=yes | |
488 ]) | |
489 AC_MSG_RESULT($video_x11_dga) | |
490 if test x$video_x11_dga = xyes; then | |
491 CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE" | |
492 if test x$enable_video_x11_dgamouse = xyes; then | |
493 CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE" | |
494 fi | |
495 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga" | |
496 fi | |
497 AC_ARG_ENABLE(video-x11-xv, | |
498 [ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]], | |
499 , enable_video_x11_xv=yes) | |
500 if test x$enable_video_x11_xv = xyes; then | |
501 AC_MSG_CHECKING(for XFree86 XvImage support) | |
502 video_x11_xv=no | |
503 AC_TRY_COMPILE([ | |
504 #include <X11/Xlib.h> | |
505 #include <sys/ipc.h> | |
506 #include <sys/shm.h> | |
507 #include <X11/extensions/XShm.h> | |
508 #include <X11/extensions/Xvlib.h> | |
509 ],[ | |
510 XvImage *image; | |
511 ],[ | |
512 video_x11_xv=yes | |
513 ]) | |
514 AC_MSG_RESULT($video_x11_xv) | |
515 if test x$video_x11_xv = xyes; then | |
516 CFLAGS="$CFLAGS -DXFREE86_XV" | |
517 SYSTEM_LIBS="$SYSTEM_LIBS -lXv" | |
518 fi | |
519 fi | |
520 fi | |
521 fi | |
522 } | |
523 CheckPHOTON() | |
524 { | |
525 AC_ARG_ENABLE(video-photon, | |
526 [ --enable-video-photon use QNX Photonvideo driver [default=yes]], | |
527 , enable_video_photon=yes) | |
528 if test x$enable_video = xyes -a x$enable_video_photon = xyes; then | |
529 AC_MSG_CHECKING(for QNX Photon support) | |
530 video_photon=no | |
531 AC_TRY_COMPILE([ | |
532 #include <Ph.h> | |
533 #include <Pt.h> | |
534 #include <photon/Pg.h> | |
535 #include <photon/PdDirect.h> | |
536 ],[ | |
537 PgDisplaySettings_t *visual; | |
538 ],[ | |
539 video_photon=yes | |
540 ]) | |
541 AC_MSG_RESULT($video_photon) | |
542 if test x$video_photon = xyes; then | |
543 SYSTEM_LIBS="$SYSTEM_LIBS -lph" | |
544 VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon" | |
545 VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la" | |
546 fi | |
547 fi | |
548 } | |
549 | |
550 dnl Find the X11 DGA 2.0 include and library directories | |
551 CheckDGA() | |
552 { | |
553 AC_ARG_ENABLE(video-dga, | |
554 [ --enable-video-dga use DGA 2.0 video driver [default=yes]], | |
555 , enable_video_dga=yes) | |
556 if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then | |
557 AC_MSG_CHECKING(for XFree86 DGA 2.0 support) | |
558 video_x11_dga2=no | |
559 AC_TRY_COMPILE([ | |
560 #include <X11/Xlib.h> | |
561 #include <X11/extensions/xf86dga.h> | |
562 ],[ | |
563 XDGAEvent xevent; | |
564 ],[ | |
565 video_x11_dga2=yes | |
566 ]) | |
567 AC_MSG_RESULT($video_x11_dga2) | |
568 if test x$video_x11_dga2 = xyes; then | |
569 CFLAGS="$CFLAGS -DENABLE_DGA" | |
570 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga" | |
571 VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la" | |
572 fi | |
573 fi | |
574 } | |
575 | |
576 dnl Find the framebuffer console includes | |
577 CheckFBCON() | |
578 { | |
579 AC_ARG_ENABLE(video-fbcon, | |
580 [ --enable-video-fbcon use framebuffer console video driver [default=yes]], | |
581 , enable_video_fbcon=yes) | |
582 if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then | |
583 AC_MSG_CHECKING(for framebuffer console support) | |
584 video_fbcon=no | |
585 AC_TRY_COMPILE([ | |
586 #include <linux/fb.h> | |
587 #include <linux/kd.h> | |
588 #include <linux/keyboard.h> | |
589 ],[ | |
590 ],[ | |
591 video_fbcon=yes | |
592 ]) | |
593 AC_MSG_RESULT($video_fbcon) | |
594 if test x$video_fbcon = xyes; then | |
595 CFLAGS="$CFLAGS -DENABLE_FBCON" | |
596 VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon" | |
597 VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la" | |
598 fi | |
599 fi | |
600 } | |
601 | |
602 dnl Find the GGI includes | |
603 CheckGGI() | |
604 { | |
605 AC_ARG_ENABLE(video-ggi, | |
606 [ --enable-video-ggi use GGI video driver [default=no]], | |
607 , enable_video_ggi=no) | |
608 if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then | |
609 AC_MSG_CHECKING(for GGI support) | |
610 video_ggi=no | |
611 AC_TRY_COMPILE([ | |
612 #include <ggi/ggi.h> | |
613 #include <ggi/gii.h> | |
614 ],[ | |
615 ],[ | |
616 video_ggi=yes | |
617 ]) | |
618 AC_MSG_RESULT($video_ggi) | |
619 if test x$video_ggi = xyes; then | |
620 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI" | |
621 SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg" | |
622 | |
623 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi" | |
624 VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la" | |
625 fi | |
626 fi | |
627 } | |
628 | |
629 dnl Find the SVGAlib includes and libraries | |
630 CheckSVGA() | |
631 { | |
632 AC_ARG_ENABLE(video-svga, | |
633 [ --enable-video-svga use SVGAlib video driver [default=no]], | |
634 , enable_video_svga=no) | |
635 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then | |
636 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) | |
637 video_svga=no | |
638 AC_TRY_COMPILE([ | |
639 #include <vga.h> | |
640 #include <vgamouse.h> | |
641 #include <vgakeyboard.h> | |
642 ],[ | |
643 if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) { | |
644 exit(0); | |
645 } | |
646 ],[ | |
647 video_svga=yes | |
648 ]) | |
649 AC_MSG_RESULT($video_svga) | |
650 if test x$video_svga = xyes; then | |
651 CFLAGS="$CFLAGS -DENABLE_SVGALIB" | |
652 SYSTEM_LIBS="$SYSTEM_LIBS -lvga" | |
653 | |
654 VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga" | |
655 VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la" | |
656 fi | |
657 fi | |
658 } | |
659 | |
660 dnl Find the AAlib includes | |
661 CheckAAlib() | |
662 { | |
663 AC_ARG_ENABLE(video-aalib, | |
664 [ --enable-video-aalib use AAlib video driver [default=no]], | |
665 , enable_video_aalib=no) | |
666 if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then | |
667 AC_MSG_CHECKING(for AAlib support) | |
668 video_aalib=no | |
669 AC_TRY_COMPILE([ | |
670 #include <aalib.h> | |
671 ],[ | |
672 ],[ | |
673 video_aalib=yes | |
674 ]) | |
675 AC_MSG_RESULT($video_aalib) | |
676 if test x$video_aalib = xyes; then | |
677 CFLAGS="$CFLAGS -DENABLE_AALIB" | |
678 SYSTEM_LIBS="$SYSTEM_LIBS -laa" | |
679 | |
680 VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib" | |
681 VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la" | |
682 fi | |
683 fi | |
684 } | |
685 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
686 dnl rcg04172001 Set up the Null video driver. |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
687 CheckDummyVideo() |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
688 { |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
689 AC_ARG_ENABLE(video-dummy, |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
690 [ --enable-video-dummy use dummy video driver [default=no]], |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
691 , enable_video_dummy=no) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
692 if test x$enable_video_dummy = xyes; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
693 CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
694 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
695 VIDEO_DRIVERS="$VIDEO_DRIVERS dummy/libvideo_null.la" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
696 fi |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
697 } |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
698 |
0 | 699 dnl Check to see if OpenGL support is desired |
700 AC_ARG_ENABLE(video-opengl, | |
701 [ --enable-video-opengl include OpenGL context creation [default=yes]], | |
702 , enable_video_opengl=yes) | |
703 | |
704 dnl Find OpenGL | |
705 CheckOpenGL() | |
706 { | |
707 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
708 AC_MSG_CHECKING(for OpenGL (GLX) support) | |
709 video_opengl=no | |
710 AC_TRY_COMPILE([ | |
711 #include <GL/gl.h> | |
712 #include <GL/glx.h> | |
713 #include <dlfcn.h> /* For loading extensions */ | |
714 ],[ | |
715 ],[ | |
716 video_opengl=yes | |
717 ]) | |
718 AC_MSG_RESULT($video_opengl) | |
719 if test x$video_opengl = xyes; then | |
720 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
721 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl") | |
722 fi | |
723 fi | |
724 } | |
725 | |
726 dnl Check for BeOS OpenGL | |
727 CheckBeGL() | |
728 { | |
729 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
730 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
731 SYSTEM_LIBS="$SYSTEM_LIBS -lGL" | |
732 fi | |
733 } | |
734 | |
735 dnl Check for MacOS OpenGL | |
736 CheckMacGL() | |
737 { | |
738 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
739 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
740 case "$target" in | |
741 *-*-darwin*) | |
742 SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL" | |
743 esac | |
744 fi | |
745 } | |
746 | |
747 dnl See if we can use the new unified event interface in Linux 2.4 | |
748 CheckInputEvents() | |
749 { | |
750 dnl Check for Linux 2.4 unified input event interface support | |
751 AC_ARG_ENABLE(input-events, | |
752 [ --enable-input-events use Linux 2.4 unified input interface [default=yes]], | |
753 , enable_input_events=yes) | |
754 if test x$enable_input_events = xyes; then | |
755 AC_MSG_CHECKING(for Linux 2.4 unified input interface) | |
756 use_input_events=no | |
757 AC_TRY_COMPILE([ | |
758 #include <linux/input.h> | |
759 ],[ | |
760 #ifndef EVIOCGNAME | |
761 #error EVIOCGNAME() ioctl not available | |
762 #endif | |
763 ],[ | |
764 use_input_events=yes | |
765 ]) | |
766 AC_MSG_RESULT($use_input_events) | |
767 if test x$use_input_events = xyes; then | |
768 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS" | |
769 fi | |
770 fi | |
771 } | |
772 | |
773 dnl See what type of thread model to use on Linux and Solaris | |
774 CheckPTHREAD() | |
775 { | |
776 dnl Check for pthread support | |
777 AC_ARG_ENABLE(pthreads, | |
778 [ --enable-pthreads use POSIX threads for multi-threading [default=yes]], | |
779 , enable_pthreads=yes) | |
780 dnl This is used on Linux for glibc binary compatibility (Doh!) | |
781 AC_ARG_ENABLE(pthread-sem, | |
782 [ --enable-pthread-sem use pthread semaphores [default=yes]], | |
783 , enable_pthread_sem=yes) | |
784 ac_save_libs="$LIBS" | |
785 case "$target" in | |
786 *-*-bsdi*) | |
787 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
788 pthread_lib="" | |
789 ;; | |
790 *-*-darwin*) | |
791 pthread_cflags="-D_THREAD_SAFE" | |
792 # causes Carbon.p complaints? | |
793 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
794 ;; | |
795 *-*-freebsd*) | |
796 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
797 pthread_lib="-pthread" | |
798 ;; | |
799 *-*-openbsd*) | |
800 pthread_cflags="-D_REENTRANT" | |
801 pthread_lib="-pthread" | |
802 ;; | |
803 *-*-solaris*) | |
804 pthread_cflags="-D_REENTRANT" | |
805 pthread_lib="-lpthread -lposix4" | |
806 ;; | |
807 *-*-sysv5*) | |
808 pthread_cflags="-D_REENTRANT -Kthread" | |
809 pthread_lib="" | |
810 ;; | |
811 *-*-irix*) | |
812 pthread_cflags="-D_SGI_MP_SOURCE" | |
813 pthread_lib="-lpthread" | |
814 ;; | |
815 *-*-aix*) | |
816 pthread_cflags="-D_REENTRANT -mthreads" | |
817 pthread_lib="-lpthread" | |
818 ;; | |
819 *-*-qnx*) | |
820 pthread_cflags="" | |
821 pthread_lib="" | |
822 ;; | |
823 *) | |
824 pthread_cflags="-D_REENTRANT" | |
825 pthread_lib="-lpthread" | |
826 ;; | |
827 esac | |
828 LIBS="$LIBS $pthread_lib" | |
829 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then | |
830 AC_MSG_CHECKING(for pthreads) | |
831 use_pthreads=no | |
832 AC_TRY_LINK([ | |
833 #include <pthread.h> | |
834 ],[ | |
835 pthread_attr_t type; | |
836 pthread_attr_init(&type); | |
837 ],[ | |
838 use_pthreads=yes | |
839 ]) | |
840 AC_MSG_RESULT($use_pthreads) | |
841 if test x$use_pthreads = xyes; then | |
842 CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS" | |
843 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" | |
844 SDL_LIBS="$SDL_LIBS $pthread_lib" | |
845 | |
846 # Check to see if recursive mutexes are available | |
847 AC_MSG_CHECKING(for recursive mutexes) | |
848 has_recursive_mutexes=no | |
849 AC_TRY_LINK([ | |
850 #include <pthread.h> | |
851 ],[ | |
852 pthread_mutexattr_t attr; | |
853 #ifdef linux | |
854 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP); | |
855 #else | |
856 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); | |
857 #endif | |
858 ],[ | |
859 has_recursive_mutexes=yes | |
860 ]) | |
861 # Some systems have broken recursive mutex implementations | |
862 case "$target" in | |
863 *-*-solaris*) | |
864 has_recursive_mutexes=no | |
865 ;; | |
866 esac | |
867 AC_MSG_RESULT($has_recursive_mutexes) | |
868 if test x$has_recursive_mutexes != xyes; then | |
869 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX" | |
870 fi | |
871 | |
872 # Check to see if this is broken glibc 2.0 pthreads | |
873 case "$target" in | |
874 *-*-linux*) | |
875 AC_MSG_CHECKING(for broken glibc 2.0 pthreads) | |
876 glibc20_pthreads=no | |
877 AC_TRY_COMPILE([ | |
878 #include <features.h> | |
879 #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0) | |
880 #warning Working around a bug in glibc 2.0 pthreads | |
881 #else | |
882 #error pthread implementation okay | |
883 #endif /* glibc 2.0 */ | |
884 ],[ | |
885 ],[ | |
886 glibc20_pthreads=yes | |
887 ]) | |
888 AC_MSG_RESULT($glibc20_pthreads) | |
889 esac | |
890 fi | |
891 fi | |
892 LIBS="$ac_save_libs" | |
893 | |
894 AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h) | |
895 have_semun=no | |
896 AC_TRY_COMPILE([ | |
897 #include <sys/types.h> | |
898 #include <sys/sem.h> | |
899 ],[ | |
900 union semun t; | |
901 ],[ | |
902 have_semun=yes | |
903 ]) | |
904 AC_MSG_RESULT($have_semun) | |
905 if test x$have_semun = xyes; then | |
906 CFLAGS="$CFLAGS -DHAVE_SEMUN" | |
907 fi | |
908 | |
909 # See if we can use clone() on Linux directly | |
910 use_clone=no | |
911 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then | |
912 case "$target" in | |
913 *-*-linux*) | |
914 use_clone=yes | |
915 ;; | |
916 *) | |
917 CFLAGS="$CFLAGS -DFORK_HACK" | |
918 ;; | |
919 esac | |
920 fi | |
921 AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes) | |
922 } | |
923 | |
924 dnl Determine whether the compiler can produce Win32 executables | |
925 CheckWIN32() | |
926 { | |
927 AC_MSG_CHECKING(Win32 compiler) | |
928 have_win32_gcc=no | |
929 AC_TRY_COMPILE([ | |
930 #include <windows.h> | |
931 ],[ | |
932 ],[ | |
933 have_win32_gcc=yes | |
934 ]) | |
935 AC_MSG_RESULT($have_win32_gcc) | |
936 if test x$have_win32_gcc != xyes; then | |
937 AC_MSG_ERROR([ | |
938 *** Your compiler ($CC) does not produce Win32 executables! | |
939 ]) | |
940 fi | |
941 | |
942 dnl See if the user wants to redirect standard output to files | |
943 AC_ARG_ENABLE(stdio-redirect, | |
944 [ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]], | |
945 , enable_stdio_redirect=yes) | |
946 if test x$enable_stdio_redirect != xyes; then | |
947 CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT" | |
948 fi | |
949 } | |
950 | |
951 dnl Find the DirectX includes and libraries | |
952 CheckDIRECTX() | |
953 { | |
954 AC_ARG_ENABLE(directx, | |
955 [ --enable-directx use DirectX for Win32 audio/video [default=yes]], | |
956 , enable_directx=yes) | |
957 if test x$enable_directx = xyes; then | |
958 AC_MSG_CHECKING(for DirectX headers and libraries) | |
959 use_directx=no | |
960 AC_TRY_COMPILE([ | |
961 #include "src/video/windx5/directx.h" | |
962 ],[ | |
963 ],[ | |
964 use_directx=yes | |
965 ]) | |
966 AC_MSG_RESULT($use_directx) | |
967 fi | |
968 AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes) | |
969 | |
970 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon" | |
971 SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm" | |
972 VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon" | |
973 VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la" | |
974 # Enable the DIB driver | |
975 CFLAGS="$CFLAGS -DENABLE_WINDIB" | |
976 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib" | |
977 VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la" | |
978 # See if we should enable the DirectX driver | |
979 if test x$use_directx = xyes; then | |
980 CFLAGS="$CFLAGS -DENABLE_DIRECTX" | |
981 SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid" | |
982 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5" | |
983 VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la" | |
984 fi | |
985 } | |
986 | |
987 dnl Set up the BWindow video driver on BeOS | |
988 CheckBWINDOW() | |
989 { | |
990 CFLAGS="$CFLAGS -DENABLE_BWINDOW" | |
991 VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow" | |
992 VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la" | |
993 } | |
994 | |
995 dnl Set up the Mac toolbox video driver for Mac OS 7-9 | |
996 CheckTOOLBOX() | |
997 { | |
998 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" | |
999 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" | |
1000 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" | |
1001 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" | |
1002 } | |
1003 | |
1004 dnl Set up the Mac toolbox video driver for Mac OS X | |
1005 CheckCARBON() | |
1006 { | |
1007 # "MACOSX" is not an official definition, but it's commonly | |
1008 # accepted as a way to differentiate between what runs on X | |
1009 # and what runs on older Macs - while in theory "Carbon" defns | |
1010 # are consistent between the two, in practice Carbon is still | |
1011 # changing. -sts Aug 2000 | |
1012 mac_autoconf_target_workaround="MAC" | |
1013 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \ | |
1014 -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" | |
1015 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" | |
1016 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" | |
1017 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" | |
1018 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" | |
1019 } | |
1020 | |
1021 dnl Set up the kernel statistics library for Solaris | |
1022 CheckKSTAT() | |
1023 { | |
1024 CFLAGS="$CFLAGS -DHAVE_KSTAT" | |
1025 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat" | |
1026 } | |
1027 | |
1028 case "$target" in | |
1029 *-*-linux*) | |
1030 ARCH=linux | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1031 CheckDummyVideo |
0 | 1032 CheckNASM |
1033 CheckOSS | |
1034 CheckALSA | |
1035 CheckARTSC | |
1036 CheckESD | |
1037 CheckNAS | |
1038 CheckX11 | |
1039 CheckDGA | |
1040 CheckFBCON | |
1041 CheckGGI | |
1042 CheckSVGA | |
1043 CheckAAlib | |
1044 CheckOpenGL | |
1045 CheckInputEvents | |
1046 CheckPTHREAD | |
1047 # Set up files for the main() stub | |
1048 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1049 # Set up files for the audio library | |
1050 # We use the OSS and ALSA API's, not the Sun audio API | |
1051 #if test x$enable_audio = xyes; then | |
1052 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1053 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1054 #fi | |
1055 # Set up files for the joystick library | |
1056 if test x$enable_joystick = xyes; then | |
1057 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux" | |
1058 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la" | |
1059 fi | |
1060 # Set up files for the cdrom library | |
1061 if test x$enable_cdrom = xyes; then | |
1062 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) | |
1063 fi | |
1064 # Set up files for the thread library | |
1065 if test x$enable_threads = xyes; then | |
1066 if test x$use_pthreads != xyes; then | |
1067 COPY_ARCH_SRC(src/thread, linux, clone.S) | |
1068 fi | |
1069 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1070 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1071 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1072 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1073 else | |
1074 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1075 fi | |
1076 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1077 if test x$glibc20_pthreads = xyes; then | |
1078 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1079 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1080 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1081 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1082 else | |
1083 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1084 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1085 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1086 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1087 fi | |
1088 fi | |
1089 # Set up files for the timer library | |
1090 if test x$enable_timers = xyes; then | |
1091 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1092 fi | |
1093 ;; | |
1094 *-*-bsdi*) | |
1095 ARCH=bsdi | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1096 CheckDummyVideo |
0 | 1097 CheckNASM |
1098 CheckOSS | |
1099 CheckNAS | |
1100 CheckX11 | |
1101 CheckDGA | |
1102 CheckSVGA | |
1103 CheckAAlib | |
1104 CheckOpenGL | |
1105 CheckPTHREAD | |
1106 # Set up files for the main() stub | |
1107 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1108 # Set up files for the joystick library | |
1109 # (No joystick support yet) | |
1110 if test x$enable_joystick = xyes; then | |
1111 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1112 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1113 fi | |
1114 # Set up files for the cdrom library | |
1115 # (No cdrom support yet) | |
1116 if test x$enable_cdrom = xyes; then | |
1117 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1118 fi | |
1119 # Set up files for the thread library | |
1120 if test x$enable_threads = xyes; then | |
1121 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1122 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1123 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1124 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1125 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1126 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1127 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1128 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1129 fi | |
1130 # Set up files for the timer library | |
1131 if test x$enable_timers = xyes; then | |
1132 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1133 fi | |
1134 ;; | |
1135 *-*-freebsd*) | |
1136 ARCH=freebsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1137 CheckDummyVideo |
0 | 1138 CheckNASM |
1139 CheckOSS | |
1140 CheckARTSC | |
1141 CheckESD | |
1142 CheckNAS | |
1143 CheckX11 | |
1144 CheckDGA | |
1145 CheckSVGA | |
1146 CheckAAlib | |
1147 CheckOpenGL | |
1148 CheckPTHREAD | |
1149 # Set up files for the main() stub | |
1150 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1151 # Set up files for the audio library | |
1152 # We use the OSS and ALSA API's, not the Sun audio API | |
1153 #if test x$enable_audio = xyes; then | |
1154 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1155 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1156 #fi | |
1157 # Set up files for the joystick library | |
1158 # (No joystick support yet) | |
1159 if test x$enable_joystick = xyes; then | |
1160 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1161 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1162 fi | |
1163 # Set up files for the cdrom library | |
1164 if test x$enable_cdrom = xyes; then | |
1165 COPY_ARCH_SRC(src/cdrom, freebsd, SDL_syscdrom.c) | |
1166 fi | |
1167 # Set up files for the thread library | |
1168 if test x$enable_threads = xyes; then | |
1169 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1170 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1171 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1172 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1173 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1174 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1175 else | |
1176 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1177 fi | |
1178 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1179 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1180 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1181 fi | |
1182 # Set up files for the timer library | |
1183 if test x$enable_timers = xyes; then | |
1184 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1185 fi | |
1186 ;; | |
1187 *-*-netbsd*) | |
1188 ARCH=netbsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1189 CheckDummyVideo |
0 | 1190 CheckNASM |
1191 CheckOSS | |
1192 CheckARTSC | |
1193 CheckESD | |
1194 CheckNAS | |
1195 CheckX11 | |
1196 CheckAAlib | |
1197 CheckOpenGL | |
1198 CheckPTHREAD | |
1199 # Set up files for the main() stub | |
1200 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1201 # Set up files for the audio library | |
1202 if test x$enable_audio = xyes; then | |
1203 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1204 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1205 fi | |
1206 # Set up files for the joystick library | |
1207 # (No joystick support yet) | |
1208 if test x$enable_joystick = xyes; then | |
1209 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1210 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1211 fi | |
1212 # Set up files for the cdrom library | |
1213 if test x$enable_cdrom = xyes; then | |
1214 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) | |
1215 fi | |
1216 # Set up files for the thread library | |
1217 if test x$enable_threads = xyes; then | |
1218 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1219 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1220 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1221 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1222 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1223 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1224 else |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1225 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1226 fi |
0 | 1227 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) |
1228 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1229 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1230 fi | |
1231 # Set up files for the timer library | |
1232 if test x$enable_timers = xyes; then | |
1233 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1234 fi | |
1235 # NetBSD does not define "unix" | |
1236 CFLAGS="$CFLAGS -Dunix" | |
1237 ;; | |
1238 *-*-openbsd*) | |
1239 ARCH=openbsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1240 CFLAGS="$CFLAGS -Dunix" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1241 CheckDummyVideo |
0 | 1242 CheckNASM |
1243 CheckOSS | |
1244 CheckARTSC | |
1245 CheckESD | |
1246 CheckNAS | |
1247 CheckX11 | |
1248 CheckAAlib | |
1249 CheckOpenGL | |
1250 CheckPTHREAD | |
1251 # Set up files for the main() stub | |
1252 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1253 # Set up files for the audio library | |
1254 if test x$enable_audio = xyes; then | |
1255 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1256 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1257 fi | |
1258 # Set up files for the joystick library | |
1259 # (No joystick support yet) | |
1260 if test x$enable_joystick = xyes; then | |
1261 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1262 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1263 fi | |
1264 # Set up files for the cdrom library | |
1265 if test x$enable_cdrom = xyes; then | |
1266 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) | |
1267 fi | |
1268 # Set up files for the thread library | |
1269 if test x$enable_threads = xyes; then | |
1270 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1271 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1272 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1273 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1274 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1275 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1276 else | |
1277 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1278 fi | |
1279 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1280 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1281 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1282 fi | |
1283 # Set up files for the timer library | |
1284 if test x$enable_timers = xyes; then | |
1285 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1286 fi | |
1287 ;; | |
1288 *-*-sysv5*) | |
1289 ARCH=sysv5 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1290 CheckDummyVideo |
0 | 1291 CheckNASM |
1292 CheckOSS | |
1293 CheckARTSC | |
1294 CheckESD | |
1295 CheckNAS | |
1296 CheckX11 | |
1297 CheckAAlib | |
1298 CheckOpenGL | |
1299 CheckPTHREAD | |
1300 CheckKSTAT | |
1301 # Set up files for the main() stub | |
1302 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1303 # Set up files for the audio library | |
1304 if test x$enable_audio = xyes; then | |
1305 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1306 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1307 fi | |
1308 # Set up files for the joystick library | |
1309 # (No joystick support yet) | |
1310 if test x$enable_joystick = xyes; then | |
1311 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1312 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1313 fi | |
1314 # Set up files for the cdrom library | |
1315 if test x$enable_cdrom = xyes; then | |
1316 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1317 fi | |
1318 # Set up files for the thread library | |
1319 if test x$enable_threads = xyes; then | |
1320 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) | |
1321 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h) | |
1322 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1323 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1324 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1325 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1326 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1327 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1328 fi | |
1329 # Set up files for the timer library | |
1330 if test x$enable_timers = xyes; then | |
1331 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1332 fi | |
1333 ;; | |
1334 *-*-solaris*) | |
1335 ARCH=solaris | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1336 CFLAGS="$CFLAGS -D__ELF__" # Fix for nasm on Solaris x86 |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1337 CheckDummyVideo |
0 | 1338 CheckNASM |
1339 CheckARTSC | |
1340 CheckESD | |
1341 CheckNAS | |
1342 CheckX11 | |
1343 CheckAAlib | |
1344 CheckOpenGL | |
1345 CheckPTHREAD | |
1346 CheckKSTAT | |
1347 # Set up files for the main() stub | |
1348 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1349 # Set up files for the audio library | |
1350 if test x$enable_audio = xyes; then | |
1351 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1352 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1353 fi | |
1354 # Set up files for the joystick library | |
1355 # (No joystick support yet) | |
1356 if test x$enable_joystick = xyes; then | |
1357 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1358 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1359 fi | |
1360 # Set up files for the cdrom library | |
1361 if test x$enable_cdrom = xyes; then | |
1362 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) | |
1363 fi | |
1364 # Set up files for the thread library | |
1365 if test x$enable_threads = xyes; then | |
1366 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1367 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1368 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1369 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1370 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1371 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1372 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1373 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1374 fi | |
1375 # Set up files for the timer library | |
1376 if test x$enable_timers = xyes; then | |
1377 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1378 fi | |
1379 ;; | |
1380 *-*-irix*) | |
1381 ARCH=irix | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1382 CheckDummyVideo |
0 | 1383 CheckNAS |
1384 CheckX11 | |
1385 CheckAAlib | |
1386 CheckOpenGL | |
1387 CheckPTHREAD | |
1388 # Set up files for the main() stub | |
1389 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1390 # Set up files for the audio library | |
1391 if test x$enable_audio = xyes; then | |
1392 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia" | |
1393 AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la" | |
1394 LIBS="$LIBS -laudio" | |
1395 fi | |
1396 # Set up files for the joystick library | |
1397 # (No joystick support yet) | |
1398 if test x$enable_joystick = xyes; then | |
1399 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1400 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1401 fi | |
1402 # Set up files for the cdrom library | |
1403 # (No CD-ROM support yet) | |
1404 if test x$enable_cdrom = xyes; then | |
1405 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1406 fi | |
1407 # Set up files for the thread library | |
1408 if test x$enable_threads = xyes; then | |
1409 if test x$use_pthreads = xyes; then | |
1410 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1411 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1412 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1413 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1414 if test x$enable_pthread_sem != xyes; then | |
1415 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1416 else | |
1417 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1418 fi | |
1419 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1420 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1421 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1422 else | |
1423 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c) | |
1424 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h) | |
1425 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1426 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1427 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1428 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1429 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1430 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1431 fi | |
1432 fi | |
1433 # Set up files for the timer library | |
1434 if test x$enable_timers = xyes; then | |
1435 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1436 fi | |
1437 ;; | |
1438 *-*-hpux*) | |
1439 ARCH=hpux | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1440 CheckDummyVideo |
0 | 1441 CheckNAS |
1442 CheckX11 | |
1443 CheckGGI | |
1444 CheckAAlib | |
1445 CheckOpenGL | |
1446 CheckPTHREAD | |
1447 # Set up files for the main() stub | |
1448 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1449 # Set up files for the audio library | |
1450 if test x$enable_audio = xyes; then | |
1451 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1452 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1453 fi | |
1454 # Set up files for the joystick library | |
1455 # (No joystick support yet) | |
1456 if test x$enable_joystick = xyes; then | |
1457 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1458 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1459 fi | |
1460 # Set up files for the cdrom library | |
1461 # (No CD-ROM support yet) | |
1462 if test x$enable_cdrom = xyes; then | |
1463 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1464 fi | |
1465 # Set up files for the thread library | |
1466 if test x$enable_threads = xyes; then | |
1467 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1468 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1469 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1470 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1471 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1472 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1473 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1474 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1475 fi | |
1476 # Set up files for the timer library | |
1477 if test x$enable_timers = xyes; then | |
1478 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1479 fi | |
1480 ;; | |
1481 *-*-aix*) | |
1482 ARCH=aix | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1483 CheckDummyVideo |
0 | 1484 CheckNAS |
1485 CheckX11 | |
1486 CheckGGI | |
1487 CheckAAlib | |
1488 CheckOpenGL | |
1489 CheckPTHREAD | |
1490 # Set up files for the main() stub | |
1491 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1492 # Set up files for the audio library | |
1493 if test x$enable_audio = xyes; then | |
1494 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio" | |
1495 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la" | |
1496 fi | |
1497 # Set up files for the joystick library | |
1498 # (No joystick support yet) | |
1499 if test x$enable_joystick = xyes; then | |
1500 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1501 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1502 fi | |
1503 # Set up files for the cdrom library | |
1504 if test x$enable_cdrom = xyes; then | |
1505 COPY_ARCH_SRC(src/cdrom, aix, SDL_syscdrom.c) | |
1506 fi | |
1507 # Set up files for the thread library | |
1508 if test x$enable_threads = xyes; then | |
1509 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1510 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1511 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1512 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1513 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1514 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1515 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1516 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1517 fi | |
1518 # Set up files for the timer library | |
1519 if test x$enable_timers = xyes; then | |
1520 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1521 fi | |
1522 ;; | |
1523 *-*-osf*) | |
1524 ARCH=osf | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1525 CheckDummyVideo |
0 | 1526 CheckNAS |
1527 CheckX11 | |
1528 CheckGGI | |
1529 CheckAAlib | |
1530 CheckOpenGL | |
1531 CheckPTHREAD | |
1532 # Set up files for the main() stub | |
1533 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1534 # Set up files for the audio library | |
1535 if test x$enable_audio = xyes; then | |
1536 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1537 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1538 fi | |
1539 # Set up files for the joystick library | |
1540 # (No joystick support yet) | |
1541 if test x$enable_joystick = xyes; then | |
1542 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1543 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1544 fi | |
1545 # Set up files for the cdrom library | |
1546 # (No cdrom support yet) | |
1547 if test x$enable_cdrom = xyes; then | |
1548 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1549 fi | |
1550 # Set up files for the thread library | |
1551 if test x$enable_threads = xyes; then | |
1552 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1553 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1554 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1555 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1556 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1557 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1558 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1559 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1560 fi | |
1561 # Set up files for the timer library | |
1562 if test x$enable_timers = xyes; then | |
1563 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1564 fi | |
1565 ;; | |
1566 *-*-qnx*) | |
1567 ARCH=qnx | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1568 CheckDummyVideo |
0 | 1569 CheckNAS |
1570 CheckPHOTON | |
1571 CheckX11 | |
1572 CheckOpenGL | |
1573 CheckPTHREAD | |
1574 # Set up files for the main() stub | |
1575 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1576 # Set up files for the audio library | |
1577 if test x$enable_audio = xyes; then | |
1578 CFLAGS="$CFLAGS -DALSA_SUPPORT" | |
1579 SYSTEM_LIBS="$SYSTEM_LIBS -lasound" | |
1580 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto" | |
1581 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la" | |
1582 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1583 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1584 fi | |
1585 # Set up files for the joystick library | |
1586 if test x$enable_joystick = xyes; then | |
1587 # (No joystick support yet) | |
1588 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1589 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1590 fi | |
1591 # Set up files for the cdrom library | |
1592 if test x$enable_cdrom = xyes; then | |
1593 COPY_ARCH_SRC(src/cdrom, qnx, SDL_syscdrom.c) | |
1594 fi | |
1595 # Set up files for the thread library | |
1596 if test x$enable_threads = xyes; then | |
1597 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1598 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1599 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1600 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1601 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1602 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1603 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1604 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1605 fi | |
1606 # Set up files for the timer library | |
1607 if test x$enable_timers = xyes; then | |
1608 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1609 fi | |
1610 ;; | |
1611 *-*-cygwin* | *-*-mingw32*) | |
1612 ARCH=win32 | |
1613 if test "$build" != "$target"; then # cross-compiling | |
1614 # Default cross-compile location | |
1615 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc | |
1616 else | |
1617 # Look for the location of the tools and install there | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1618 if [ "$BUILD_PREFIX" != "" ]; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1619 ac_default_prefix=$BUILD_PREFIX |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1620 fi |
0 | 1621 fi |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1622 CheckDummyVideo |
0 | 1623 CheckWIN32 |
1624 CheckDIRECTX | |
1625 CheckNASM | |
1626 # Set up files for the main() stub | |
1627 COPY_ARCH_SRC(src/main, win32, SDL_main.c) | |
1628 # Set up files for the audio library | |
1629 if test x$enable_audio = xyes; then | |
1630 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib" | |
1631 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la" | |
1632 if test x$use_directx = xyes; then | |
1633 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5" | |
1634 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la" | |
1635 fi | |
1636 fi | |
1637 # Set up files for the joystick library | |
1638 if test x$enable_joystick = xyes; then | |
1639 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32" | |
1640 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la" | |
1641 fi | |
1642 # Set up files for the cdrom library | |
1643 if test x$enable_cdrom = xyes; then | |
1644 COPY_ARCH_SRC(src/cdrom, win32, SDL_syscdrom.c) | |
1645 fi | |
1646 # Set up files for the thread library | |
1647 if test x$enable_threads = xyes; then | |
1648 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c) | |
1649 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h) | |
1650 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c) | |
1651 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1652 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c) | |
1653 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1654 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1655 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1656 fi | |
1657 # Set up files for the timer library | |
1658 if test x$enable_timers = xyes; then | |
1659 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c) | |
1660 fi | |
1661 # The Win32 platform requires special setup | |
1662 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1663 case "$target" in |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1664 *-*-cygwin*) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1665 CFLAGS="$CFLAGS -I/usr/include/mingw -DWIN32 -Uunix" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1666 SDL_CFLAGS="$SDL_CFLAGS -I/usr/include/mingw -DWIN32 -Uunix" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1667 LIBS="$LIBS -mno-cygwin" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1668 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows -mno-cygwin" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1669 ;; |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1670 *-*-mingw32*) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1671 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1672 ;; |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1673 esac |
0 | 1674 ;; |
1675 *-*-beos*) | |
1676 ARCH=beos | |
1677 ac_default_prefix=/boot/develop/tools/gnupro | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1678 CheckDummyVideo |
0 | 1679 CheckNASM |
1680 CheckBWINDOW | |
1681 CheckBeGL | |
1682 # Set up files for the main() stub | |
1683 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1684 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc) | |
1685 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h) | |
1686 # Set up files for the audio library | |
1687 if test x$enable_audio = xyes; then | |
1688 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio" | |
1689 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la" | |
1690 fi | |
1691 # Set up files for the joystick library | |
1692 if test x$enable_joystick = xyes; then | |
1693 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos" | |
1694 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la" | |
1695 fi | |
1696 # Set up files for the cdrom library | |
1697 if test x$enable_cdrom = xyes; then | |
1698 COPY_ARCH_SRC(src/cdrom, beos, SDL_syscdrom.c) | |
1699 fi | |
1700 # Set up files for the thread library | |
1701 if test x$enable_threads = xyes; then | |
1702 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c) | |
1703 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h) | |
1704 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1705 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1706 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c) | |
1707 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1708 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1709 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1710 fi | |
1711 # Set up files for the timer library | |
1712 if test x$enable_timers = xyes; then | |
1713 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c) | |
1714 fi | |
1715 # The BeOS platform requires special libraries | |
1716 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" | |
1717 ;; | |
1718 *-*-macos*) | |
1719 # This would be used if cross-compiling to MacOS 9. No way to | |
1720 # use it at present, but Apple is working on a X-to-9 compiler | |
1721 # for which this case would be handy. | |
1722 ARCH=macos | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1723 CheckDummyVideo |
0 | 1724 CheckTOOLBOX |
1725 CheckMacGL | |
1726 # Set up files for the main() stub | |
1727 COPY_ARCH_SRC(src/main, macos, SDL_main.c) | |
1728 # Set up files for the audio library | |
1729 if test x$enable_audio = xyes; then | |
1730 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" | |
1731 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" | |
1732 fi | |
1733 # Set up files for the joystick library | |
1734 if test x$enable_joystick = xyes; then | |
1735 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos" | |
1736 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la" | |
1737 fi | |
1738 # Set up files for the cdrom library | |
1739 if test x$enable_cdrom = xyes; then | |
1740 COPY_ARCH_SRC(src/cdrom, macos, SDL_syscdrom.c) | |
1741 fi | |
1742 # Set up files for the thread library | |
1743 if test x$enable_threads = xyes; then | |
1744 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c) | |
1745 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h) | |
1746 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1747 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1748 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c) | |
1749 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1750 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1751 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1752 fi | |
1753 # Set up files for the timer library | |
1754 if test x$enable_timers = xyes; then | |
1755 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c) | |
1756 fi | |
1757 # The MacOS platform requires special setup | |
1758 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" | |
1759 SDL_LIBS="-lSDLmain $SDL_LIBS" | |
1760 ;; | |
1761 *-*-darwin* ) | |
1762 # Strictly speaking, we want "Mac OS X", not "Darwin", which is | |
1763 # just the OS X kernel sans upper layers like Carbon. But | |
1764 # config.guess comes back with "darwin", so go with the flow. | |
1765 ARCH=macos | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1766 CheckDummyVideo |
0 | 1767 CheckCARBON |
1768 CheckMacGL | |
1769 CheckPTHREAD | |
1770 # Set up files for the main() stub | |
1771 # COPY_ARCH_SRC(src/main, macos, SDL_main.c) | |
1772 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1773 # Set up files for the audio library | |
1774 if test x$enable_audio = xyes; then | |
1775 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" | |
1776 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" | |
1777 fi | |
1778 # Set up files for the joystick library | |
1779 if test x$enable_joystick = xyes; then | |
1780 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1781 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1782 fi | |
1783 # Set up files for the cdrom library | |
1784 if test x$enable_cdrom = xyes; then | |
1785 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1786 fi | |
1787 # Set up files for the thread library | |
1788 if test x$enable_threads = xyes; then | |
1789 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1790 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1791 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1792 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1793 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1794 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1795 else | |
1796 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1797 fi | |
1798 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1799 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1800 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1801 fi | |
1802 # Set up files for the timer library | |
1803 if test x$enable_timers = xyes; then | |
1804 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1805 fi | |
1806 # The MacOS X platform requires special setup | |
1807 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework" | |
1808 SDL_LIBS="$SDL_LIBS -framework Carbon" | |
1809 ;; | |
1810 *) | |
1811 AC_MSG_ERROR(Unsupported target: Please add to configure.in) | |
1812 ;; | |
1813 esac | |
1814 AC_SUBST(ARCH) | |
1815 | |
1816 # Set the conditional variables for this target | |
1817 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux) | |
1818 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris) | |
1819 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix) | |
1820 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi) | |
1821 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd) | |
1822 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd) | |
1823 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix) | |
1824 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32) | |
1825 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos) | |
1826 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos) | |
1827 | |
1828 # Set conditional variables for shared and static library selection. | |
1829 # These are not used in any Makefile.am but in sdl-config.in. | |
1830 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes]) | |
1831 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) | |
1832 | |
1833 # Set runtime shared library paths as needed | |
1834 | |
1835 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then | |
1836 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" | |
1837 fi | |
1838 | |
1839 if test $ARCH = solaris; then | |
1840 SDL_RLD_FLAGS="-R\${exec_prefix}/lib" | |
1841 fi | |
1842 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1843 if test $ARCH = openbsd; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1844 SDL_RLD_FLAGS="-Wl,-R\${exec_prefix}/lib -Wl,-R\${X11BASE}/lib" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1845 fi |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1846 |
0 | 1847 dnl Output the video drivers we use |
1848 if test x$enable_video = xtrue; then | |
1849 if test "$VIDEO_SUBDIRS" = ""; then | |
1850 AC_MSG_ERROR(*** No video drivers are enabled!) | |
1851 fi | |
1852 fi | |
1853 AC_SUBST(AUDIO_SUBDIRS) | |
1854 AC_SUBST(AUDIO_DRIVERS) | |
1855 AC_SUBST(VIDEO_SUBDIRS) | |
1856 AC_SUBST(VIDEO_DRIVERS) | |
1857 AC_SUBST(JOYSTICK_SUBDIRS) | |
1858 AC_SUBST(JOYSTICK_DRIVERS) | |
1859 AC_SUBST(SDL_EXTRADIRS) | |
1860 AC_SUBST(SDL_EXTRALIBS) | |
1861 AC_SUBST(SYSTEM_LIBS) | |
1862 | |
1863 dnl Expand the cflags and libraries needed by apps using SDL | |
1864 AC_SUBST(SDL_CFLAGS) | |
1865 AC_SUBST(SDL_LIBS) | |
1866 AC_SUBST(SDL_RLD_FLAGS) | |
1867 | |
1868 dnl Expand the libraries needed for static linking | |
1869 AC_SUBST(SYSTEM_LIBS) | |
1870 dnl Expand the include directories for building SDL | |
1871 CFLAGS="$CFLAGS -I\$(top_srcdir)/include" | |
1872 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL" | |
1873 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH" | |
1874 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main" | |
1875 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio" | |
1876 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video" | |
1877 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events" | |
1878 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick" | |
1879 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom" | |
1880 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread" | |
1881 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer" | |
1882 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian" | |
1883 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file" | |
1884 CXXFLAGS="$CFLAGS" | |
1885 | |
1886 # Finally create all the generated files | |
1887 dnl Important: Any directory that you want to be in the distcheck should | |
1888 dnl have a file listed here, so that configure generates the | |
1889 dnl subdirectories on the build target. | |
1890 AC_OUTPUT([ | |
1891 Makefile | |
1892 docs/Makefile | |
1893 docs/html/Makefile | |
1894 docs/man3/Makefile | |
1895 include/Makefile | |
1896 src/Makefile | |
1897 src/main/Makefile | |
1898 src/audio/Makefile | |
1899 src/audio/alsa/Makefile | |
1900 src/audio/arts/Makefile | |
1901 src/audio/baudio/Makefile | |
1902 src/audio/dma/Makefile | |
1903 src/audio/dmedia/Makefile | |
1904 src/audio/dsp/Makefile | |
1905 src/audio/esd/Makefile | |
1906 src/audio/macrom/Makefile | |
1907 src/audio/nas/Makefile | |
1908 src/audio/nto/Makefile | |
1909 src/audio/paudio/Makefile | |
1910 src/audio/sun/Makefile | |
1911 src/audio/ums/Makefile | |
1912 src/audio/windib/Makefile | |
1913 src/audio/windx5/Makefile | |
1914 src/video/Makefile | |
1915 src/video/cybergfx/Makefile | |
1916 src/video/x11/Makefile | |
1917 src/video/dga/Makefile | |
1918 src/video/fbcon/Makefile | |
1919 src/video/ggi/Makefile | |
1920 src/video/maccommon/Makefile | |
1921 src/video/macdsp/Makefile | |
1922 src/video/macrom/Makefile | |
1923 src/video/svga/Makefile | |
1924 src/video/aalib/Makefile | |
1925 src/video/wincommon/Makefile | |
1926 src/video/windib/Makefile | |
1927 src/video/windx5/Makefile | |
1928 src/video/bwindow/Makefile | |
1929 src/video/photon/Makefile | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1930 src/video/dummy/Makefile |
0 | 1931 src/events/Makefile |
1932 src/joystick/Makefile | |
1933 src/joystick/beos/Makefile | |
1934 src/joystick/dummy/Makefile | |
1935 src/joystick/linux/Makefile | |
1936 src/joystick/macos/Makefile | |
1937 src/joystick/win32/Makefile | |
1938 src/cdrom/Makefile | |
1939 src/thread/Makefile | |
1940 src/timer/Makefile | |
1941 src/endian/Makefile | |
1942 src/file/Makefile | |
1943 src/hermes/Makefile | |
1944 sdl-config | |
1945 SDL.spec | |
1946 ], [chmod +x sdl-config]) |