Mercurial > sdl-ios-xcode
annotate configure.in @ 28:6e53ad1f461e
Updated config.guess and config.sub
author | Sam Lantinga <slouken@lokigames.com> |
---|---|
date | Thu, 10 May 2001 22:58:10 +0000 |
parents | 75a95f82bc1f |
children | 57bf11a5efd7 |
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, | |
16
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
350 [ --enable-nas support the NAS audio API [default=yes]], |
0 | 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 | |
16
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
477 AC_ARG_ENABLE(dga, |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
478 [ --enable-dga allow use of X11 DGA code [default=yes]], |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
479 , enable_dga=yes) |
0 | 480 AC_ARG_ENABLE(video-x11-dgamouse, |
481 [ --enable-video-x11-dgamouse use X11 DGA for mouse events [default=yes]], | |
482 , enable_video_x11_dgamouse=yes) | |
16
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
483 if test x$enable_dga = xyes; then |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
484 AC_MSG_CHECKING(for XFree86 DGA 1.0 support) |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
485 video_x11_dga=no |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
486 AC_TRY_COMPILE([ |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
487 #include <X11/Xlib.h> |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
488 #include <X11/extensions/xf86dga.h> |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
489 ],[ |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
490 ],[ |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
491 video_x11_dga=yes |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
492 ]) |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
493 AC_MSG_RESULT($video_x11_dga) |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
494 if test x$video_x11_dga = xyes; then |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
495 CFLAGS="$CFLAGS -DXFREE86_DGAMOUSE" |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
496 if test x$enable_video_x11_dgamouse = xyes; then |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
497 CFLAGS="$CFLAGS -DDEFAULT_DGAMOUSE" |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
498 fi |
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
499 SYSTEM_LIBS="$SYSTEM_LIBS -lXxf86dga" |
0 | 500 fi |
501 fi | |
502 AC_ARG_ENABLE(video-x11-xv, | |
503 [ --enable-video-x11-xv use X11 XvImage extension for video [default=yes]], | |
504 , enable_video_x11_xv=yes) | |
505 if test x$enable_video_x11_xv = xyes; then | |
506 AC_MSG_CHECKING(for XFree86 XvImage support) | |
507 video_x11_xv=no | |
508 AC_TRY_COMPILE([ | |
509 #include <X11/Xlib.h> | |
510 #include <sys/ipc.h> | |
511 #include <sys/shm.h> | |
512 #include <X11/extensions/XShm.h> | |
513 #include <X11/extensions/Xvlib.h> | |
514 ],[ | |
515 XvImage *image; | |
516 ],[ | |
517 video_x11_xv=yes | |
518 ]) | |
519 AC_MSG_RESULT($video_x11_xv) | |
520 if test x$video_x11_xv = xyes; then | |
521 CFLAGS="$CFLAGS -DXFREE86_XV" | |
522 SYSTEM_LIBS="$SYSTEM_LIBS -lXv" | |
523 fi | |
524 fi | |
525 fi | |
526 fi | |
527 } | |
528 CheckPHOTON() | |
529 { | |
530 AC_ARG_ENABLE(video-photon, | |
531 [ --enable-video-photon use QNX Photonvideo driver [default=yes]], | |
532 , enable_video_photon=yes) | |
533 if test x$enable_video = xyes -a x$enable_video_photon = xyes; then | |
534 AC_MSG_CHECKING(for QNX Photon support) | |
535 video_photon=no | |
536 AC_TRY_COMPILE([ | |
537 #include <Ph.h> | |
538 #include <Pt.h> | |
539 #include <photon/Pg.h> | |
540 #include <photon/PdDirect.h> | |
541 ],[ | |
542 PgDisplaySettings_t *visual; | |
543 ],[ | |
544 video_photon=yes | |
545 ]) | |
546 AC_MSG_RESULT($video_photon) | |
547 if test x$video_photon = xyes; then | |
19
8cc4dbfab9ab
Date: Thu, 19 Apr 2001 08:36:54 +0300
Sam Lantinga <slouken@lokigames.com>
parents:
16
diff
changeset
|
548 CFLAGS="$CFLAGS -DENABLE_PHOTON" |
0 | 549 SYSTEM_LIBS="$SYSTEM_LIBS -lph" |
550 VIDEO_SUBDIRS="$VIDEO_SUBDIRS photon" | |
551 VIDEO_DRIVERS="$VIDEO_DRIVERS photon/libvideo_photon.la" | |
552 fi | |
553 fi | |
554 } | |
555 | |
556 dnl Find the X11 DGA 2.0 include and library directories | |
557 CheckDGA() | |
558 { | |
559 AC_ARG_ENABLE(video-dga, | |
560 [ --enable-video-dga use DGA 2.0 video driver [default=yes]], | |
561 , enable_video_dga=yes) | |
562 if test x$video_x11_dga = xyes -a x$enable_video_dga = xyes; then | |
563 AC_MSG_CHECKING(for XFree86 DGA 2.0 support) | |
564 video_x11_dga2=no | |
565 AC_TRY_COMPILE([ | |
566 #include <X11/Xlib.h> | |
567 #include <X11/extensions/xf86dga.h> | |
568 ],[ | |
569 XDGAEvent xevent; | |
570 ],[ | |
571 video_x11_dga2=yes | |
572 ]) | |
573 AC_MSG_RESULT($video_x11_dga2) | |
574 if test x$video_x11_dga2 = xyes; then | |
575 CFLAGS="$CFLAGS -DENABLE_DGA" | |
576 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dga" | |
577 VIDEO_DRIVERS="$VIDEO_DRIVERS dga/libvideo_dga.la" | |
578 fi | |
579 fi | |
580 } | |
581 | |
582 dnl Find the framebuffer console includes | |
583 CheckFBCON() | |
584 { | |
585 AC_ARG_ENABLE(video-fbcon, | |
586 [ --enable-video-fbcon use framebuffer console video driver [default=yes]], | |
587 , enable_video_fbcon=yes) | |
588 if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then | |
589 AC_MSG_CHECKING(for framebuffer console support) | |
590 video_fbcon=no | |
591 AC_TRY_COMPILE([ | |
592 #include <linux/fb.h> | |
593 #include <linux/kd.h> | |
594 #include <linux/keyboard.h> | |
595 ],[ | |
596 ],[ | |
597 video_fbcon=yes | |
598 ]) | |
599 AC_MSG_RESULT($video_fbcon) | |
600 if test x$video_fbcon = xyes; then | |
601 CFLAGS="$CFLAGS -DENABLE_FBCON" | |
602 VIDEO_SUBDIRS="$VIDEO_SUBDIRS fbcon" | |
603 VIDEO_DRIVERS="$VIDEO_DRIVERS fbcon/libvideo_fbcon.la" | |
604 fi | |
605 fi | |
606 } | |
607 | |
608 dnl Find the GGI includes | |
609 CheckGGI() | |
610 { | |
611 AC_ARG_ENABLE(video-ggi, | |
612 [ --enable-video-ggi use GGI video driver [default=no]], | |
613 , enable_video_ggi=no) | |
614 if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then | |
615 AC_MSG_CHECKING(for GGI support) | |
616 video_ggi=no | |
617 AC_TRY_COMPILE([ | |
618 #include <ggi/ggi.h> | |
619 #include <ggi/gii.h> | |
620 ],[ | |
621 ],[ | |
622 video_ggi=yes | |
623 ]) | |
624 AC_MSG_RESULT($video_ggi) | |
625 if test x$video_ggi = xyes; then | |
626 CFLAGS="$CFLAGS $X_CFLAGS -DENABLE_GGI" | |
627 SYSTEM_LIBS="$SYSTEM_LIBS -lggi -lgii -lgg" | |
628 | |
629 VIDEO_SUBDIRS="$VIDEO_SUBDIRS ggi" | |
630 VIDEO_DRIVERS="$VIDEO_DRIVERS ggi/libvideo_ggi.la" | |
631 fi | |
632 fi | |
633 } | |
634 | |
635 dnl Find the SVGAlib includes and libraries | |
636 CheckSVGA() | |
637 { | |
638 AC_ARG_ENABLE(video-svga, | |
639 [ --enable-video-svga use SVGAlib video driver [default=no]], | |
640 , enable_video_svga=no) | |
641 if test x$enable_video = xyes -a x$enable_video_svga = xyes; then | |
642 AC_MSG_CHECKING(for SVGAlib (1.4.0+) support) | |
643 video_svga=no | |
644 AC_TRY_COMPILE([ | |
645 #include <vga.h> | |
646 #include <vgamouse.h> | |
647 #include <vgakeyboard.h> | |
648 ],[ | |
649 if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) { | |
650 exit(0); | |
651 } | |
652 ],[ | |
653 video_svga=yes | |
654 ]) | |
655 AC_MSG_RESULT($video_svga) | |
656 if test x$video_svga = xyes; then | |
657 CFLAGS="$CFLAGS -DENABLE_SVGALIB" | |
658 SYSTEM_LIBS="$SYSTEM_LIBS -lvga" | |
659 | |
660 VIDEO_SUBDIRS="$VIDEO_SUBDIRS svga" | |
661 VIDEO_DRIVERS="$VIDEO_DRIVERS svga/libvideo_svga.la" | |
662 fi | |
663 fi | |
664 } | |
665 | |
666 dnl Find the AAlib includes | |
667 CheckAAlib() | |
668 { | |
669 AC_ARG_ENABLE(video-aalib, | |
670 [ --enable-video-aalib use AAlib video driver [default=no]], | |
671 , enable_video_aalib=no) | |
672 if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then | |
673 AC_MSG_CHECKING(for AAlib support) | |
674 video_aalib=no | |
675 AC_TRY_COMPILE([ | |
676 #include <aalib.h> | |
677 ],[ | |
678 ],[ | |
679 video_aalib=yes | |
680 ]) | |
681 AC_MSG_RESULT($video_aalib) | |
682 if test x$video_aalib = xyes; then | |
683 CFLAGS="$CFLAGS -DENABLE_AALIB" | |
684 SYSTEM_LIBS="$SYSTEM_LIBS -laa" | |
685 | |
686 VIDEO_SUBDIRS="$VIDEO_SUBDIRS aalib" | |
687 VIDEO_DRIVERS="$VIDEO_DRIVERS aalib/libvideo_aa.la" | |
688 fi | |
689 fi | |
690 } | |
691 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
692 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
|
693 CheckDummyVideo() |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
694 { |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
695 AC_ARG_ENABLE(video-dummy, |
16
735e5a8696d0
Added --disable-dga configure option to disable DGA entirely
Sam Lantinga <slouken@lokigames.com>
parents:
1
diff
changeset
|
696 [ --enable-video-dummy use dummy video driver [default=no]], |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
697 , enable_video_dummy=no) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
698 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
|
699 CFLAGS="$CFLAGS -DENABLE_DUMMYVIDEO" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
700 VIDEO_SUBDIRS="$VIDEO_SUBDIRS dummy" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
701 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
|
702 fi |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
703 } |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
704 |
0 | 705 dnl Check to see if OpenGL support is desired |
706 AC_ARG_ENABLE(video-opengl, | |
707 [ --enable-video-opengl include OpenGL context creation [default=yes]], | |
708 , enable_video_opengl=yes) | |
709 | |
710 dnl Find OpenGL | |
711 CheckOpenGL() | |
712 { | |
713 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
714 AC_MSG_CHECKING(for OpenGL (GLX) support) | |
715 video_opengl=no | |
716 AC_TRY_COMPILE([ | |
717 #include <GL/gl.h> | |
718 #include <GL/glx.h> | |
719 #include <dlfcn.h> /* For loading extensions */ | |
720 ],[ | |
721 ],[ | |
722 video_opengl=yes | |
723 ]) | |
724 AC_MSG_RESULT($video_opengl) | |
725 if test x$video_opengl = xyes; then | |
726 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
727 AC_CHECK_LIB(dl, dlopen, SYSTEM_LIBS="$SYSTEM_LIBS -ldl") | |
728 fi | |
729 fi | |
730 } | |
731 | |
732 dnl Check for BeOS OpenGL | |
733 CheckBeGL() | |
734 { | |
735 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
736 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
737 SYSTEM_LIBS="$SYSTEM_LIBS -lGL" | |
738 fi | |
739 } | |
740 | |
741 dnl Check for MacOS OpenGL | |
742 CheckMacGL() | |
743 { | |
744 if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then | |
745 CFLAGS="$CFLAGS -DHAVE_OPENGL" | |
746 case "$target" in | |
747 *-*-darwin*) | |
748 SDL_LIBS="$SDL_LIBS -framework OpenGL -framework AGL" | |
749 esac | |
750 fi | |
751 } | |
752 | |
753 dnl See if we can use the new unified event interface in Linux 2.4 | |
754 CheckInputEvents() | |
755 { | |
756 dnl Check for Linux 2.4 unified input event interface support | |
757 AC_ARG_ENABLE(input-events, | |
758 [ --enable-input-events use Linux 2.4 unified input interface [default=yes]], | |
759 , enable_input_events=yes) | |
760 if test x$enable_input_events = xyes; then | |
761 AC_MSG_CHECKING(for Linux 2.4 unified input interface) | |
762 use_input_events=no | |
763 AC_TRY_COMPILE([ | |
764 #include <linux/input.h> | |
765 ],[ | |
766 #ifndef EVIOCGNAME | |
767 #error EVIOCGNAME() ioctl not available | |
768 #endif | |
769 ],[ | |
770 use_input_events=yes | |
771 ]) | |
772 AC_MSG_RESULT($use_input_events) | |
773 if test x$use_input_events = xyes; then | |
774 CFLAGS="$CFLAGS -DUSE_INPUT_EVENTS" | |
775 fi | |
776 fi | |
777 } | |
778 | |
779 dnl See what type of thread model to use on Linux and Solaris | |
780 CheckPTHREAD() | |
781 { | |
782 dnl Check for pthread support | |
783 AC_ARG_ENABLE(pthreads, | |
784 [ --enable-pthreads use POSIX threads for multi-threading [default=yes]], | |
785 , enable_pthreads=yes) | |
786 dnl This is used on Linux for glibc binary compatibility (Doh!) | |
787 AC_ARG_ENABLE(pthread-sem, | |
788 [ --enable-pthread-sem use pthread semaphores [default=yes]], | |
789 , enable_pthread_sem=yes) | |
790 ac_save_libs="$LIBS" | |
791 case "$target" in | |
792 *-*-bsdi*) | |
793 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
794 pthread_lib="" | |
795 ;; | |
796 *-*-darwin*) | |
797 pthread_cflags="-D_THREAD_SAFE" | |
798 # causes Carbon.p complaints? | |
799 # pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
800 ;; | |
801 *-*-freebsd*) | |
802 pthread_cflags="-D_REENTRANT -D_THREAD_SAFE" | |
803 pthread_lib="-pthread" | |
804 ;; | |
805 *-*-openbsd*) | |
806 pthread_cflags="-D_REENTRANT" | |
807 pthread_lib="-pthread" | |
808 ;; | |
809 *-*-solaris*) | |
810 pthread_cflags="-D_REENTRANT" | |
811 pthread_lib="-lpthread -lposix4" | |
812 ;; | |
813 *-*-sysv5*) | |
814 pthread_cflags="-D_REENTRANT -Kthread" | |
815 pthread_lib="" | |
816 ;; | |
817 *-*-irix*) | |
818 pthread_cflags="-D_SGI_MP_SOURCE" | |
819 pthread_lib="-lpthread" | |
820 ;; | |
821 *-*-aix*) | |
822 pthread_cflags="-D_REENTRANT -mthreads" | |
823 pthread_lib="-lpthread" | |
824 ;; | |
825 *-*-qnx*) | |
826 pthread_cflags="" | |
827 pthread_lib="" | |
828 ;; | |
829 *) | |
830 pthread_cflags="-D_REENTRANT" | |
831 pthread_lib="-lpthread" | |
832 ;; | |
833 esac | |
834 LIBS="$LIBS $pthread_lib" | |
835 if test x$enable_threads = xyes -a x$enable_pthreads = xyes; then | |
836 AC_MSG_CHECKING(for pthreads) | |
837 use_pthreads=no | |
838 AC_TRY_LINK([ | |
839 #include <pthread.h> | |
840 ],[ | |
841 pthread_attr_t type; | |
842 pthread_attr_init(&type); | |
843 ],[ | |
844 use_pthreads=yes | |
845 ]) | |
846 AC_MSG_RESULT($use_pthreads) | |
847 if test x$use_pthreads = xyes; then | |
848 CFLAGS="$CFLAGS $pthread_cflags -DSDL_USE_PTHREADS" | |
849 SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags" | |
850 SDL_LIBS="$SDL_LIBS $pthread_lib" | |
851 | |
852 # Check to see if recursive mutexes are available | |
853 AC_MSG_CHECKING(for recursive mutexes) | |
854 has_recursive_mutexes=no | |
855 AC_TRY_LINK([ | |
856 #include <pthread.h> | |
857 ],[ | |
858 pthread_mutexattr_t attr; | |
859 #ifdef linux | |
860 pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP); | |
861 #else | |
862 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); | |
863 #endif | |
864 ],[ | |
865 has_recursive_mutexes=yes | |
866 ]) | |
867 # Some systems have broken recursive mutex implementations | |
868 case "$target" in | |
869 *-*-solaris*) | |
870 has_recursive_mutexes=no | |
871 ;; | |
872 esac | |
873 AC_MSG_RESULT($has_recursive_mutexes) | |
874 if test x$has_recursive_mutexes != xyes; then | |
875 CFLAGS="$CFLAGS -DPTHREAD_NO_RECURSIVE_MUTEX" | |
876 fi | |
877 | |
878 # Check to see if this is broken glibc 2.0 pthreads | |
879 case "$target" in | |
880 *-*-linux*) | |
881 AC_MSG_CHECKING(for broken glibc 2.0 pthreads) | |
882 glibc20_pthreads=no | |
883 AC_TRY_COMPILE([ | |
884 #include <features.h> | |
885 #if (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 0) | |
886 #warning Working around a bug in glibc 2.0 pthreads | |
887 #else | |
888 #error pthread implementation okay | |
889 #endif /* glibc 2.0 */ | |
890 ],[ | |
891 ],[ | |
892 glibc20_pthreads=yes | |
893 ]) | |
894 AC_MSG_RESULT($glibc20_pthreads) | |
895 esac | |
896 fi | |
897 fi | |
898 LIBS="$ac_save_libs" | |
899 | |
900 AC_MSG_CHECKING(whether semun is defined in /usr/include/sys/sem.h) | |
901 have_semun=no | |
902 AC_TRY_COMPILE([ | |
903 #include <sys/types.h> | |
904 #include <sys/sem.h> | |
905 ],[ | |
906 union semun t; | |
907 ],[ | |
908 have_semun=yes | |
909 ]) | |
910 AC_MSG_RESULT($have_semun) | |
911 if test x$have_semun = xyes; then | |
912 CFLAGS="$CFLAGS -DHAVE_SEMUN" | |
913 fi | |
914 | |
915 # See if we can use clone() on Linux directly | |
916 use_clone=no | |
917 if test x$enable_threads = xyes -a x$use_pthreads != xyes; then | |
918 case "$target" in | |
919 *-*-linux*) | |
920 use_clone=yes | |
921 ;; | |
922 *) | |
923 CFLAGS="$CFLAGS -DFORK_HACK" | |
924 ;; | |
925 esac | |
926 fi | |
927 AM_CONDITIONAL(USE_CLONE, test x$use_clone = xyes) | |
928 } | |
929 | |
930 dnl Determine whether the compiler can produce Win32 executables | |
931 CheckWIN32() | |
932 { | |
933 AC_MSG_CHECKING(Win32 compiler) | |
934 have_win32_gcc=no | |
935 AC_TRY_COMPILE([ | |
936 #include <windows.h> | |
937 ],[ | |
938 ],[ | |
939 have_win32_gcc=yes | |
940 ]) | |
941 AC_MSG_RESULT($have_win32_gcc) | |
942 if test x$have_win32_gcc != xyes; then | |
943 AC_MSG_ERROR([ | |
944 *** Your compiler ($CC) does not produce Win32 executables! | |
945 ]) | |
946 fi | |
947 | |
948 dnl See if the user wants to redirect standard output to files | |
949 AC_ARG_ENABLE(stdio-redirect, | |
950 [ --enable-stdio-redirect Redirect STDIO to files on Win32 [default=yes]], | |
951 , enable_stdio_redirect=yes) | |
952 if test x$enable_stdio_redirect != xyes; then | |
953 CFLAGS="$CFLAGS -DNO_STDIO_REDIRECT" | |
954 fi | |
955 } | |
956 | |
957 dnl Find the DirectX includes and libraries | |
958 CheckDIRECTX() | |
959 { | |
960 AC_ARG_ENABLE(directx, | |
961 [ --enable-directx use DirectX for Win32 audio/video [default=yes]], | |
962 , enable_directx=yes) | |
963 if test x$enable_directx = xyes; then | |
964 AC_MSG_CHECKING(for DirectX headers and libraries) | |
965 use_directx=no | |
966 AC_TRY_COMPILE([ | |
967 #include "src/video/windx5/directx.h" | |
968 ],[ | |
969 ],[ | |
970 use_directx=yes | |
971 ]) | |
972 AC_MSG_RESULT($use_directx) | |
973 fi | |
974 AM_CONDITIONAL(USE_DIRECTX, test x$use_directx = xyes) | |
975 | |
976 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video/wincommon" | |
977 SYSTEM_LIBS="$SYSTEM_LIBS -luser32 -lgdi32 -lwinmm" | |
978 VIDEO_SUBDIRS="$VIDEO_SUBDIRS wincommon" | |
979 VIDEO_DRIVERS="$VIDEO_DRIVERS wincommon/libvideo_wincommon.la" | |
980 # Enable the DIB driver | |
981 CFLAGS="$CFLAGS -DENABLE_WINDIB" | |
982 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windib" | |
983 VIDEO_DRIVERS="$VIDEO_DRIVERS windib/libvideo_windib.la" | |
984 # See if we should enable the DirectX driver | |
985 if test x$use_directx = xyes; then | |
986 CFLAGS="$CFLAGS -DENABLE_DIRECTX" | |
987 SYSTEM_LIBS="$SYSTEM_LIBS -ldxguid" | |
988 VIDEO_SUBDIRS="$VIDEO_SUBDIRS windx5" | |
989 VIDEO_DRIVERS="$VIDEO_DRIVERS windx5/libvideo_windx5.la" | |
990 fi | |
991 } | |
992 | |
993 dnl Set up the BWindow video driver on BeOS | |
994 CheckBWINDOW() | |
995 { | |
996 CFLAGS="$CFLAGS -DENABLE_BWINDOW" | |
997 VIDEO_SUBDIRS="$VIDEO_SUBDIRS bwindow" | |
998 VIDEO_DRIVERS="$VIDEO_DRIVERS bwindow/libvideo_bwindow.la" | |
999 } | |
1000 | |
1001 dnl Set up the Mac toolbox video driver for Mac OS 7-9 | |
1002 CheckTOOLBOX() | |
1003 { | |
1004 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" | |
1005 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" | |
1006 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" | |
1007 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" | |
1008 } | |
1009 | |
1010 dnl Set up the Mac toolbox video driver for Mac OS X | |
1011 CheckCARBON() | |
1012 { | |
1013 # "MACOSX" is not an official definition, but it's commonly | |
1014 # accepted as a way to differentiate between what runs on X | |
1015 # and what runs on older Macs - while in theory "Carbon" defns | |
1016 # are consistent between the two, in practice Carbon is still | |
1017 # changing. -sts Aug 2000 | |
1018 mac_autoconf_target_workaround="MAC" | |
1019 CFLAGS="$CFLAGS -I/System/Library/Frameworks/Carbon.framework/Headers \ | |
1020 -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" | |
1021 VIDEO_SUBDIRS="$VIDEO_SUBDIRS maccommon" | |
1022 VIDEO_DRIVERS="$VIDEO_DRIVERS maccommon/libvideo_maccommon.la" | |
1023 VIDEO_SUBDIRS="$VIDEO_SUBDIRS macrom" | |
1024 VIDEO_DRIVERS="$VIDEO_DRIVERS macrom/libvideo_macrom.la" | |
1025 } | |
1026 | |
1027 dnl Set up the kernel statistics library for Solaris | |
1028 CheckKSTAT() | |
1029 { | |
1030 CFLAGS="$CFLAGS -DHAVE_KSTAT" | |
1031 SYSTEM_LIBS="$SYSTEM_LIBS -lkstat" | |
1032 } | |
1033 | |
1034 case "$target" in | |
1035 *-*-linux*) | |
1036 ARCH=linux | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1037 CheckDummyVideo |
0 | 1038 CheckNASM |
1039 CheckOSS | |
1040 CheckALSA | |
1041 CheckARTSC | |
1042 CheckESD | |
1043 CheckNAS | |
1044 CheckX11 | |
1045 CheckDGA | |
1046 CheckFBCON | |
1047 CheckGGI | |
1048 CheckSVGA | |
1049 CheckAAlib | |
1050 CheckOpenGL | |
1051 CheckInputEvents | |
1052 CheckPTHREAD | |
1053 # Set up files for the main() stub | |
1054 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1055 # Set up files for the audio library | |
1056 # We use the OSS and ALSA API's, not the Sun audio API | |
1057 #if test x$enable_audio = xyes; then | |
1058 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1059 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1060 #fi | |
1061 # Set up files for the joystick library | |
1062 if test x$enable_joystick = xyes; then | |
1063 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS linux" | |
1064 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS linux/libjoystick_linux.la" | |
1065 fi | |
1066 # Set up files for the cdrom library | |
1067 if test x$enable_cdrom = xyes; then | |
1068 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) | |
1069 fi | |
1070 # Set up files for the thread library | |
1071 if test x$enable_threads = xyes; then | |
1072 if test x$use_pthreads != xyes; then | |
1073 COPY_ARCH_SRC(src/thread, linux, clone.S) | |
1074 fi | |
1075 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1076 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1077 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1078 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1079 else | |
1080 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1081 fi | |
1082 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1083 if test x$glibc20_pthreads = xyes; then | |
1084 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1085 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1086 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1087 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1088 else | |
1089 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1090 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1091 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1092 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1093 fi | |
1094 fi | |
1095 # Set up files for the timer library | |
1096 if test x$enable_timers = xyes; then | |
1097 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1098 fi | |
1099 ;; | |
1100 *-*-bsdi*) | |
1101 ARCH=bsdi | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1102 CheckDummyVideo |
0 | 1103 CheckNASM |
1104 CheckOSS | |
1105 CheckNAS | |
1106 CheckX11 | |
1107 CheckDGA | |
1108 CheckSVGA | |
1109 CheckAAlib | |
1110 CheckOpenGL | |
1111 CheckPTHREAD | |
1112 # Set up files for the main() stub | |
1113 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1114 # Set up files for the joystick library | |
1115 # (No joystick support yet) | |
1116 if test x$enable_joystick = xyes; then | |
1117 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1118 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1119 fi | |
1120 # Set up files for the cdrom library | |
1121 # (No cdrom support yet) | |
1122 if test x$enable_cdrom = xyes; then | |
1123 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1124 fi | |
1125 # Set up files for the thread library | |
1126 if test x$enable_threads = xyes; then | |
1127 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1128 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1129 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1130 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1131 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1132 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1133 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1134 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1135 fi | |
1136 # Set up files for the timer library | |
1137 if test x$enable_timers = xyes; then | |
1138 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1139 fi | |
1140 ;; | |
1141 *-*-freebsd*) | |
1142 ARCH=freebsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1143 CheckDummyVideo |
0 | 1144 CheckNASM |
1145 CheckOSS | |
1146 CheckARTSC | |
1147 CheckESD | |
1148 CheckNAS | |
1149 CheckX11 | |
1150 CheckDGA | |
1151 CheckSVGA | |
1152 CheckAAlib | |
1153 CheckOpenGL | |
1154 CheckPTHREAD | |
1155 # Set up files for the main() stub | |
1156 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1157 # Set up files for the audio library | |
1158 # We use the OSS and ALSA API's, not the Sun audio API | |
1159 #if test x$enable_audio = xyes; then | |
1160 # AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1161 # AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1162 #fi | |
1163 # Set up files for the joystick library | |
1164 # (No joystick support yet) | |
1165 if test x$enable_joystick = xyes; then | |
1166 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1167 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1168 fi | |
1169 # Set up files for the cdrom library | |
1170 if test x$enable_cdrom = xyes; then | |
1171 COPY_ARCH_SRC(src/cdrom, freebsd, SDL_syscdrom.c) | |
1172 fi | |
1173 # Set up files for the thread library | |
1174 if test x$enable_threads = xyes; then | |
1175 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1176 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1177 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1178 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1179 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1180 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1181 else | |
1182 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1183 fi | |
1184 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1185 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1186 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1187 fi | |
1188 # Set up files for the timer library | |
1189 if test x$enable_timers = xyes; then | |
1190 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1191 fi | |
1192 ;; | |
1193 *-*-netbsd*) | |
1194 ARCH=netbsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1195 CheckDummyVideo |
0 | 1196 CheckNASM |
1197 CheckOSS | |
1198 CheckARTSC | |
1199 CheckESD | |
1200 CheckNAS | |
1201 CheckX11 | |
1202 CheckAAlib | |
1203 CheckOpenGL | |
1204 CheckPTHREAD | |
1205 # Set up files for the main() stub | |
1206 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1207 # Set up files for the audio library | |
1208 if test x$enable_audio = xyes; then | |
1209 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1210 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1211 fi | |
1212 # Set up files for the joystick library | |
1213 # (No joystick support yet) | |
1214 if test x$enable_joystick = xyes; then | |
1215 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1216 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1217 fi | |
1218 # Set up files for the cdrom library | |
1219 if test x$enable_cdrom = xyes; then | |
1220 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) | |
1221 fi | |
1222 # Set up files for the thread library | |
1223 if test x$enable_threads = xyes; then | |
1224 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1225 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1226 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1227 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
|
1228 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
|
1229 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
|
1230 else |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1231 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
|
1232 fi |
0 | 1233 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) |
1234 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1235 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1236 fi | |
1237 # Set up files for the timer library | |
1238 if test x$enable_timers = xyes; then | |
1239 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1240 fi | |
1241 # NetBSD does not define "unix" | |
1242 CFLAGS="$CFLAGS -Dunix" | |
1243 ;; | |
1244 *-*-openbsd*) | |
1245 ARCH=openbsd | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1246 CFLAGS="$CFLAGS -Dunix" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1247 CheckDummyVideo |
0 | 1248 CheckNASM |
1249 CheckOSS | |
1250 CheckARTSC | |
1251 CheckESD | |
1252 CheckNAS | |
1253 CheckX11 | |
1254 CheckAAlib | |
1255 CheckOpenGL | |
1256 CheckPTHREAD | |
1257 # Set up files for the main() stub | |
1258 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1259 # Set up files for the audio library | |
1260 if test x$enable_audio = xyes; then | |
1261 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1262 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1263 fi | |
1264 # Set up files for the joystick library | |
1265 # (No joystick support yet) | |
1266 if test x$enable_joystick = xyes; then | |
1267 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1268 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1269 fi | |
1270 # Set up files for the cdrom library | |
1271 if test x$enable_cdrom = xyes; then | |
1272 COPY_ARCH_SRC(src/cdrom, openbsd, SDL_syscdrom.c) | |
1273 fi | |
1274 # Set up files for the thread library | |
1275 if test x$enable_threads = xyes; then | |
1276 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1277 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1278 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1279 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1280 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1281 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1282 else | |
1283 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1284 fi | |
1285 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1286 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1287 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1288 fi | |
1289 # Set up files for the timer library | |
1290 if test x$enable_timers = xyes; then | |
1291 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1292 fi | |
1293 ;; | |
1294 *-*-sysv5*) | |
1295 ARCH=sysv5 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1296 CheckDummyVideo |
0 | 1297 CheckNASM |
1298 CheckOSS | |
1299 CheckARTSC | |
1300 CheckESD | |
1301 CheckNAS | |
1302 CheckX11 | |
1303 CheckAAlib | |
1304 CheckOpenGL | |
1305 CheckPTHREAD | |
1306 CheckKSTAT | |
1307 # Set up files for the main() stub | |
1308 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1309 # Set up files for the audio library | |
1310 if test x$enable_audio = xyes; then | |
1311 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1312 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1313 fi | |
1314 # Set up files for the joystick library | |
1315 # (No joystick support yet) | |
1316 if test x$enable_joystick = xyes; then | |
1317 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1318 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1319 fi | |
1320 # Set up files for the cdrom library | |
1321 if test x$enable_cdrom = xyes; then | |
1322 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1323 fi | |
1324 # Set up files for the thread library | |
1325 if test x$enable_threads = xyes; then | |
1326 COPY_ARCH_SRC(src/thread, generic, SDL_systhread.c) | |
1327 COPY_ARCH_SRC(src/thread, generic, SDL_systhread_c.h) | |
1328 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1329 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1330 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1331 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1332 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1333 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1334 fi | |
1335 # Set up files for the timer library | |
1336 if test x$enable_timers = xyes; then | |
1337 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1338 fi | |
1339 ;; | |
1340 *-*-solaris*) | |
1341 ARCH=solaris | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1342 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
|
1343 CheckDummyVideo |
0 | 1344 CheckNASM |
1345 CheckARTSC | |
1346 CheckESD | |
1347 CheckNAS | |
1348 CheckX11 | |
1349 CheckAAlib | |
1350 CheckOpenGL | |
1351 CheckPTHREAD | |
1352 CheckKSTAT | |
1353 # Set up files for the main() stub | |
1354 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1355 # Set up files for the audio library | |
1356 if test x$enable_audio = xyes; then | |
1357 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1358 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1359 fi | |
1360 # Set up files for the joystick library | |
1361 # (No joystick support yet) | |
1362 if test x$enable_joystick = xyes; then | |
1363 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1364 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1365 fi | |
1366 # Set up files for the cdrom library | |
1367 if test x$enable_cdrom = xyes; then | |
1368 COPY_ARCH_SRC(src/cdrom, linux, SDL_syscdrom.c) | |
1369 fi | |
1370 # Set up files for the thread library | |
1371 if test x$enable_threads = xyes; then | |
1372 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1373 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1374 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1375 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1376 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1377 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1378 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1379 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1380 fi | |
1381 # Set up files for the timer library | |
1382 if test x$enable_timers = xyes; then | |
1383 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1384 fi | |
1385 ;; | |
1386 *-*-irix*) | |
1387 ARCH=irix | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1388 CheckDummyVideo |
0 | 1389 CheckNAS |
1390 CheckX11 | |
1391 CheckAAlib | |
1392 CheckOpenGL | |
1393 CheckPTHREAD | |
1394 # Set up files for the main() stub | |
1395 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1396 # Set up files for the audio library | |
1397 if test x$enable_audio = xyes; then | |
1398 AUDIO_SUBDIRS="$AUDIO_SUBDIRS dmedia" | |
1399 AUDIO_DRIVERS="$AUDIO_DRIVERS dmedia/libaudio_dmedia.la" | |
1400 LIBS="$LIBS -laudio" | |
1401 fi | |
1402 # Set up files for the joystick library | |
1403 # (No joystick support yet) | |
1404 if test x$enable_joystick = xyes; then | |
1405 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1406 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1407 fi | |
1408 # Set up files for the cdrom library | |
1409 # (No CD-ROM support yet) | |
1410 if test x$enable_cdrom = xyes; then | |
1411 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1412 fi | |
1413 # Set up files for the thread library | |
1414 if test x$enable_threads = xyes; then | |
1415 if test x$use_pthreads = xyes; then | |
1416 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1417 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1418 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1419 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1420 if test x$enable_pthread_sem != xyes; then | |
1421 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1422 else | |
1423 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1424 fi | |
1425 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1426 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1427 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1428 else | |
1429 COPY_ARCH_SRC(src/thread, irix, SDL_systhread.c) | |
1430 COPY_ARCH_SRC(src/thread, irix, SDL_systhread_c.h) | |
1431 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1432 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1433 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1434 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1435 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1436 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1437 fi | |
1438 fi | |
1439 # Set up files for the timer library | |
1440 if test x$enable_timers = xyes; then | |
1441 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1442 fi | |
1443 ;; | |
1444 *-*-hpux*) | |
1445 ARCH=hpux | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1446 CheckDummyVideo |
0 | 1447 CheckNAS |
1448 CheckX11 | |
1449 CheckGGI | |
1450 CheckAAlib | |
1451 CheckOpenGL | |
1452 CheckPTHREAD | |
1453 # Set up files for the main() stub | |
1454 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1455 # Set up files for the audio library | |
1456 if test x$enable_audio = xyes; then | |
1457 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1458 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1459 fi | |
1460 # Set up files for the joystick library | |
1461 # (No joystick support yet) | |
1462 if test x$enable_joystick = xyes; then | |
1463 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1464 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1465 fi | |
1466 # Set up files for the cdrom library | |
1467 # (No CD-ROM support yet) | |
1468 if test x$enable_cdrom = xyes; then | |
1469 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1470 fi | |
1471 # Set up files for the thread library | |
1472 if test x$enable_threads = xyes; then | |
1473 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1474 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1475 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1476 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1477 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1478 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1479 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1480 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1481 fi | |
1482 # Set up files for the timer library | |
1483 if test x$enable_timers = xyes; then | |
1484 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1485 fi | |
1486 ;; | |
1487 *-*-aix*) | |
1488 ARCH=aix | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1489 CheckDummyVideo |
0 | 1490 CheckNAS |
1491 CheckX11 | |
1492 CheckGGI | |
1493 CheckAAlib | |
1494 CheckOpenGL | |
1495 CheckPTHREAD | |
1496 # Set up files for the main() stub | |
1497 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1498 # Set up files for the audio library | |
1499 if test x$enable_audio = xyes; then | |
1500 AUDIO_SUBDIRS="$AUDIO_SUBDIRS paudio" | |
1501 AUDIO_DRIVERS="$AUDIO_DRIVERS paudio/libaudio_paudio.la" | |
1502 fi | |
1503 # Set up files for the joystick library | |
1504 # (No joystick support yet) | |
1505 if test x$enable_joystick = xyes; then | |
1506 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1507 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1508 fi | |
1509 # Set up files for the cdrom library | |
1510 if test x$enable_cdrom = xyes; then | |
1511 COPY_ARCH_SRC(src/cdrom, aix, SDL_syscdrom.c) | |
1512 fi | |
1513 # Set up files for the thread library | |
1514 if test x$enable_threads = xyes; then | |
1515 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1516 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1517 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1518 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1519 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1520 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1521 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1522 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1523 fi | |
1524 # Set up files for the timer library | |
1525 if test x$enable_timers = xyes; then | |
1526 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1527 fi | |
1528 ;; | |
1529 *-*-osf*) | |
1530 ARCH=osf | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1531 CheckDummyVideo |
0 | 1532 CheckNAS |
1533 CheckX11 | |
1534 CheckGGI | |
1535 CheckAAlib | |
1536 CheckOpenGL | |
1537 CheckPTHREAD | |
1538 # Set up files for the main() stub | |
1539 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1540 # Set up files for the audio library | |
1541 if test x$enable_audio = xyes; then | |
1542 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1543 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1544 fi | |
1545 # Set up files for the joystick library | |
1546 # (No joystick support yet) | |
1547 if test x$enable_joystick = xyes; then | |
1548 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1549 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1550 fi | |
1551 # Set up files for the cdrom library | |
1552 # (No cdrom support yet) | |
1553 if test x$enable_cdrom = xyes; then | |
1554 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1555 fi | |
1556 # Set up files for the thread library | |
1557 if test x$enable_threads = xyes; then | |
1558 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1559 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1560 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1561 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1562 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1563 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1564 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1565 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1566 fi | |
1567 # Set up files for the timer library | |
1568 if test x$enable_timers = xyes; then | |
1569 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1570 fi | |
1571 ;; | |
1572 *-*-qnx*) | |
1573 ARCH=qnx | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1574 CheckDummyVideo |
0 | 1575 CheckNAS |
1576 CheckPHOTON | |
1577 CheckX11 | |
1578 CheckOpenGL | |
1579 CheckPTHREAD | |
1580 # Set up files for the main() stub | |
1581 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1582 # Set up files for the audio library | |
1583 if test x$enable_audio = xyes; then | |
1584 CFLAGS="$CFLAGS -DALSA_SUPPORT" | |
1585 SYSTEM_LIBS="$SYSTEM_LIBS -lasound" | |
1586 AUDIO_SUBDIRS="$AUDIO_SUBDIRS nto" | |
1587 AUDIO_DRIVERS="$AUDIO_DRIVERS nto/libaudio_nto.la" | |
1588 AUDIO_SUBDIRS="$AUDIO_SUBDIRS sun" | |
1589 AUDIO_DRIVERS="$AUDIO_DRIVERS sun/libaudio_sun.la" | |
1590 fi | |
1591 # Set up files for the joystick library | |
1592 if test x$enable_joystick = xyes; then | |
1593 # (No joystick support yet) | |
1594 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1595 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1596 fi | |
1597 # Set up files for the cdrom library | |
1598 if test x$enable_cdrom = xyes; then | |
1599 COPY_ARCH_SRC(src/cdrom, qnx, SDL_syscdrom.c) | |
1600 fi | |
1601 # Set up files for the thread library | |
1602 if test x$enable_threads = xyes; then | |
1603 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1604 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1605 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1606 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1607 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1608 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1609 COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c) | |
1610 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1611 fi | |
1612 # Set up files for the timer library | |
1613 if test x$enable_timers = xyes; then | |
1614 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1615 fi | |
1616 ;; | |
1617 *-*-cygwin* | *-*-mingw32*) | |
1618 ARCH=win32 | |
1619 if test "$build" != "$target"; then # cross-compiling | |
1620 # Default cross-compile location | |
1621 ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc | |
1622 else | |
1623 # 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
|
1624 if [ "$BUILD_PREFIX" != "" ]; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1625 ac_default_prefix=$BUILD_PREFIX |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1626 fi |
0 | 1627 fi |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1628 CheckDummyVideo |
0 | 1629 CheckWIN32 |
1630 CheckDIRECTX | |
1631 CheckNASM | |
1632 # Set up files for the main() stub | |
1633 COPY_ARCH_SRC(src/main, win32, SDL_main.c) | |
1634 # Set up files for the audio library | |
1635 if test x$enable_audio = xyes; then | |
1636 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windib" | |
1637 AUDIO_DRIVERS="$AUDIO_DRIVERS windib/libaudio_windib.la" | |
1638 if test x$use_directx = xyes; then | |
1639 AUDIO_SUBDIRS="$AUDIO_SUBDIRS windx5" | |
1640 AUDIO_DRIVERS="$AUDIO_DRIVERS windx5/libaudio_windx5.la" | |
1641 fi | |
1642 fi | |
1643 # Set up files for the joystick library | |
1644 if test x$enable_joystick = xyes; then | |
1645 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS win32" | |
1646 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS win32/libjoystick_winmm.la" | |
1647 fi | |
1648 # Set up files for the cdrom library | |
1649 if test x$enable_cdrom = xyes; then | |
1650 COPY_ARCH_SRC(src/cdrom, win32, SDL_syscdrom.c) | |
1651 fi | |
1652 # Set up files for the thread library | |
1653 if test x$enable_threads = xyes; then | |
1654 COPY_ARCH_SRC(src/thread, win32, SDL_systhread.c) | |
1655 COPY_ARCH_SRC(src/thread, win32, SDL_systhread_c.h) | |
1656 COPY_ARCH_SRC(src/thread, win32, SDL_sysmutex.c) | |
1657 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1658 COPY_ARCH_SRC(src/thread, win32, SDL_syssem.c) | |
1659 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1660 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1661 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1662 fi | |
1663 # Set up files for the timer library | |
1664 if test x$enable_timers = xyes; then | |
1665 COPY_ARCH_SRC(src/timer, win32, SDL_systimer.c) | |
1666 fi | |
1667 # The Win32 platform requires special setup | |
1668 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
|
1669 case "$target" in |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1670 *-*-cygwin*) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1671 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
|
1672 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
|
1673 LIBS="$LIBS -mno-cygwin" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1674 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
|
1675 ;; |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1676 *-*-mingw32*) |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1677 SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows" |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1678 ;; |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1679 esac |
0 | 1680 ;; |
1681 *-*-beos*) | |
1682 ARCH=beos | |
1683 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
|
1684 CheckDummyVideo |
0 | 1685 CheckNASM |
1686 CheckBWINDOW | |
1687 CheckBeGL | |
1688 # Set up files for the main() stub | |
1689 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1690 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.cc) | |
1691 COPY_ARCH_SRC(src/main, beos, SDL_BeApp.h) | |
1692 # Set up files for the audio library | |
1693 if test x$enable_audio = xyes; then | |
1694 AUDIO_SUBDIRS="$AUDIO_SUBDIRS baudio" | |
1695 AUDIO_DRIVERS="$AUDIO_DRIVERS baudio/libaudio_baudio.la" | |
1696 fi | |
1697 # Set up files for the joystick library | |
1698 if test x$enable_joystick = xyes; then | |
1699 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS beos" | |
1700 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS beos/libjoystick_beos.la" | |
1701 fi | |
1702 # Set up files for the cdrom library | |
1703 if test x$enable_cdrom = xyes; then | |
1704 COPY_ARCH_SRC(src/cdrom, beos, SDL_syscdrom.c) | |
1705 fi | |
1706 # Set up files for the thread library | |
1707 if test x$enable_threads = xyes; then | |
1708 COPY_ARCH_SRC(src/thread, beos, SDL_systhread.c) | |
1709 COPY_ARCH_SRC(src/thread, beos, SDL_systhread_c.h) | |
1710 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1711 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1712 COPY_ARCH_SRC(src/thread, beos, SDL_syssem.c) | |
1713 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1714 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1715 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1716 fi | |
1717 # Set up files for the timer library | |
1718 if test x$enable_timers = xyes; then | |
1719 COPY_ARCH_SRC(src/timer, beos, SDL_systimer.c) | |
1720 fi | |
1721 # The BeOS platform requires special libraries | |
1722 SYSTEM_LIBS="$SYSTEM_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding" | |
1723 ;; | |
1724 *-*-macos*) | |
1725 # This would be used if cross-compiling to MacOS 9. No way to | |
1726 # use it at present, but Apple is working on a X-to-9 compiler | |
1727 # for which this case would be handy. | |
1728 ARCH=macos | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1729 CheckDummyVideo |
0 | 1730 CheckTOOLBOX |
1731 CheckMacGL | |
1732 # Set up files for the main() stub | |
1733 COPY_ARCH_SRC(src/main, macos, SDL_main.c) | |
1734 # Set up files for the audio library | |
1735 if test x$enable_audio = xyes; then | |
1736 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" | |
1737 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" | |
1738 fi | |
1739 # Set up files for the joystick library | |
1740 if test x$enable_joystick = xyes; then | |
1741 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS macos" | |
1742 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS macos/libjoystick_macos.la" | |
1743 fi | |
1744 # Set up files for the cdrom library | |
1745 if test x$enable_cdrom = xyes; then | |
1746 COPY_ARCH_SRC(src/cdrom, macos, SDL_syscdrom.c) | |
1747 fi | |
1748 # Set up files for the thread library | |
1749 if test x$enable_threads = xyes; then | |
1750 COPY_ARCH_SRC(src/thread, macos, SDL_systhread.c) | |
1751 COPY_ARCH_SRC(src/thread, macos, SDL_systhread_c.h) | |
1752 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex.c) | |
1753 COPY_ARCH_SRC(src/thread, generic, SDL_sysmutex_c.h) | |
1754 COPY_ARCH_SRC(src/thread, macos, SDL_syssem.c) | |
1755 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1756 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1757 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1758 fi | |
1759 # Set up files for the timer library | |
1760 if test x$enable_timers = xyes; then | |
1761 COPY_ARCH_SRC(src/timer, macos, SDL_systimer.c) | |
1762 fi | |
1763 # The MacOS platform requires special setup | |
1764 SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main" | |
1765 SDL_LIBS="-lSDLmain $SDL_LIBS" | |
1766 ;; | |
1767 *-*-darwin* ) | |
1768 # Strictly speaking, we want "Mac OS X", not "Darwin", which is | |
1769 # just the OS X kernel sans upper layers like Carbon. But | |
1770 # config.guess comes back with "darwin", so go with the flow. | |
1771 ARCH=macos | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1772 CheckDummyVideo |
0 | 1773 CheckCARBON |
1774 CheckMacGL | |
1775 CheckPTHREAD | |
1776 # Set up files for the main() stub | |
1777 # COPY_ARCH_SRC(src/main, macos, SDL_main.c) | |
1778 COPY_ARCH_SRC(src/main, linux, SDL_main.c) | |
1779 # Set up files for the audio library | |
1780 if test x$enable_audio = xyes; then | |
1781 AUDIO_SUBDIRS="$AUDIO_SUBDIRS macrom" | |
1782 AUDIO_DRIVERS="$AUDIO_DRIVERS macrom/libaudio_macrom.la" | |
1783 fi | |
1784 # Set up files for the joystick library | |
1785 if test x$enable_joystick = xyes; then | |
1786 JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS dummy" | |
1787 JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS dummy/libjoystick_dummy.la" | |
1788 fi | |
1789 # Set up files for the cdrom library | |
1790 if test x$enable_cdrom = xyes; then | |
1791 COPY_ARCH_SRC(src/cdrom, dummy, SDL_syscdrom.c) | |
1792 fi | |
1793 # Set up files for the thread library | |
1794 if test x$enable_threads = xyes; then | |
1795 COPY_ARCH_SRC(src/thread, linux, SDL_systhread.c) | |
1796 COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h) | |
1797 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c) | |
1798 COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h) | |
1799 if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then | |
1800 COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c) | |
1801 else | |
1802 COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c) | |
1803 fi | |
1804 COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h) | |
1805 COPY_ARCH_SRC(src/thread, generic, SDL_syscond.c) | |
1806 COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h) | |
1807 fi | |
1808 # Set up files for the timer library | |
1809 if test x$enable_timers = xyes; then | |
1810 COPY_ARCH_SRC(src/timer, linux, SDL_systimer.c) | |
1811 fi | |
1812 # The MacOS X platform requires special setup | |
1813 SDL_CFLAGS="$SDL_CFLAGS -F/System/Library/Frameworks/Carbon.framework" | |
1814 SDL_LIBS="$SDL_LIBS -framework Carbon" | |
1815 ;; | |
1816 *) | |
1817 AC_MSG_ERROR(Unsupported target: Please add to configure.in) | |
1818 ;; | |
1819 esac | |
1820 AC_SUBST(ARCH) | |
1821 | |
1822 # Set the conditional variables for this target | |
1823 AM_CONDITIONAL(TARGET_LINUX, test $ARCH = linux) | |
1824 AM_CONDITIONAL(TARGET_SOLARIS, test $ARCH = solaris) | |
1825 AM_CONDITIONAL(TARGET_IRIX, test $ARCH = irix) | |
1826 AM_CONDITIONAL(TARGET_BSDI, test $ARCH = bsdi) | |
1827 AM_CONDITIONAL(TARGET_FREEBSD, test $ARCH = freebsd) | |
1828 AM_CONDITIONAL(TARGET_OPENBSD, test $ARCH = openbsd) | |
1829 AM_CONDITIONAL(TARGET_AIX, test $ARCH = aix) | |
1830 AM_CONDITIONAL(TARGET_WIN32, test $ARCH = win32) | |
1831 AM_CONDITIONAL(TARGET_BEOS, test $ARCH = beos) | |
1832 AM_CONDITIONAL(TARGET_MACOS, test $ARCH = macos) | |
1833 | |
1834 # Set conditional variables for shared and static library selection. | |
1835 # These are not used in any Makefile.am but in sdl-config.in. | |
1836 AM_CONDITIONAL([ENABLE_SHARED], [test "$enable_shared" = yes]) | |
1837 AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) | |
1838 | |
1839 # Set runtime shared library paths as needed | |
1840 | |
1841 if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then | |
1842 SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib" | |
1843 fi | |
1844 | |
1845 if test $ARCH = solaris; then | |
1846 SDL_RLD_FLAGS="-R\${exec_prefix}/lib" | |
1847 fi | |
1848 | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1849 if test $ARCH = openbsd; then |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1850 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
|
1851 fi |
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1852 |
0 | 1853 dnl Output the video drivers we use |
1854 if test x$enable_video = xtrue; then | |
1855 if test "$VIDEO_SUBDIRS" = ""; then | |
1856 AC_MSG_ERROR(*** No video drivers are enabled!) | |
1857 fi | |
1858 fi | |
1859 AC_SUBST(AUDIO_SUBDIRS) | |
1860 AC_SUBST(AUDIO_DRIVERS) | |
1861 AC_SUBST(VIDEO_SUBDIRS) | |
1862 AC_SUBST(VIDEO_DRIVERS) | |
1863 AC_SUBST(JOYSTICK_SUBDIRS) | |
1864 AC_SUBST(JOYSTICK_DRIVERS) | |
1865 AC_SUBST(SDL_EXTRADIRS) | |
1866 AC_SUBST(SDL_EXTRALIBS) | |
1867 AC_SUBST(SYSTEM_LIBS) | |
1868 | |
1869 dnl Expand the cflags and libraries needed by apps using SDL | |
1870 AC_SUBST(SDL_CFLAGS) | |
1871 AC_SUBST(SDL_LIBS) | |
1872 AC_SUBST(SDL_RLD_FLAGS) | |
1873 | |
1874 dnl Expand the libraries needed for static linking | |
1875 AC_SUBST(SYSTEM_LIBS) | |
1876 dnl Expand the include directories for building SDL | |
1877 CFLAGS="$CFLAGS -I\$(top_srcdir)/include" | |
1878 CFLAGS="$CFLAGS -I\$(top_srcdir)/include/SDL" | |
1879 CFLAGS="$CFLAGS -I\$(top_srcdir)/src -I\$(top_srcdir)/src/$ARCH" | |
1880 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/main" | |
1881 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/audio" | |
1882 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/video" | |
1883 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/events" | |
1884 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/joystick" | |
1885 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/cdrom" | |
1886 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/thread" | |
1887 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/timer" | |
1888 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/endian" | |
1889 CFLAGS="$CFLAGS -I\$(top_srcdir)/src/file" | |
1890 CXXFLAGS="$CFLAGS" | |
1891 | |
1892 # Finally create all the generated files | |
1893 dnl Important: Any directory that you want to be in the distcheck should | |
1894 dnl have a file listed here, so that configure generates the | |
1895 dnl subdirectories on the build target. | |
1896 AC_OUTPUT([ | |
1897 Makefile | |
1898 docs/Makefile | |
1899 docs/html/Makefile | |
1900 docs/man3/Makefile | |
1901 include/Makefile | |
1902 src/Makefile | |
1903 src/main/Makefile | |
1904 src/audio/Makefile | |
1905 src/audio/alsa/Makefile | |
1906 src/audio/arts/Makefile | |
1907 src/audio/baudio/Makefile | |
1908 src/audio/dma/Makefile | |
1909 src/audio/dmedia/Makefile | |
1910 src/audio/dsp/Makefile | |
1911 src/audio/esd/Makefile | |
1912 src/audio/macrom/Makefile | |
1913 src/audio/nas/Makefile | |
1914 src/audio/nto/Makefile | |
1915 src/audio/paudio/Makefile | |
1916 src/audio/sun/Makefile | |
1917 src/audio/ums/Makefile | |
1918 src/audio/windib/Makefile | |
1919 src/audio/windx5/Makefile | |
1920 src/video/Makefile | |
1921 src/video/cybergfx/Makefile | |
1922 src/video/x11/Makefile | |
1923 src/video/dga/Makefile | |
1924 src/video/fbcon/Makefile | |
1925 src/video/ggi/Makefile | |
1926 src/video/maccommon/Makefile | |
1927 src/video/macdsp/Makefile | |
1928 src/video/macrom/Makefile | |
1929 src/video/svga/Makefile | |
1930 src/video/aalib/Makefile | |
1931 src/video/wincommon/Makefile | |
1932 src/video/windib/Makefile | |
1933 src/video/windx5/Makefile | |
1934 src/video/bwindow/Makefile | |
1935 src/video/photon/Makefile | |
1
cf2af46e9e2a
Changes since SDL 1.2.0 release
Sam Lantinga <slouken@lokigames.com>
parents:
0
diff
changeset
|
1936 src/video/dummy/Makefile |
0 | 1937 src/events/Makefile |
1938 src/joystick/Makefile | |
21
75a95f82bc1f
Updated the Amiga OS port of SDL (thanks Gabriele)
Sam Lantinga <slouken@lokigames.com>
parents:
19
diff
changeset
|
1939 src/joystick/amigaos/Makefile |
0 | 1940 src/joystick/beos/Makefile |
1941 src/joystick/dummy/Makefile | |
1942 src/joystick/linux/Makefile | |
1943 src/joystick/macos/Makefile | |
1944 src/joystick/win32/Makefile | |
1945 src/cdrom/Makefile | |
1946 src/thread/Makefile | |
1947 src/timer/Makefile | |
1948 src/endian/Makefile | |
1949 src/file/Makefile | |
1950 src/hermes/Makefile | |
1951 sdl-config | |
1952 SDL.spec | |
1953 ], [chmod +x sdl-config]) |