slouken@0
|
1 |
dnl Process this file with autoconf to produce a configure script.
|
slouken@0
|
2 |
AC_INIT(README)
|
slouken@1341
|
3 |
AC_CONFIG_HEADER(include/SDL_config.h)
|
slouken@1353
|
4 |
AC_GNU_SOURCE
|
slouken@0
|
5 |
|
slouken@0
|
6 |
dnl Set various version strings - taken gratefully from the GTk sources
|
slouken@0
|
7 |
#
|
slouken@0
|
8 |
# Making releases:
|
slouken@0
|
9 |
# Edit include/SDL/SDL_version.h and change the version, then:
|
slouken@0
|
10 |
# SDL_MICRO_VERSION += 1;
|
slouken@0
|
11 |
# SDL_INTERFACE_AGE += 1;
|
slouken@0
|
12 |
# SDL_BINARY_AGE += 1;
|
slouken@0
|
13 |
# if any functions have been added, set SDL_INTERFACE_AGE to 0.
|
slouken@0
|
14 |
# if backwards compatibility has been broken,
|
slouken@0
|
15 |
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
|
slouken@0
|
16 |
#
|
slouken@0
|
17 |
SDL_MAJOR_VERSION=1
|
slouken@0
|
18 |
SDL_MINOR_VERSION=2
|
slouken@1222
|
19 |
SDL_MICRO_VERSION=10
|
slouken@1222
|
20 |
SDL_INTERFACE_AGE=3
|
slouken@1222
|
21 |
SDL_BINARY_AGE=10
|
slouken@0
|
22 |
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
|
slouken@0
|
23 |
|
slouken@0
|
24 |
AC_SUBST(SDL_MAJOR_VERSION)
|
slouken@0
|
25 |
AC_SUBST(SDL_MINOR_VERSION)
|
slouken@0
|
26 |
AC_SUBST(SDL_MICRO_VERSION)
|
slouken@0
|
27 |
AC_SUBST(SDL_INTERFACE_AGE)
|
slouken@0
|
28 |
AC_SUBST(SDL_BINARY_AGE)
|
slouken@0
|
29 |
AC_SUBST(SDL_VERSION)
|
slouken@0
|
30 |
|
slouken@0
|
31 |
# libtool versioning
|
slouken@0
|
32 |
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
|
slouken@0
|
33 |
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
|
slouken@0
|
34 |
LT_REVISION=$SDL_INTERFACE_AGE
|
slouken@0
|
35 |
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
|
slouken@0
|
36 |
|
slouken@0
|
37 |
AC_SUBST(LT_RELEASE)
|
slouken@0
|
38 |
AC_SUBST(LT_CURRENT)
|
slouken@0
|
39 |
AC_SUBST(LT_REVISION)
|
slouken@0
|
40 |
AC_SUBST(LT_AGE)
|
slouken@0
|
41 |
|
slouken@0
|
42 |
dnl Detect the canonical host and target build environment
|
slouken@1361
|
43 |
AC_CONFIG_AUX_DIRS($srcdir/build-scripts)
|
slouken@557
|
44 |
AC_CANONICAL_SYSTEM
|
slouken@1354
|
45 |
AC_C_BIGENDIAN
|
slouken@1354
|
46 |
if test x$ac_cv_c_bigendian = xyes; then
|
slouken@1354
|
47 |
AC_DEFINE(SDL_BYTEORDER, 4321)
|
slouken@1354
|
48 |
else
|
slouken@1354
|
49 |
AC_DEFINE(SDL_BYTEORDER, 1234)
|
slouken@1354
|
50 |
fi
|
slouken@0
|
51 |
|
slouken@1363
|
52 |
dnl Set up the base CFLAGS and LIBS
|
slouken@1363
|
53 |
case "$target" in
|
slouken@1363
|
54 |
*-*-cygwin*)
|
slouken@1363
|
55 |
# We build SDL on cygwin without the UNIX emulation layer
|
slouken@1363
|
56 |
BASE_CFLAGS="-I/usr/include/mingw -DWIN32 -Uunix -mno-cygwin"
|
slouken@1363
|
57 |
BASE_LIBS="-mno-cygwin"
|
slouken@1363
|
58 |
;;
|
slouken@1363
|
59 |
*)
|
slouken@1363
|
60 |
BASE_CFLAGS="-D_GNU_SOURCE=1"
|
slouken@1363
|
61 |
BASE_LIBS=""
|
slouken@1363
|
62 |
;;
|
slouken@1363
|
63 |
esac
|
slouken@1363
|
64 |
CFLAGS="$CFLAGS $BASE_CFLAGS"
|
slouken@1363
|
65 |
|
slouken@0
|
66 |
dnl Check for tools
|
slouken@1361
|
67 |
#AC_LIBTOOL_DLOPEN
|
slouken@0
|
68 |
AC_LIBTOOL_WIN32_DLL
|
slouken@1361
|
69 |
AC_PROG_LIBTOOL
|
slouken@0
|
70 |
AC_PROG_CC
|
slouken@200
|
71 |
AC_PROG_CXX
|
slouken@0
|
72 |
AC_PROG_INSTALL
|
slouken@1341
|
73 |
|
slouken@1353
|
74 |
dnl Check for compiler characteristics
|
slouken@1341
|
75 |
AC_C_CONST
|
slouken@1341
|
76 |
AC_C_INLINE
|
slouken@1353
|
77 |
AC_C_VOLATILE
|
slouken@1353
|
78 |
|
slouken@1361
|
79 |
dnl See whether we are allowed to use the system C library
|
slouken@1361
|
80 |
AC_ARG_ENABLE(libc,
|
slouken@1361
|
81 |
AC_HELP_STRING([--enable-libc], [Use the system C library [default=yes]]),
|
slouken@1361
|
82 |
, enable_libc=yes)
|
slouken@1361
|
83 |
if test x$enable_libc = xyes; then
|
slouken@1361
|
84 |
AC_DEFINE(HAVE_LIBC)
|
slouken@1361
|
85 |
|
slouken@1361
|
86 |
dnl Check for C library headers
|
slouken@1361
|
87 |
AC_HEADER_STDC
|
slouken@1361
|
88 |
AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h inttypes.h stdint.h ctype.h math.h signal.h)
|
slouken@1353
|
89 |
|
slouken@1361
|
90 |
dnl Check for typedefs, structures, etc.
|
slouken@1361
|
91 |
AC_TYPE_SIZE_T
|
slouken@1361
|
92 |
if test x$ac_cv_header_inttypes_h = xyes -o x$ac_cv_header_stdint_h = xyes; then
|
slouken@1361
|
93 |
AC_CHECK_TYPE(int64_t)
|
slouken@1361
|
94 |
if test x$ac_cv_type_int64_t = xyes; then
|
slouken@1361
|
95 |
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
slouken@1361
|
96 |
fi
|
slouken@1361
|
97 |
have_inttypes=yes
|
slouken@1353
|
98 |
fi
|
slouken@1361
|
99 |
|
slouken@1361
|
100 |
dnl Checks for library functions.
|
slouken@1361
|
101 |
AC_FUNC_ALLOCA
|
slouken@1361
|
102 |
AC_FUNC_MEMCMP
|
slouken@1361
|
103 |
if test x$ac_cv_func_memcmp_working = xyes; then
|
slouken@1361
|
104 |
AC_DEFINE(HAVE_MEMCMP)
|
slouken@1361
|
105 |
fi
|
slouken@1361
|
106 |
AC_FUNC_STRTOD
|
slouken@1361
|
107 |
if test x$ac_cv_func_strtod = xyes; then
|
slouken@1361
|
108 |
AC_DEFINE(HAVE_STRTOD)
|
slouken@1361
|
109 |
fi
|
slouken@1361
|
110 |
AC_CHECK_FUNCS(malloc calloc realloc free getenv putenv unsetenv qsort abs bcopy memset memcpy memmove strlen strcpy strncpy strcat strncat strdup _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol _i64toa _ui64toa strtoll atoi atof strcmp strncmp stricmp strcasecmp sscanf snprintf vsnprint sigaction setjmp nanosleep)
|
slouken@1361
|
111 |
fi
|
slouken@1361
|
112 |
|
slouken@1361
|
113 |
if test x$have_inttypes != xyes; then
|
slouken@1353
|
114 |
AC_CHECK_SIZEOF(char, 1)
|
slouken@1353
|
115 |
AC_CHECK_SIZEOF(short, 2)
|
slouken@1353
|
116 |
AC_CHECK_SIZEOF(int, 4)
|
slouken@1353
|
117 |
AC_CHECK_SIZEOF(long, 4)
|
slouken@1353
|
118 |
AC_CHECK_SIZEOF(long long, 8)
|
slouken@1353
|
119 |
if test x$ac_cv_sizeof_char = x1; then
|
slouken@1353
|
120 |
AC_DEFINE(int8_t, signed char)
|
slouken@1353
|
121 |
AC_DEFINE(uint8_t, unsigned char)
|
slouken@1353
|
122 |
fi
|
slouken@1353
|
123 |
if test x$ac_cv_sizeof_short = x2; then
|
slouken@1353
|
124 |
AC_DEFINE(int16_t, signed short)
|
slouken@1353
|
125 |
AC_DEFINE(uint16_t, unsigned short)
|
slouken@1353
|
126 |
else
|
slouken@1353
|
127 |
if test x$ac_cv_sizeof_int = x2; then
|
slouken@1353
|
128 |
AC_DEFINE(int16_t, signed int)
|
slouken@1353
|
129 |
AC_DEFINE(uint16_t, unsigned int)
|
slouken@1353
|
130 |
fi
|
slouken@1353
|
131 |
fi
|
slouken@1353
|
132 |
if test x$ac_cv_sizeof_int = x4; then
|
slouken@1353
|
133 |
AC_DEFINE(int32_t, signed int)
|
slouken@1353
|
134 |
AC_DEFINE(uint32_t, unsigned int)
|
slouken@1353
|
135 |
else
|
slouken@1353
|
136 |
if test x$ac_cv_sizeof_long = x4; then
|
slouken@1353
|
137 |
AC_DEFINE(int32_t, signed long)
|
slouken@1353
|
138 |
AC_DEFINE(uint32_t, unsigned long)
|
slouken@1353
|
139 |
fi
|
slouken@1353
|
140 |
fi
|
slouken@1353
|
141 |
if test x$ac_cv_sizeof_long = x8; then
|
slouken@1353
|
142 |
AC_DEFINE(int64_t, signed long)
|
slouken@1353
|
143 |
AC_DEFINE(uint64_t, unsigned long)
|
slouken@1353
|
144 |
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
slouken@1353
|
145 |
else
|
slouken@1353
|
146 |
if test x$ac_cv_sizeof_long_long = x8; then
|
slouken@1353
|
147 |
AC_DEFINE(int64_t, signed long long)
|
slouken@1353
|
148 |
AC_DEFINE(uint64_t, unsigned long long)
|
slouken@1353
|
149 |
AC_DEFINE(SDL_HAS_64BIT_TYPE)
|
slouken@1353
|
150 |
fi
|
slouken@1353
|
151 |
fi
|
slouken@1361
|
152 |
AC_DEFINE(size_t, unsigned int)
|
slouken@1361
|
153 |
AC_DEFINE(uintptr_t, unsigned long)
|
slouken@1353
|
154 |
fi
|
slouken@1341
|
155 |
|
slouken@1361
|
156 |
# Set up the build preprocessor flags
|
slouken@1361
|
157 |
INCLUDE="-I$srcdir/include"
|
slouken@1361
|
158 |
if test x$srcdir != x.; then
|
slouken@1361
|
159 |
INCLUDE="-Iinclude $INCLUDE"
|
slouken@1353
|
160 |
fi
|
slouken@1363
|
161 |
BUILD_CFLAGS="$BASE_CFLAGS \$(INCLUDE)"
|
slouken@1353
|
162 |
|
slouken@1361
|
163 |
# Standard C sources
|
slouken@1361
|
164 |
SOURCES="$SOURCES $srcdir/src/*.c"
|
slouken@1361
|
165 |
SOURCES="$SOURCES $srcdir/src/audio/*.c"
|
slouken@1361
|
166 |
SOURCES="$SOURCES $srcdir/src/cdrom/*.c"
|
slouken@1361
|
167 |
SOURCES="$SOURCES $srcdir/src/cpuinfo/*.c"
|
slouken@1361
|
168 |
SOURCES="$SOURCES $srcdir/src/events/*.c"
|
slouken@1361
|
169 |
SOURCES="$SOURCES $srcdir/src/file/*.c"
|
slouken@1361
|
170 |
SOURCES="$SOURCES $srcdir/src/joystick/*.c"
|
slouken@1361
|
171 |
SOURCES="$SOURCES $srcdir/src/stdlib/*.c"
|
slouken@1361
|
172 |
SOURCES="$SOURCES $srcdir/src/thread/*.c"
|
slouken@1361
|
173 |
SOURCES="$SOURCES $srcdir/src/timer/*.c"
|
slouken@1361
|
174 |
SOURCES="$SOURCES $srcdir/src/video/*.c"
|
slouken@1361
|
175 |
|
slouken@1361
|
176 |
# Set up the build libraries needed
|
slouken@1363
|
177 |
BUILD_LIBS="$BASE_LIBS"
|
slouken@1341
|
178 |
|
slouken@1363
|
179 |
# Set up the compiler and linker flags for SDL applications
|
slouken@1363
|
180 |
SDL_CFLAGS="$BASE_CFLAGS"
|
slouken@1363
|
181 |
SDL_LIBS="$BASE_LIBS -lSDL"
|
slouken@0
|
182 |
|
slouken@0
|
183 |
dnl Add the math library for the new gamma correction support
|
slouken@0
|
184 |
case "$target" in
|
slouken@0
|
185 |
*-*-cygwin* | *-*-mingw32*)
|
slouken@0
|
186 |
MATHLIB=""
|
slouken@0
|
187 |
;;
|
slouken@0
|
188 |
*-*-beos*)
|
slouken@0
|
189 |
MATHLIB=""
|
slouken@0
|
190 |
;;
|
slouken@0
|
191 |
*-*-darwin*)
|
slouken@0
|
192 |
MATHLIB=""
|
slouken@0
|
193 |
;;
|
slouken@0
|
194 |
*)
|
slouken@0
|
195 |
MATHLIB="-lm"
|
slouken@0
|
196 |
;;
|
slouken@0
|
197 |
esac
|
slouken@1361
|
198 |
BUILD_LIBS="$BUILD_LIBS $MATHLIB"
|
slouken@0
|
199 |
|
slouken@0
|
200 |
dnl Enable/disable various subsystems of the SDL library
|
slouken@0
|
201 |
|
slouken@0
|
202 |
AC_ARG_ENABLE(audio,
|
slouken@1361
|
203 |
AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [default=yes]]),
|
slouken@0
|
204 |
, enable_audio=yes)
|
slouken@1361
|
205 |
if test x$enable_audio != xyes; then
|
slouken@1361
|
206 |
AC_DEFINE(SDL_AUDIO_DISABLED)
|
slouken@0
|
207 |
fi
|
slouken@0
|
208 |
AC_ARG_ENABLE(video,
|
slouken@1361
|
209 |
AC_HELP_STRING([--enable-video], [Enable the video subsystem [default=yes]]),
|
slouken@0
|
210 |
, enable_video=yes)
|
slouken@1361
|
211 |
if test x$enable_video != xyes; then
|
slouken@1361
|
212 |
AC_DEFINE(SDL_VIDEO_DISABLED)
|
slouken@0
|
213 |
fi
|
slouken@0
|
214 |
AC_ARG_ENABLE(events,
|
slouken@1361
|
215 |
AC_HELP_STRING([--enable-events], [Enable the events subsystem [default=yes]]),
|
slouken@0
|
216 |
, enable_events=yes)
|
slouken@1361
|
217 |
if test x$enable_events != xyes; then
|
slouken@1361
|
218 |
AC_DEFINE(SDL_EVENTS_DISABLED)
|
slouken@0
|
219 |
fi
|
slouken@0
|
220 |
AC_ARG_ENABLE(joystick,
|
slouken@1361
|
221 |
AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [default=yes]]),
|
slouken@0
|
222 |
, enable_joystick=yes)
|
slouken@1361
|
223 |
if test x$enable_joystick != xyes; then
|
slouken@1361
|
224 |
AC_DEFINE(SDL_JOYSTICK_DISABLED)
|
slouken@0
|
225 |
fi
|
slouken@0
|
226 |
AC_ARG_ENABLE(cdrom,
|
slouken@1361
|
227 |
AC_HELP_STRING([--enable-cdrom], [Enable the cdrom subsystem [default=yes]]),
|
slouken@0
|
228 |
, enable_cdrom=yes)
|
slouken@1361
|
229 |
if test x$enable_cdrom != xyes; then
|
slouken@1361
|
230 |
AC_DEFINE(SDL_CDROM_DISABLED)
|
slouken@0
|
231 |
fi
|
slouken@0
|
232 |
AC_ARG_ENABLE(threads,
|
slouken@1361
|
233 |
AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [default=yes]]),
|
slouken@0
|
234 |
, enable_threads=yes)
|
slouken@0
|
235 |
if test x$enable_threads != xyes; then
|
slouken@1361
|
236 |
AC_DEFINE(SDL_THREADS_DISABLED)
|
slouken@0
|
237 |
fi
|
slouken@0
|
238 |
AC_ARG_ENABLE(timers,
|
slouken@1361
|
239 |
AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [default=yes]]),
|
slouken@0
|
240 |
, enable_timers=yes)
|
slouken@1361
|
241 |
if test x$enable_timers != xyes; then
|
slouken@1361
|
242 |
AC_DEFINE(SDL_TIMERS_DISABLED)
|
slouken@0
|
243 |
fi
|
slouken@0
|
244 |
AC_ARG_ENABLE(file,
|
slouken@1361
|
245 |
AC_HELP_STRING([--enable-file], [Enable the file subsystem [default=yes]]),
|
slouken@0
|
246 |
, enable_file=yes)
|
slouken@1361
|
247 |
if test x$enable_file != xyes; then
|
slouken@1361
|
248 |
AC_DEFINE(SDL_FILE_DISABLED)
|
slouken@1361
|
249 |
fi
|
slouken@1361
|
250 |
AC_ARG_ENABLE(loadso,
|
slouken@1361
|
251 |
AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [default=yes]]),
|
slouken@1361
|
252 |
, enable_loadso=yes)
|
slouken@1361
|
253 |
if test x$enable_loadso != xyes; then
|
slouken@1361
|
254 |
AC_DEFINE(SDL_LOADSO_DISABLED)
|
slouken@0
|
255 |
fi
|
slouken@740
|
256 |
AC_ARG_ENABLE(cpuinfo,
|
slouken@1361
|
257 |
AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [default=yes]]),
|
slouken@740
|
258 |
, enable_cpuinfo=yes)
|
slouken@1361
|
259 |
if test x$enable_cpuinfo != xyes; then
|
slouken@1361
|
260 |
AC_DEFINE(SDL_CPUINFO_DISABLED)
|
slouken@1361
|
261 |
fi
|
slouken@1361
|
262 |
AC_ARG_ENABLE(assembly-blit,
|
slouken@1361
|
263 |
AC_HELP_STRING([--enable-asm-blit], [Enable assembly blitters [default=yes]]),
|
slouken@1361
|
264 |
, enable_asm_blit=yes)
|
slouken@1361
|
265 |
if test x$enable_asm_blit = xyes; then
|
slouken@1361
|
266 |
AC_DEFINE(SDL_ASSEMBLY_BLITTERS)
|
slouken@740
|
267 |
fi
|
slouken@0
|
268 |
|
slouken@0
|
269 |
dnl See if the OSS audio interface is supported
|
slouken@0
|
270 |
CheckOSS()
|
slouken@0
|
271 |
{
|
slouken@0
|
272 |
AC_ARG_ENABLE(oss,
|
slouken@1361
|
273 |
AC_HELP_STRING([--enable-oss], [support the OSS audio API [default=yes]]),
|
slouken@0
|
274 |
, enable_oss=yes)
|
slouken@0
|
275 |
if test x$enable_audio = xyes -a x$enable_oss = xyes; then
|
slouken@0
|
276 |
AC_MSG_CHECKING(for OSS audio support)
|
slouken@0
|
277 |
have_oss=no
|
slouken@94
|
278 |
if test x$have_oss != xyes; then
|
slouken@94
|
279 |
AC_TRY_COMPILE([
|
slouken@94
|
280 |
#include <sys/soundcard.h>
|
slouken@94
|
281 |
],[
|
slouken@94
|
282 |
int arg = SNDCTL_DSP_SETFRAGMENT;
|
slouken@94
|
283 |
],[
|
slouken@94
|
284 |
have_oss=yes
|
slouken@94
|
285 |
])
|
slouken@94
|
286 |
fi
|
slouken@94
|
287 |
if test x$have_oss != xyes; then
|
slouken@94
|
288 |
AC_TRY_COMPILE([
|
slouken@94
|
289 |
#include <soundcard.h>
|
slouken@94
|
290 |
],[
|
slouken@94
|
291 |
int arg = SNDCTL_DSP_SETFRAGMENT;
|
slouken@94
|
292 |
],[
|
slouken@94
|
293 |
have_oss=yes
|
slouken@1361
|
294 |
AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H)
|
slouken@94
|
295 |
])
|
slouken@94
|
296 |
fi
|
slouken@0
|
297 |
AC_MSG_RESULT($have_oss)
|
slouken@0
|
298 |
if test x$have_oss = xyes; then
|
slouken@1361
|
299 |
AC_DEFINE(SDL_AUDIO_DRIVER_OSS)
|
slouken@1361
|
300 |
SOURCES="$SOURCES $srcdir/src/audio/dsp/*.c"
|
slouken@1361
|
301 |
SOURCES="$SOURCES $srcdir/src/audio/dma/*.c"
|
slouken@1361
|
302 |
have_audio=yes
|
slouken@1361
|
303 |
|
slouken@1361
|
304 |
# OpenBSD needs linking with ossaudio emulation library
|
slouken@1361
|
305 |
case "$target" in
|
slouken@1361
|
306 |
*-*-openbsd*)
|
slouken@1361
|
307 |
BUILD_LIBS="$BUILD_LIBS -lossaudio";;
|
slouken@1361
|
308 |
esac
|
slouken@0
|
309 |
fi
|
slouken@0
|
310 |
fi
|
slouken@0
|
311 |
}
|
slouken@0
|
312 |
|
slouken@0
|
313 |
dnl See if the ALSA audio interface is supported
|
slouken@0
|
314 |
CheckALSA()
|
slouken@0
|
315 |
{
|
slouken@0
|
316 |
AC_ARG_ENABLE(alsa,
|
slouken@1361
|
317 |
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [default=yes]]),
|
slouken@0
|
318 |
, enable_alsa=yes)
|
slouken@0
|
319 |
if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
|
slouken@948
|
320 |
AM_PATH_ALSA(0.9.0, have_alsa=yes, have_alsa=no)
|
slouken@1009
|
321 |
# Restore all flags from before the ALSA detection runs
|
slouken@1009
|
322 |
CFLAGS="$alsa_save_CFLAGS"
|
slouken@1009
|
323 |
LDFLAGS="$alsa_save_LDFLAGS"
|
slouken@1009
|
324 |
LIBS="$alsa_save_LIBS"
|
slouken@354
|
325 |
if test x$have_alsa = xyes; then
|
slouken@865
|
326 |
AC_ARG_ENABLE(alsa-shared,
|
slouken@1361
|
327 |
AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [default=yes]]),
|
slouken@1361
|
328 |
, enable_alsa_shared=yes)
|
slouken@1361
|
329 |
if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
|
slouken@1361
|
330 |
if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@1361
|
331 |
ALSA_LIBS="-L/lib $ALSA_LIBS"
|
slouken@1361
|
332 |
elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@1361
|
333 |
ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
|
slouken@1361
|
334 |
elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@1361
|
335 |
ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
|
slouken@1361
|
336 |
fi
|
slouken@1361
|
337 |
fi
|
slouken@1361
|
338 |
alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
|
slouken@1361
|
339 |
alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
slouken@1361
|
340 |
echo "-- $alsa_lib_spec -> $alsa_lib"
|
slouken@1361
|
341 |
|
slouken@1361
|
342 |
AC_DEFINE(SDL_AUDIO_DRIVER_ALSA)
|
slouken@1361
|
343 |
SOURCES="$SOURCES $srcdir/src/audio/alsa/*.c"
|
slouken@1361
|
344 |
BUILD_CFLAGS="$BUILD_CFLAGS $ALSA_CFLAGS"
|
slouken@1361
|
345 |
if test x$have_loadso != xyes && \
|
slouken@1361
|
346 |
test x$enable_alsa_shared = xyes; then
|
slouken@1361
|
347 |
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
slouken@1361
|
348 |
fi
|
slouken@1361
|
349 |
if test x$have_loadso = xyes && \
|
slouken@1361
|
350 |
test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
|
slouken@1361
|
351 |
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ALSA_DYNAMIC, "$alsa_lib")
|
slouken@1361
|
352 |
else
|
slouken@1361
|
353 |
BUILD_LIBS="$BUILD_LIBS $ALSA_LIBS"
|
slouken@1361
|
354 |
fi
|
slouken@1361
|
355 |
have_audio=yes
|
slouken@1361
|
356 |
fi
|
slouken@1361
|
357 |
fi
|
slouken@1361
|
358 |
if test x$have_alsa = xyes; then
|
slouken@1361
|
359 |
AC_ARG_ENABLE(alsa-shared,
|
slouken@865
|
360 |
[ --enable-alsa-shared dynamically load ALSA audio support [default=yes]],
|
slouken@865
|
361 |
, enable_alsa_shared=yes)
|
slouken@939
|
362 |
if test "x`echo $ALSA_LIBS | grep -- -L`" = "x"; then
|
slouken@973
|
363 |
if test "x`ls /lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@973
|
364 |
ALSA_LIBS="-L/lib $ALSA_LIBS"
|
slouken@973
|
365 |
elif test "x`ls /usr/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@939
|
366 |
ALSA_LIBS="-L/usr/lib $ALSA_LIBS"
|
slouken@973
|
367 |
elif test "x`ls /usr/local/lib/libasound.so.* 2> /dev/null`" != "x"; then
|
slouken@939
|
368 |
ALSA_LIBS="-L/usr/local/lib $ALSA_LIBS"
|
slouken@973
|
369 |
fi
|
slouken@939
|
370 |
fi
|
slouken@939
|
371 |
alsa_lib_spec=`echo $ALSA_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libasound.so.*/'`
|
slouken@939
|
372 |
alsa_lib=`ls $alsa_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
slouken@939
|
373 |
echo "-- $alsa_lib_spec -> $alsa_lib"
|
slouken@939
|
374 |
|
icculus@1173
|
375 |
if test x$have_loadso != xyes && \
|
slouken@865
|
376 |
test x$enable_alsa_shared = xyes; then
|
icculus@1173
|
377 |
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
slouken@865
|
378 |
fi
|
icculus@1173
|
379 |
if test x$have_loadso = xyes && \
|
slouken@865
|
380 |
test x$enable_alsa_shared = xyes && test x$alsa_lib != x; then
|
slouken@939
|
381 |
CFLAGS="$CFLAGS -DALSA_SUPPORT -DALSA_DYNAMIC=\$(alsa_lib) $ALSA_CFLAGS"
|
slouken@865
|
382 |
AC_SUBST(alsa_lib)
|
slouken@939
|
383 |
|
slouken@939
|
384 |
use_dlvsym=no
|
icculus@1136
|
385 |
AC_CHECK_LIB(dl, dlvsym, [use_dlvsym=yes])
|
slouken@939
|
386 |
if test x$use_dlvsym = xyes; then
|
slouken@939
|
387 |
CFLAGS="$CFLAGS -DUSE_DLVSYM"
|
slouken@939
|
388 |
fi
|
slouken@865
|
389 |
else
|
slouken@939
|
390 |
CFLAGS="$CFLAGS -DALSA_SUPPORT $ALSA_CFLAGS"
|
slouken@939
|
391 |
SYSTEM_LIBS="$SYSTEM_LIBS $ALSA_LIBS"
|
slouken@865
|
392 |
fi
|
slouken@1361
|
393 |
SDL_SRCS="$SDL_SRCS `(cd $srcdir && ls audio/alsa/*.c)`"
|
slouken@0
|
394 |
fi
|
slouken@0
|
395 |
}
|
slouken@0
|
396 |
|
slouken@148
|
397 |
dnl Check whether we want to use IRIX 6.5+ native audio or not
|
slouken@148
|
398 |
CheckDMEDIA()
|
slouken@148
|
399 |
{
|
slouken@148
|
400 |
if test x$enable_audio = xyes; then
|
slouken@148
|
401 |
AC_MSG_CHECKING(for dmedia audio support)
|
slouken@148
|
402 |
have_dmedia=no
|
slouken@148
|
403 |
AC_TRY_COMPILE([
|
slouken@148
|
404 |
#include <dmedia/audio.h>
|
slouken@148
|
405 |
],[
|
slouken@148
|
406 |
ALport audio_port;
|
slouken@148
|
407 |
],[
|
slouken@148
|
408 |
have_dmedia=yes
|
slouken@148
|
409 |
])
|
slouken@935
|
410 |
AC_MSG_RESULT($have_dmedia)
|
slouken@148
|
411 |
# Set up files for the audio library
|
slouken@148
|
412 |
if test x$have_dmedia = xyes; then
|
slouken@1361
|
413 |
AC_DEFINE(SDL_AUDIO_DRIVER_DMEDIA)
|
slouken@1361
|
414 |
SOURCES="$SOURCES $srcdir/src/audio/dmedia/*.c"
|
slouken@1361
|
415 |
BUILD_LIBS="$BUILD_LIBS -laudio"
|
slouken@1361
|
416 |
have_audio=yes
|
slouken@148
|
417 |
fi
|
slouken@148
|
418 |
fi
|
slouken@148
|
419 |
}
|
slouken@148
|
420 |
|
slouken@0
|
421 |
dnl Find the ESD includes and libraries
|
slouken@0
|
422 |
CheckESD()
|
slouken@0
|
423 |
{
|
slouken@0
|
424 |
AC_ARG_ENABLE(esd,
|
slouken@1361
|
425 |
AC_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [default=yes]]),
|
slouken@0
|
426 |
, enable_esd=yes)
|
slouken@0
|
427 |
if test x$enable_audio = xyes -a x$enable_esd = xyes; then
|
slouken@948
|
428 |
AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
|
slouken@948
|
429 |
if test x$have_esd = xyes; then
|
slouken@294
|
430 |
AC_ARG_ENABLE(esd-shared,
|
slouken@1361
|
431 |
AC_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]]),
|
slouken@678
|
432 |
, enable_esd_shared=yes)
|
slouken@294
|
433 |
esd_lib_spec=`echo $ESD_LIBS | sed 's/.*-L\([[^ ]]*\).*/\1\/libesd.so.*/'`
|
slouken@868
|
434 |
esd_lib=`ls $esd_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
slouken@371
|
435 |
echo "-- $esd_lib_spec -> $esd_lib"
|
icculus@1173
|
436 |
if test x$have_loadso != xyes && \
|
slouken@296
|
437 |
test x$enable_esd_shared = xyes; then
|
icculus@1173
|
438 |
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
slouken@296
|
439 |
fi
|
icculus@1173
|
440 |
if test x$have_loadso = xyes && \
|
slouken@294
|
441 |
test x$enable_esd_shared = xyes && test x$esd_lib != x; then
|
slouken@1361
|
442 |
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ESD_DYNAMIC, "$esd_lib")
|
slouken@294
|
443 |
fi
|
slouken@1361
|
444 |
AC_DEFINE(SDL_AUDIO_DRIVER_ESD)
|
slouken@1361
|
445 |
SOURCES="$SOURCES $srcdir/src/audio/esd/*.c"
|
slouken@1361
|
446 |
BUILD_CFLAGS="$BUILD_CFLAGS $ESD_CFLAGS"
|
slouken@1361
|
447 |
BUILD_LIBS="$BUILD_LIBS $ESD_LIBS"
|
slouken@1361
|
448 |
have_audio=yes
|
slouken@294
|
449 |
fi
|
slouken@0
|
450 |
fi
|
slouken@0
|
451 |
}
|
slouken@0
|
452 |
|
slouken@0
|
453 |
CheckARTSC()
|
slouken@0
|
454 |
{
|
slouken@0
|
455 |
AC_ARG_ENABLE(arts,
|
slouken@1361
|
456 |
AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [default=yes]]),
|
slouken@0
|
457 |
, enable_arts=yes)
|
slouken@0
|
458 |
if test x$enable_audio = xyes -a x$enable_arts = xyes; then
|
slouken@1361
|
459 |
AC_PATH_PROG(ARTSCONFIG, artsc-config)
|
slouken@1361
|
460 |
if test x$ARTSCONFIG = x -o x$ARTSCONFIG = x'"$ARTSCONFIG"'; then
|
slouken@0
|
461 |
: # arts isn't installed
|
slouken@0
|
462 |
else
|
slouken@1361
|
463 |
ARTS_CFLAGS=`$ARTSCONFIG --cflags`
|
slouken@1361
|
464 |
ARTS_LIBS=`$ARTSCONFIG --libs`
|
slouken@1361
|
465 |
ARTS_PREFIX=`$ARTSCONFIG --arts-prefix`
|
slouken@0
|
466 |
AC_MSG_CHECKING(for aRts development environment)
|
slouken@0
|
467 |
audio_arts=no
|
slouken@0
|
468 |
save_CFLAGS="$CFLAGS"
|
slouken@1361
|
469 |
CFLAGS="$CFLAGS $ARTS_CFLAGS"
|
slouken@0
|
470 |
AC_TRY_COMPILE([
|
slouken@0
|
471 |
#include <artsc.h>
|
slouken@0
|
472 |
],[
|
slouken@0
|
473 |
arts_stream_t stream;
|
slouken@0
|
474 |
],[
|
slouken@0
|
475 |
audio_arts=yes
|
slouken@0
|
476 |
])
|
slouken@0
|
477 |
CFLAGS="$save_CFLAGS"
|
slouken@0
|
478 |
AC_MSG_RESULT($audio_arts)
|
slouken@0
|
479 |
if test x$audio_arts = xyes; then
|
slouken@294
|
480 |
AC_ARG_ENABLE(arts-shared,
|
slouken@1361
|
481 |
AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [default=yes]]),
|
slouken@678
|
482 |
, enable_arts_shared=yes)
|
slouken@1361
|
483 |
arts_lib_spec="$ARTS_PREFIX/lib/libartsc.so.*"
|
slouken@868
|
484 |
arts_lib=`ls $arts_lib_spec | sed 's/.*\/\(.*\)/\1/; q'`
|
slouken@371
|
485 |
echo "-- $arts_lib_spec -> $arts_lib"
|
icculus@1173
|
486 |
if test x$have_loadso != xyes && \
|
slouken@296
|
487 |
test x$enable_arts_shared = xyes; then
|
icculus@1173
|
488 |
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
slouken@296
|
489 |
fi
|
icculus@1173
|
490 |
if test x$have_loadso = xyes && \
|
slouken@294
|
491 |
test x$enable_arts_shared = xyes && test x$arts_lib != x; then
|
slouken@1361
|
492 |
AC_DEFINE_UNQUOTED(SDL_AUDIO_DRIVER_ARTS_DYNAMIC, "$arts_lib")
|
slouken@294
|
493 |
fi
|
slouken@1361
|
494 |
AC_DEFINE(SDL_AUDIO_DRIVER_ARTS)
|
slouken@1361
|
495 |
SOURCES="$SOURCES $srcdir/src/audio/arts/*.c"
|
slouken@1361
|
496 |
BUILD_CFLAGS="$BUILD_CFLAGS $ARTS_CFLAGS"
|
slouken@1361
|
497 |
BUILD_LIBS="$BUILD_LIBS $ARTS_LIBS"
|
slouken@1361
|
498 |
have_audio=yes
|
slouken@0
|
499 |
fi
|
slouken@0
|
500 |
fi
|
slouken@0
|
501 |
fi
|
slouken@0
|
502 |
}
|
slouken@0
|
503 |
|
slouken@0
|
504 |
dnl See if the NAS audio interface is supported
|
slouken@0
|
505 |
CheckNAS()
|
slouken@0
|
506 |
{
|
slouken@0
|
507 |
AC_ARG_ENABLE(nas,
|
slouken@1361
|
508 |
AC_HELP_STRING([--enable-nas], [support the NAS audio API [default=yes]]),
|
slouken@41
|
509 |
, enable_nas=yes)
|
slouken@0
|
510 |
if test x$enable_audio = xyes -a x$enable_nas = xyes; then
|
slouken@41
|
511 |
AC_MSG_CHECKING(for NAS audio support)
|
slouken@41
|
512 |
have_nas=no
|
slouken@41
|
513 |
if test -r /usr/X11R6/include/audio/audiolib.h; then
|
slouken@41
|
514 |
have_nas=yes
|
slouken@1361
|
515 |
NAS_CFLAGS="-I/usr/X11R6/include/"
|
slouken@1361
|
516 |
NAS_LIBS="-laudio -lXt"
|
slouken@605
|
517 |
|
slouken@605
|
518 |
dnl On IRIX, the NAS includes are in a different directory,
|
slouken@605
|
519 |
dnl and libnas must be explicitly linked in
|
slouken@605
|
520 |
|
slouken@605
|
521 |
elif test -r /usr/freeware/include/nas/audiolib.h; then
|
slouken@605
|
522 |
have_nas=yes
|
slouken@1361
|
523 |
NAS_LIBS="-lnas -lXt"
|
slouken@41
|
524 |
fi
|
slouken@605
|
525 |
AC_MSG_RESULT($have_nas)
|
slouken@1361
|
526 |
if test x$have_nas = xyes; then
|
slouken@1361
|
527 |
AC_DEFINE(SDL_AUDIO_DRIVER_NAS)
|
slouken@1361
|
528 |
SOURCES="$SOURCES $srcdir/src/audio/nas/*.c"
|
slouken@1361
|
529 |
BUILD_CFLAGS="$BUILD_CFLAGS $NAS_CFLAGS"
|
slouken@1361
|
530 |
BUILD_LIBS="$BUILD_LIBS $NAS_LIBS"
|
slouken@1361
|
531 |
have_audio=yes
|
slouken@1361
|
532 |
fi
|
slouken@0
|
533 |
fi
|
slouken@0
|
534 |
}
|
slouken@0
|
535 |
|
slouken@68
|
536 |
dnl rcg07142001 See if the user wants the disk writer audio driver...
|
slouken@68
|
537 |
CheckDiskAudio()
|
slouken@68
|
538 |
{
|
slouken@68
|
539 |
AC_ARG_ENABLE(diskaudio,
|
slouken@1361
|
540 |
AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [default=yes]]),
|
slouken@86
|
541 |
, enable_diskaudio=yes)
|
slouken@68
|
542 |
if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
|
slouken@1361
|
543 |
AC_DEFINE(SDL_AUDIO_DRIVER_DISK)
|
slouken@1361
|
544 |
SOURCES="$SOURCES $srcdir/src/audio/disk/*.c"
|
slouken@68
|
545 |
fi
|
slouken@68
|
546 |
}
|
slouken@68
|
547 |
|
slouken@398
|
548 |
dnl Set up the Atari Audio driver
|
slouken@398
|
549 |
CheckAtariAudio()
|
slouken@398
|
550 |
{
|
slouken@398
|
551 |
AC_ARG_ENABLE(mintaudio,
|
slouken@1361
|
552 |
AC_HELP_STRING([--enable-mintaudio], [support Atari audio driver [default=yes]]),
|
slouken@398
|
553 |
, enable_mintaudio=yes)
|
slouken@398
|
554 |
if test x$enable_audio = xyes -a x$enable_mintaudio = xyes; then
|
slouken@398
|
555 |
mintaudio=no
|
slouken@398
|
556 |
AC_CHECK_HEADER(mint/falcon.h, have_mint_falcon_hdr=yes)
|
slouken@398
|
557 |
if test x$have_mint_falcon_hdr = xyes; then
|
slouken@398
|
558 |
mintaudio=yes
|
slouken@1361
|
559 |
AC_DEFINE(SDL_AUDIO_DRIVER_MINT)
|
patmandin@1364
|
560 |
SOURCES="$SOURCES $srcdir/src/audio/mint/*.c"
|
slouken@1361
|
561 |
have_audio=yes
|
slouken@398
|
562 |
fi
|
slouken@398
|
563 |
fi
|
slouken@398
|
564 |
}
|
slouken@398
|
565 |
|
slouken@0
|
566 |
dnl See if we can use x86 assembly blitters
|
slouken@1361
|
567 |
# NASM is available from: http://nasm.sourceforge.net
|
slouken@0
|
568 |
CheckNASM()
|
slouken@0
|
569 |
{
|
slouken@0
|
570 |
dnl Make sure we are running on an x86 platform
|
slouken@0
|
571 |
case $target in
|
slouken@0
|
572 |
i?86*)
|
slouken@0
|
573 |
;;
|
slouken@0
|
574 |
*)
|
slouken@0
|
575 |
# Nope, bail early.
|
slouken@0
|
576 |
return
|
slouken@0
|
577 |
;;
|
slouken@0
|
578 |
esac
|
slouken@0
|
579 |
dnl Check for NASM (for assembly blit routines)
|
slouken@0
|
580 |
AC_ARG_ENABLE(nasm,
|
slouken@1361
|
581 |
AC_HELP_STRING([--enable-nasm], [use nasm assembly blitters on x86 [default=yes]]),
|
slouken@0
|
582 |
, enable_nasm=yes)
|
slouken@1361
|
583 |
if test x$enable_video = xyes -a x$enable_asm_blit = xyes -a x$enable_nasm = xyes; then
|
slouken@0
|
584 |
AC_PATH_PROG(NASM, nasm)
|
slouken@1361
|
585 |
if test x$NASM != x -a x$NASM != x'"$NASM"'; then
|
slouken@1361
|
586 |
AC_DEFINE(SDL_HERMES_BLITTERS)
|
slouken@1361
|
587 |
SOURCES="$SOURCES $srcdir/src/hermes/*.asm"
|
slouken@0
|
588 |
case $ARCH in
|
slouken@0
|
589 |
win32)
|
slouken@0
|
590 |
NASMFLAGS="-f win32"
|
slouken@0
|
591 |
;;
|
slouken@360
|
592 |
openbsd)
|
slouken@360
|
593 |
NASMFLAGS="-f aoutb"
|
slouken@360
|
594 |
;;
|
slouken@0
|
595 |
*)
|
slouken@754
|
596 |
NASMFLAGS="-f elf"
|
slouken@0
|
597 |
;;
|
slouken@0
|
598 |
esac
|
slouken@1361
|
599 |
AC_SUBST(NASM)
|
slouken@0
|
600 |
AC_SUBST(NASMFLAGS)
|
slouken@1361
|
601 |
|
slouken@886
|
602 |
case "$target" in
|
slouken@886
|
603 |
# this line is needed for QNX, because it's not defined the __ELF__
|
slouken@1361
|
604 |
*-*-qnx*)
|
slouken@1361
|
605 |
BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";;
|
slouken@1361
|
606 |
*-*-solaris*)
|
slouken@1361
|
607 |
BUILD_CFLAGS="$BUILD_CFLAGS -D__ELF__";;
|
slouken@1361
|
608 |
esac
|
slouken@1361
|
609 |
fi
|
slouken@1361
|
610 |
fi
|
slouken@1361
|
611 |
}
|
slouken@1361
|
612 |
|
slouken@1361
|
613 |
dnl Check for altivec instruction support using gas syntax
|
slouken@1361
|
614 |
CheckAltivec()
|
slouken@1361
|
615 |
{
|
slouken@1361
|
616 |
AC_ARG_ENABLE(altivec,
|
slouken@1361
|
617 |
AC_HELP_STRING([--enable-altivec], [use altivec assembly blitters on PPC [default=yes]]),
|
slouken@1361
|
618 |
, enable_altivec=yes)
|
slouken@1361
|
619 |
if test x$enable_video = xyes -a x$enable_asm_blit = xyes -a x$enable_altivec = xyes; then
|
slouken@1361
|
620 |
have_altivec_h_hdr=no
|
slouken@1361
|
621 |
AC_CHECK_HEADER(altivec.h, have_altivec_h_hdr=yes)
|
slouken@1361
|
622 |
|
slouken@1361
|
623 |
save_CFLAGS="$CFLAGS"
|
slouken@1361
|
624 |
have_gcc_altivec=no
|
slouken@1361
|
625 |
AC_MSG_CHECKING(for Altivec with GCC -maltivec option)
|
slouken@1361
|
626 |
altivec_CFLAGS="-maltivec"
|
slouken@1361
|
627 |
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
slouken@886
|
628 |
|
slouken@1361
|
629 |
if test x$have_altivec_h_hdr = xyes; then
|
slouken@1361
|
630 |
AC_TRY_COMPILE([
|
slouken@1361
|
631 |
#include <altivec.h>
|
slouken@1361
|
632 |
vector unsigned int vzero() {
|
slouken@1361
|
633 |
return vec_splat_u32(0);
|
slouken@1361
|
634 |
}
|
slouken@1361
|
635 |
],[
|
slouken@1361
|
636 |
],[
|
slouken@1361
|
637 |
have_gcc_altivec=yes
|
slouken@1361
|
638 |
])
|
slouken@1361
|
639 |
AC_MSG_RESULT($have_gcc_altivec)
|
slouken@1361
|
640 |
else
|
slouken@1361
|
641 |
AC_TRY_COMPILE([
|
slouken@1361
|
642 |
vector unsigned int vzero() {
|
slouken@1361
|
643 |
return vec_splat_u32(0);
|
slouken@1361
|
644 |
}
|
slouken@1361
|
645 |
],[
|
slouken@1361
|
646 |
],[
|
slouken@1361
|
647 |
have_gcc_altivec=yes
|
slouken@1361
|
648 |
])
|
slouken@1361
|
649 |
AC_MSG_RESULT($have_gcc_altivec)
|
slouken@1361
|
650 |
fi
|
slouken@886
|
651 |
|
slouken@1361
|
652 |
if test x$have_gcc_altivec = xno; then
|
slouken@1361
|
653 |
AC_MSG_CHECKING(for Altivec with GCC -faltivec option)
|
slouken@1361
|
654 |
altivec_CFLAGS="-faltivec"
|
slouken@1361
|
655 |
CFLAGS="$save_CFLAGS $altivec_CFLAGS"
|
slouken@1361
|
656 |
if test x$have_altivec_h_hdr = xyes; then
|
slouken@1361
|
657 |
AC_TRY_COMPILE([
|
slouken@1361
|
658 |
#include <altivec.h>
|
slouken@1361
|
659 |
vector unsigned int vzero() {
|
slouken@1361
|
660 |
return vec_splat_u32(0);
|
slouken@1361
|
661 |
}
|
slouken@1361
|
662 |
],[
|
slouken@1361
|
663 |
],[
|
slouken@1361
|
664 |
have_gcc_altivec=yes
|
slouken@1361
|
665 |
])
|
slouken@1361
|
666 |
AC_MSG_RESULT($have_gcc_altivec)
|
slouken@1361
|
667 |
else
|
slouken@1361
|
668 |
AC_TRY_COMPILE([
|
slouken@1361
|
669 |
vector unsigned int vzero() {
|
slouken@1361
|
670 |
return vec_splat_u32(0);
|
slouken@1361
|
671 |
}
|
slouken@1361
|
672 |
],[
|
slouken@1361
|
673 |
],[
|
slouken@1361
|
674 |
have_gcc_altivec=yes
|
slouken@1361
|
675 |
])
|
slouken@1361
|
676 |
AC_MSG_RESULT($have_gcc_altivec)
|
slouken@1361
|
677 |
fi
|
slouken@1361
|
678 |
fi
|
slouken@1361
|
679 |
CFLAGS="$save_CFLAGS"
|
slouken@1361
|
680 |
|
slouken@1361
|
681 |
if test x$have_gcc_altivec = xyes; then
|
slouken@1361
|
682 |
AC_DEFINE(SDL_ALTIVEC_BLITTERS)
|
slouken@1361
|
683 |
if test x$have_altivec_h_hdr = xyes; then
|
slouken@1361
|
684 |
AC_DEFINE(HAVE_ALTIVEC_H)
|
slouken@1361
|
685 |
fi
|
slouken@1361
|
686 |
BUILD_CFLAGS="$BUILD_CFLAGS $altivec_CFLAGS"
|
slouken@0
|
687 |
fi
|
slouken@0
|
688 |
fi
|
slouken@0
|
689 |
}
|
slouken@0
|
690 |
|
icculus@1140
|
691 |
dnl Do the iPod thing
|
icculus@1140
|
692 |
CheckIPod()
|
icculus@1140
|
693 |
{
|
icculus@1140
|
694 |
AC_ARG_ENABLE(ipod,
|
slouken@1361
|
695 |
AC_HELP_STRING([--enable-ipod], [configure SDL to work with iPodLinux [default=yes on arm-elf]]),
|
slouken@1361
|
696 |
, enable_ipod=yes)
|
icculus@1140
|
697 |
|
icculus@1140
|
698 |
if test x$enable_ipod = xyes; then
|
slouken@1361
|
699 |
BUILD_CFLAGS="$BUILD_CFLAGS -DIPOD"
|
slouken@1361
|
700 |
AC_DEFINE(SDL_VIDEO_DRIVER_IPOD)
|
slouken@1361
|
701 |
SOURCES="$SOURCES $srcdir/src/video/ipod/*.c"
|
icculus@1140
|
702 |
fi
|
slouken@1361
|
703 |
}
|
icculus@1140
|
704 |
|
slouken@30
|
705 |
dnl Find the nanox include and library directories
|
slouken@30
|
706 |
CheckNANOX()
|
slouken@30
|
707 |
{
|
slouken@292
|
708 |
AC_ARG_ENABLE(video-nanox,
|
slouken@1361
|
709 |
AC_HELP_STRING([--enable-video-nanox], [use nanox video driver [default=no]]),
|
slouken@292
|
710 |
, enable_video_nanox=no)
|
slouken@30
|
711 |
|
slouken@292
|
712 |
if test x$enable_video = xyes -a x$enable_video_nanox = xyes; then
|
slouken@1361
|
713 |
AC_ARG_ENABLE(nanox-debug,
|
slouken@1361
|
714 |
AC_HELP_STRING([--enable-nanox-debug], [print debug messages [default=no]]),
|
slouken@1361
|
715 |
, enable_nanox_debug=no)
|
slouken@292
|
716 |
if test x$enable_nanox_debug = xyes; then
|
slouken@1361
|
717 |
BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DEBUG"
|
slouken@292
|
718 |
fi
|
slouken@30
|
719 |
|
slouken@1361
|
720 |
AC_ARG_ENABLE(nanox-share-memory,
|
slouken@1361
|
721 |
AC_HELP_STRING([--enable-nanox-share-memory], [use share memory [default=no]]),
|
slouken@1361
|
722 |
, enable_nanox_share_memory=no)
|
slouken@1361
|
723 |
if test x$enable_nanox_share_memory = xyes; then
|
slouken@1361
|
724 |
BUILD_CFLAGS="$BUILD_CFLAGS -DNANOX_SHARE_MEMORY"
|
slouken@471
|
725 |
fi
|
slouken@30
|
726 |
|
slouken@1361
|
727 |
AC_ARG_ENABLE(nanox_direct_fb,
|
slouken@1361
|
728 |
AC_HELP_STRING([--enable-nanox-direct-fb], [use direct framebuffer access [default=no]]),
|
slouken@1361
|
729 |
, enable_nanox_direct_fb=no)
|
slouken@1361
|
730 |
if test x$enable_nanox_direct_fb = xyes; then
|
slouken@1361
|
731 |
BUILD_CFLAGS="$BUILD_CFLAGS -DENABLE_NANOX_DIRECT_FB"
|
slouken@1361
|
732 |
fi
|
slouken@1361
|
733 |
|
slouken@1361
|
734 |
AC_DEFINE(SDL_VIDEO_DRIVER_NANOX)
|
slouken@1361
|
735 |
SOURCES="$SOURCES $srcdir/src/video/nanox/*.c"
|
slouken@1361
|
736 |
BUILD_LIBS="$BUILD_LIBS -lnano-X"
|
slouken@1361
|
737 |
have_video=yes
|
slouken@292
|
738 |
fi
|
slouken@30
|
739 |
}
|
slouken@30
|
740 |
|
slouken@0
|
741 |
dnl Find the X11 include and library directories
|
slouken@0
|
742 |
CheckX11()
|
slouken@0
|
743 |
{
|
slouken@0
|
744 |
AC_ARG_ENABLE(video-x11,
|
slouken@1361
|
745 |
AC_HELP_STRING([--enable-video-x11], [use X11 video driver [default=yes]]),
|
slouken@0
|
746 |
, enable_video_x11=yes)
|
slouken@0
|
747 |
if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
|
slouken@0
|
748 |
AC_PATH_X
|
slouken@0
|
749 |
AC_PATH_XTRA
|
slouken@0
|
750 |
if test x$have_x = xyes; then
|
icculus@1168
|
751 |
AC_ARG_ENABLE(x11-shared,
|
slouken@1361
|
752 |
AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [default=yes]]),
|
icculus@1168
|
753 |
, enable_x11_shared=yes)
|
icculus@1168
|
754 |
|
icculus@1174
|
755 |
case "$target" in
|
icculus@1174
|
756 |
*-*-darwin* )
|
icculus@1174
|
757 |
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
|
icculus@1174
|
758 |
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
|
icculus@1174
|
759 |
;;
|
icculus@1299
|
760 |
*-*-osf* )
|
icculus@1299
|
761 |
x11_lib='libX11.so'
|
icculus@1299
|
762 |
x11ext_lib='libXext.so'
|
icculus@1299
|
763 |
;;
|
icculus@1174
|
764 |
*)
|
icculus@1174
|
765 |
x11_lib='libX11.so.6'
|
icculus@1174
|
766 |
x11ext_lib='libXext.so.6'
|
icculus@1174
|
767 |
;;
|
icculus@1174
|
768 |
esac
|
icculus@1168
|
769 |
|
slouken@1361
|
770 |
X_CFLAGS="$X_CFLAGS -DXTHREADS"
|
slouken@1361
|
771 |
if test x$ac_cv_func_shmat != xyes; then
|
slouken@1361
|
772 |
X_CFLAGS="$X_CFLAGS -DNO_SHARED_MEMORY"
|
slouken@1361
|
773 |
fi
|
icculus@1173
|
774 |
if test x$have_loadso != xyes && \
|
icculus@1168
|
775 |
test x$enable_x11_shared = xyes; then
|
icculus@1173
|
776 |
AC_MSG_ERROR([You must have SDL_LoadObject() support])
|
icculus@1168
|
777 |
fi
|
icculus@1168
|
778 |
|
icculus@1173
|
779 |
if test x$have_loadso = xyes && \
|
icculus@1170
|
780 |
test x$enable_x11_shared = xyes && test x$x11_lib != x && test x$x11ext_lib != x; then
|
icculus@1174
|
781 |
echo "-- dynamic libX11 -> $x11_lib"
|
icculus@1174
|
782 |
echo "-- dynamic libX11ext -> $x11ext_lib"
|
slouken@1361
|
783 |
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC, "$x11_lib")
|
slouken@1361
|
784 |
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT, "$x11ext_lib")
|
icculus@1168
|
785 |
else
|
slouken@1361
|
786 |
X_LIBS="$X_LIBS -lX11 -lXext"
|
slouken@0
|
787 |
fi
|
icculus@1168
|
788 |
|
slouken@1361
|
789 |
|
slouken@1361
|
790 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11)
|
slouken@1361
|
791 |
SOURCES="$SOURCES $srcdir/src/video/x11/*.c"
|
slouken@1361
|
792 |
BUILD_CFLAGS="$BUILD_CFLAGS $X_CFLAGS"
|
slouken@1361
|
793 |
BUILD_LIBS="$BUILD_LIBS $X_LIBS"
|
slouken@1361
|
794 |
have_video=yes
|
slouken@0
|
795 |
|
slouken@1307
|
796 |
AC_ARG_ENABLE(dga,
|
slouken@1361
|
797 |
AC_HELP_STRING([--enable-dga], [allow use of X11 DGA code [default=yes]]),
|
slouken@1307
|
798 |
, enable_dga=yes)
|
slouken@1307
|
799 |
if test x$enable_dga = xyes; then
|
slouken@1361
|
800 |
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86dga/*.c"
|
slouken@1307
|
801 |
fi
|
slouken@1307
|
802 |
AC_ARG_ENABLE(video-dga,
|
slouken@1361
|
803 |
AC_HELP_STRING([--enable-video-dga], [use DGA 2.0 video driver [default=yes]]),
|
slouken@1307
|
804 |
, enable_video_dga=yes)
|
slouken@1307
|
805 |
if test x$enable_dga = xyes -a x$enable_video_dga = xyes; then
|
slouken@1361
|
806 |
AC_DEFINE(SDL_VIDEO_DRIVER_DGA)
|
slouken@1361
|
807 |
SOURCES="$SOURCES $srcdir/src/video/dga/*.c"
|
slouken@1307
|
808 |
fi
|
slouken@1307
|
809 |
AC_ARG_ENABLE(video-x11-dgamouse,
|
slouken@1361
|
810 |
AC_HELP_STRING([--enable-video-x11-dgamouse], [use X11 DGA for mouse events [default=yes]]),
|
slouken@1307
|
811 |
, enable_video_x11_dgamouse=yes)
|
slouken@1307
|
812 |
if test x$enable_dga = xyes -a x$enable_video_x11_dgamouse = xyes; then
|
slouken@1361
|
813 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_DGAMOUSE)
|
slouken@1307
|
814 |
fi
|
slouken@0
|
815 |
AC_ARG_ENABLE(video-x11-vm,
|
slouken@1361
|
816 |
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [default=yes]]),
|
slouken@0
|
817 |
, enable_video_x11_vm=yes)
|
slouken@0
|
818 |
if test x$enable_video_x11_vm = xyes; then
|
slouken@1361
|
819 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
|
slouken@1361
|
820 |
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
|
slouken@0
|
821 |
fi
|
slouken@0
|
822 |
AC_ARG_ENABLE(video-x11-xv,
|
slouken@1361
|
823 |
AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [default=yes]]),
|
slouken@0
|
824 |
, enable_video_x11_xv=yes)
|
slouken@0
|
825 |
if test x$enable_video_x11_xv = xyes; then
|
slouken@1361
|
826 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
|
slouken@1361
|
827 |
SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
|
slouken@0
|
828 |
fi
|
slouken@227
|
829 |
AC_ARG_ENABLE(video-x11-xinerama,
|
slouken@1361
|
830 |
AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [default=yes]]),
|
slouken@227
|
831 |
, enable_video_x11_xinerama=yes)
|
slouken@227
|
832 |
if test x$enable_video_x11_xinerama = xyes; then
|
slouken@1361
|
833 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
|
slouken@1361
|
834 |
SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
|
slouken@227
|
835 |
fi
|
slouken@242
|
836 |
AC_ARG_ENABLE(video-x11-xme,
|
slouken@1361
|
837 |
AC_HELP_STRING([--enable-video-x11-xme], [enable Xi Graphics XME for fullscreen [default=yes]]),
|
slouken@242
|
838 |
, enable_video_x11_xme=yes)
|
slouken@242
|
839 |
if test x$enable_video_x11_xme = xyes; then
|
slouken@1361
|
840 |
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XME)
|
slouken@1361
|
841 |
SOURCES="$SOURCES $srcdir/src/video/Xext/XME/*.c"
|
slouken@242
|
842 |
fi
|
slouken@0
|
843 |
fi
|
slouken@0
|
844 |
fi
|
slouken@0
|
845 |
}
|
slouken@279
|
846 |
|
slouken@1361
|
847 |
dnl Check for QNX photon video driver
|
slouken@0
|
848 |
CheckPHOTON()
|
slouken@0
|
849 |
{
|
slouken@0
|
850 |
AC_ARG_ENABLE(video-photon,
|
slouken@1361
|
851 |
AC_HELP_STRING([--enable-video-photon], [use QNX Photon video driver [default=yes]]),
|
slouken@0
|
852 |
, enable_video_photon=yes)
|
slouken@0
|
853 |
if test x$enable_video = xyes -a x$enable_video_photon = xyes; then
|
slouken@0
|
854 |
AC_MSG_CHECKING(for QNX Photon support)
|
slouken@0
|
855 |
video_photon=no
|
slouken@0
|
856 |
AC_TRY_COMPILE([
|
slouken@0
|
857 |
#include <Ph.h>
|
slouken@0
|
858 |
#include <Pt.h>
|
slouken@0
|
859 |
#include <photon/Pg.h>
|
slouken@0
|
860 |
#include <photon/PdDirect.h>
|
slouken@0
|
861 |
],[
|
slouken@0
|
862 |
PgDisplaySettings_t *visual;
|
slouken@0
|
863 |
],[
|
slouken@0
|
864 |
video_photon=yes
|
slouken@0
|
865 |
])
|
slouken@0
|
866 |
AC_MSG_RESULT($video_photon)
|
slouken@0
|
867 |
if test x$video_photon = xyes; then
|
slouken@1361
|
868 |
AC_DEFINE(SDL_VIDEO_DRIVER_PHOTON)
|
slouken@1361
|
869 |
SOURCES="$SOURCES $srcdir/src/video/photon/*.c"
|
slouken@1361
|
870 |
BUILD_LIBS="$BUILD_LIBS -lph"
|
slouken@1361
|
871 |
have_video=yes
|
slouken@1361
|
872 |
|
slouken@279
|
873 |
CheckOpenGLQNX
|
slouken@0
|
874 |
fi
|
slouken@0
|
875 |
fi
|
slouken@0
|
876 |
}
|
slouken@0
|
877 |
|
slouken@1361
|
878 |
dnl Set up the BWindow video driver if enabled
|
slouken@1361
|
879 |
CheckBWINDOW()
|
slouken@1361
|
880 |
{
|
slouken@1361
|
881 |
if test x$enable_video = xyes; then
|
slouken@1361
|
882 |
AC_DEFINE(SDL_VIDEO_DRIVER_BWINDOW)
|
slouken@1361
|
883 |
SOURCES="$SOURCES $srcdir/src/video/bwindow/*.cc"
|
slouken@1361
|
884 |
have_video=yes
|
slouken@1361
|
885 |
fi
|
slouken@1361
|
886 |
}
|
slouken@1361
|
887 |
|
slouken@1361
|
888 |
dnl Set up the Carbon/QuickDraw video driver for Mac OS X (but not Darwin)
|
slouken@1361
|
889 |
CheckCARBON()
|
slouken@1361
|
890 |
{
|
slouken@1361
|
891 |
AC_ARG_ENABLE(video-carbon,
|
slouken@1361
|
892 |
AC_HELP_STRING([--enable-video-carbon], [use Carbon/QuickDraw video driver [default=no]]),
|
slouken@1361
|
893 |
, enable_video_carbon=no)
|
slouken@1361
|
894 |
if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
|
slouken@1361
|
895 |
AC_MSG_CHECKING(for Carbon framework)
|
slouken@1361
|
896 |
have_carbon=no
|
slouken@1361
|
897 |
AC_TRY_COMPILE([
|
slouken@1361
|
898 |
#include <Carbon/Carbon.h>
|
slouken@1361
|
899 |
],[
|
slouken@1361
|
900 |
],[
|
slouken@1361
|
901 |
have_carbon=yes
|
slouken@1361
|
902 |
])
|
slouken@1361
|
903 |
AC_MSG_RESULT($have_carbon)
|
slouken@1361
|
904 |
if test x$have_carbon = xyes; then
|
slouken@1361
|
905 |
AC_DEFINE(SDL_VIDEO_DRIVER_TOOLBOX)
|
slouken@1361
|
906 |
SOURCES="$SOURCES $srcdir/src/video/maccommon/*.c"
|
slouken@1361
|
907 |
SOURCES="$SOURCES $srcdir/src/video/macrom/*.c"
|
slouken@1361
|
908 |
have_video=yes
|
slouken@1361
|
909 |
fi
|
slouken@1361
|
910 |
fi
|
slouken@1361
|
911 |
}
|
slouken@1361
|
912 |
|
slouken@1361
|
913 |
dnl Set up the Cocoa/Quartz video driver for Mac OS X (but not Darwin)
|
slouken@1361
|
914 |
CheckCOCOA()
|
slouken@1361
|
915 |
{
|
slouken@1361
|
916 |
AC_ARG_ENABLE(video-cocoa,
|
slouken@1361
|
917 |
AC_HELP_STRING([--enable-video-cocoa], [use Cocoa/Quartz video driver [default=yes]]),
|
slouken@1361
|
918 |
, enable_video_cocoa=yes)
|
slouken@1361
|
919 |
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
slouken@1361
|
920 |
save_CFLAGS="$CFLAGS"
|
slouken@1361
|
921 |
dnl work around that we don't have Objective-C support in autoconf
|
slouken@1361
|
922 |
CFLAGS="$CFLAGS -x objective-c"
|
slouken@1361
|
923 |
AC_MSG_CHECKING(for Cocoa framework)
|
slouken@1361
|
924 |
have_cocoa=no
|
slouken@1361
|
925 |
AC_TRY_COMPILE([
|
slouken@1361
|
926 |
#import <Cocoa/Cocoa.h>
|
slouken@1361
|
927 |
],[
|
slouken@1361
|
928 |
],[
|
slouken@1361
|
929 |
have_cocoa=yes
|
slouken@1361
|
930 |
])
|
slouken@1361
|
931 |
AC_MSG_RESULT($have_cocoa)
|
slouken@1361
|
932 |
CFLAGS="$save_CFLAGS"
|
slouken@1361
|
933 |
if test x$have_cocoa = xyes; then
|
slouken@1361
|
934 |
AC_DEFINE(SDL_VIDEO_DRIVER_QUARTZ)
|
slouken@1361
|
935 |
SOURCES="$SOURCES $srcdir/src/video/quartz/*.m"
|
slouken@1361
|
936 |
have_video=yes
|
slouken@1361
|
937 |
fi
|
slouken@1361
|
938 |
fi
|
slouken@1361
|
939 |
}
|
slouken@1361
|
940 |
|
slouken@0
|
941 |
dnl Find the framebuffer console includes
|
slouken@0
|
942 |
CheckFBCON()
|
slouken@0
|
943 |
{
|
slouken@0
|
944 |
AC_ARG_ENABLE(video-fbcon,
|
slouken@1361
|
945 |
AC_HELP_STRING([--enable-video-fbcon], [use framebuffer console video driver [default=yes]]),
|
slouken@0
|
946 |
, enable_video_fbcon=yes)
|
slouken@0
|
947 |
if test x$enable_video = xyes -a x$enable_video_fbcon = xyes; then
|
slouken@0
|
948 |
AC_MSG_CHECKING(for framebuffer console support)
|
slouken@0
|
949 |
video_fbcon=no
|
slouken@0
|
950 |
AC_TRY_COMPILE([
|
slouken@0
|
951 |
#include <linux/fb.h>
|
slouken@0
|
952 |
#include <linux/kd.h>
|
slouken@0
|
953 |
#include <linux/keyboard.h>
|
slouken@0
|
954 |
],[
|
slouken@0
|
955 |
],[
|
slouken@0
|
956 |
video_fbcon=yes
|
slouken@0
|
957 |
])
|
slouken@0
|
958 |
AC_MSG_RESULT($video_fbcon)
|
slouken@0
|
959 |
if test x$video_fbcon = xyes; then
|
slouken@1361
|
960 |
AC_DEFINE(SDL_VIDEO_DRIVER_FBCON)
|
slouken@1361
|
961 |
SOURCES="$SOURCES $srcdir/src/video/fbcon/*.c"
|
slouken@1361
|
962 |
have_video=yes
|
slouken@0
|
963 |
fi
|
slouken@0
|
964 |
fi
|
slouken@0
|
965 |
}
|
slouken@0
|
966 |
|
slouken@167
|
967 |
dnl Find DirectFB
|
slouken@167
|
968 |
CheckDirectFB()
|
slouken@167
|
969 |
{
|
slouken@167
|
970 |
AC_ARG_ENABLE(video-directfb,
|
slouken@1361
|
971 |
AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [default=no]]),
|
slouken@678
|
972 |
, enable_video_directfb=no)
|
slouken@167
|
973 |
if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
|
slouken@167
|
974 |
video_directfb=no
|
slouken@167
|
975 |
|
slouken@167
|
976 |
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
|
slouken@167
|
977 |
if test x$PKG_CONFIG = xno ; then
|
slouken@167
|
978 |
AC_MSG_WARN([*** pkg-config is required to build the DirectFB video driver.])
|
slouken@167
|
979 |
else
|
slouken@167
|
980 |
AC_MSG_CHECKING(for DirectFB support)
|
slouken@167
|
981 |
|
slouken@477
|
982 |
if ! $PKG_CONFIG --atleast-pkgconfig-version 0.7 ; then
|
slouken@477
|
983 |
AC_MSG_ERROR([*** pkg-config too old; version 0.7 or better required.])
|
slouken@167
|
984 |
fi
|
slouken@167
|
985 |
|
slouken@546
|
986 |
DIRECTFB_REQUIRED_VERSION=0.9.15
|
slouken@167
|
987 |
|
slouken@167
|
988 |
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb ; then
|
slouken@167
|
989 |
DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
|
slouken@167
|
990 |
DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
|
slouken@167
|
991 |
video_directfb=yes
|
slouken@167
|
992 |
fi
|
slouken@167
|
993 |
fi
|
slouken@167
|
994 |
|
slouken@167
|
995 |
AC_MSG_RESULT($video_directfb)
|
slouken@167
|
996 |
if test x$video_directfb = xyes; then
|
slouken@1361
|
997 |
AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB)
|
slouken@1361
|
998 |
SOURCES="$SOURCES $srcdir/src/video/directfb/*.c"
|
slouken@1361
|
999 |
BUILD_CFLAGS="$BUILD_CFLAGS $DIRECTFB_CFLAGS"
|
slouken@1361
|
1000 |
BUILD_LIBS="$BUILD_LIBS $DIRECTFB_LIBS"
|
slouken@1361
|
1001 |
have_video=yes
|
slouken@167
|
1002 |
fi
|
slouken@167
|
1003 |
fi
|
slouken@167
|
1004 |
}
|
slouken@167
|
1005 |
|
slouken@70
|
1006 |
dnl See if we're running on PlayStation 2 hardware
|
slouken@70
|
1007 |
CheckPS2GS()
|
slouken@70
|
1008 |
{
|
slouken@72
|
1009 |
AC_ARG_ENABLE(video-ps2gs,
|
slouken@1361
|
1010 |
AC_HELP_STRING([--enable-video-ps2gs], [use PlayStation 2 GS video driver [default=yes]]),
|
slouken@72
|
1011 |
, enable_video_ps2gs=yes)
|
slouken@70
|
1012 |
if test x$enable_video = xyes -a x$enable_video_ps2gs = xyes; then
|
slouken@72
|
1013 |
AC_MSG_CHECKING(for PlayStation 2 GS support)
|
slouken@70
|
1014 |
video_ps2gs=no
|
slouken@70
|
1015 |
AC_TRY_COMPILE([
|
slouken@70
|
1016 |
#include <linux/ps2/dev.h>
|
slouken@70
|
1017 |
#include <linux/ps2/gs.h>
|
slouken@70
|
1018 |
],[
|
slouken@70
|
1019 |
],[
|
slouken@70
|
1020 |
video_ps2gs=yes
|
slouken@70
|
1021 |
])
|
slouken@72
|
1022 |
AC_MSG_RESULT($video_ps2gs)
|
slouken@70
|
1023 |
if test x$video_ps2gs = xyes; then
|
slouken@1361
|
1024 |
AC_DEFINE(SDL_VIDEO_DRIVER_PS2GS)
|
slouken@1361
|
1025 |
SOURCES="$SOURCES $srcdir/src/video/ps2gs/*.c"
|
slouken@1361
|
1026 |
have_video=yes
|
slouken@70
|
1027 |
fi
|
slouken@70
|
1028 |
fi
|
slouken@70
|
1029 |
}
|
slouken@70
|
1030 |
|
slouken@0
|
1031 |
dnl Find the GGI includes
|
slouken@0
|
1032 |
CheckGGI()
|
slouken@0
|
1033 |
{
|
slouken@0
|
1034 |
AC_ARG_ENABLE(video-ggi,
|
slouken@1361
|
1035 |
AC_HELP_STRING([--enable-video-ggi], [use GGI video driver [default=no]]),
|
slouken@0
|
1036 |
, enable_video_ggi=no)
|
slouken@0
|
1037 |
if test x$enable_video = xyes -a x$enable_video_ggi = xyes; then
|
slouken@0
|
1038 |
AC_MSG_CHECKING(for GGI support)
|
slouken@0
|
1039 |
video_ggi=no
|
slouken@0
|
1040 |
AC_TRY_COMPILE([
|
slouken@0
|
1041 |
#include <ggi/ggi.h>
|
slouken@0
|
1042 |
#include <ggi/gii.h>
|
slouken@0
|
1043 |
],[
|
slouken@0
|
1044 |
],[
|
slouken@0
|
1045 |
video_ggi=yes
|
slouken@0
|
1046 |
])
|
slouken@0
|
1047 |
AC_MSG_RESULT($video_ggi)
|
slouken@0
|
1048 |
if test x$video_ggi = xyes; then
|
slouken@1361
|
1049 |
AC_DEFINE(SDL_VIDEO_DRIVER_GGI)
|
slouken@1361
|
1050 |
SOURCES="$SOURCES $srcdir/src/video/ggi/*.c"
|
slouken@1361
|
1051 |
BUILD_LIBS="$BUILD_LIBS -lggi -lgii -lgg"
|
slouken@1361
|
1052 |
have_video=yes
|
slouken@0
|
1053 |
fi
|
slouken@0
|
1054 |
fi
|
slouken@0
|
1055 |
}
|
slouken@0
|
1056 |
|
slouken@0
|
1057 |
dnl Find the SVGAlib includes and libraries
|
slouken@0
|
1058 |
CheckSVGA()
|
slouken@0
|
1059 |
{
|
slouken@0
|
1060 |
AC_ARG_ENABLE(video-svga,
|
slouken@1361
|
1061 |
AC_HELP_STRING([--enable-video-svga], [use SVGAlib video driver [default=no]]),
|
slouken@0
|
1062 |
, enable_video_svga=no)
|
slouken@0
|
1063 |
if test x$enable_video = xyes -a x$enable_video_svga = xyes; then
|
slouken@0
|
1064 |
AC_MSG_CHECKING(for SVGAlib (1.4.0+) support)
|
slouken@0
|
1065 |
video_svga=no
|
slouken@0
|
1066 |
AC_TRY_COMPILE([
|
slouken@0
|
1067 |
#include <vga.h>
|
slouken@0
|
1068 |
#include <vgamouse.h>
|
slouken@0
|
1069 |
#include <vgakeyboard.h>
|
slouken@0
|
1070 |
],[
|
slouken@0
|
1071 |
if ( SCANCODE_RIGHTWIN && SCANCODE_LEFTWIN ) {
|
slouken@0
|
1072 |
exit(0);
|
slouken@0
|
1073 |
}
|
slouken@0
|
1074 |
],[
|
slouken@0
|
1075 |
video_svga=yes
|
slouken@0
|
1076 |
])
|
slouken@0
|
1077 |
AC_MSG_RESULT($video_svga)
|
slouken@0
|
1078 |
if test x$video_svga = xyes; then
|
slouken@1361
|
1079 |
AC_DEFINE(SDL_VIDEO_DRIVER_SVGALIB)
|
slouken@1361
|
1080 |
SOURCES="$SOURCES $srcdir/src/video/svga/*.c"
|
slouken@1361
|
1081 |
BUILD_LIBS="$BUILD_LIBS -lvga"
|
slouken@1361
|
1082 |
have_video=yes
|
slouken@0
|
1083 |
fi
|
slouken@0
|
1084 |
fi
|
slouken@0
|
1085 |
}
|
slouken@0
|
1086 |
|
slouken@75
|
1087 |
dnl Find the VGL includes and libraries
|
slouken@75
|
1088 |
CheckVGL()
|
slouken@75
|
1089 |
{
|
slouken@75
|
1090 |
AC_ARG_ENABLE(video-vgl,
|
slouken@1361
|
1091 |
AC_HELP_STRING([--enable-video-vgl], [use VGL video driver [default=no]]),
|
slouken@75
|
1092 |
, enable_video_vgl=no)
|
slouken@75
|
1093 |
if test x$enable_video = xyes -a x$enable_video_vgl = xyes; then
|
slouken@75
|
1094 |
AC_MSG_CHECKING(for libVGL support)
|
slouken@75
|
1095 |
video_vgl=no
|
slouken@75
|
1096 |
AC_TRY_COMPILE([
|
slouken@75
|
1097 |
#include <sys/fbio.h>
|
slouken@75
|
1098 |
#include <sys/consio.h>
|
slouken@75
|
1099 |
#include <sys/kbio.h>
|
slouken@75
|
1100 |
#include <vgl.h>
|
slouken@75
|
1101 |
],[
|
slouken@75
|
1102 |
VGLBitmap bitmap;
|
slouken@144
|
1103 |
exit(bitmap.Bitmap);
|
slouken@75
|
1104 |
],[
|
slouken@75
|
1105 |
video_vgl=yes
|
slouken@75
|
1106 |
])
|
slouken@75
|
1107 |
AC_MSG_RESULT($video_vgl)
|
slouken@75
|
1108 |
if test x$video_vgl = xyes; then
|
slouken@1361
|
1109 |
AC_DEFINE(SDL_VIDEO_DRIVER_VGL)
|
slouken@1361
|
1110 |
SOURCES="$SOURCES $srcdir/src/video/vgl/*.c"
|
slouken@1361
|
1111 |
BUILD_LIBS="$BUILD_LIBS -lvgl"
|
slouken@1361
|
1112 |
have_video=yes
|
slouken@75
|
1113 |
fi
|
slouken@75
|
1114 |
fi
|
slouken@75
|
1115 |
}
|
slouken@75
|
1116 |
|
slouken@1361
|
1117 |
dnl Set up the wscons video driver if enabled
|
slouken@1361
|
1118 |
CheckWscons()
|
slouken@1361
|
1119 |
{
|
slouken@1361
|
1120 |
AC_ARG_ENABLE(video-wscons,
|
slouken@1361
|
1121 |
AC_HELP_STRING([--enable-video-wscons], [use wscons video driver [default=yes]]),
|
slouken@1361
|
1122 |
, enable_video_wscons=yes)
|
slouken@1361
|
1123 |
if test x$enable_video = xyes -a x$enable_video_wscons = xyes; then
|
slouken@1361
|
1124 |
AC_MSG_CHECKING(for wscons support)
|
slouken@1361
|
1125 |
video_wscons=no
|
slouken@1361
|
1126 |
AC_TRY_COMPILE([
|
slouken@1361
|
1127 |
#include <sys/time.h>
|
slouken@1361
|
1128 |
#include <dev/wscons/wsconsio.h>
|
slouken@1361
|
1129 |
],[
|
slouken@1361
|
1130 |
],[
|
slouken@1361
|
1131 |
video_wscons=yes
|
slouken@1361
|
1132 |
])
|
slouken@1361
|
1133 |
AC_MSG_RESULT($video_wscons)
|
slouken@1361
|
1134 |
if test x$video_wscons = xyes; then
|
slouken@1361
|
1135 |
AC_DEFINE(SDL_VIDEO_DRIVER_WSCONS)
|
slouken@1361
|
1136 |
SOURCES="$SOURCES $srcdir/src/video/wscons/*.c"
|
slouken@1361
|
1137 |
have_video=yes
|
slouken@1361
|
1138 |
fi
|
slouken@1361
|
1139 |
fi
|
slouken@1361
|
1140 |
}
|
slouken@1361
|
1141 |
|
slouken@1361
|
1142 |
|
slouken@0
|
1143 |
dnl Find the AAlib includes
|
slouken@0
|
1144 |
CheckAAlib()
|
slouken@0
|
1145 |
{
|
slouken@0
|
1146 |
AC_ARG_ENABLE(video-aalib,
|
slouken@1361
|
1147 |
AC_HELP_STRING([--enable-video-aalib], [use AAlib video driver [default=no]]),
|
slouken@0
|
1148 |
, enable_video_aalib=no)
|
slouken@0
|
1149 |
if test x$enable_video = xyes -a x$enable_video_aalib = xyes; then
|
slouken@0
|
1150 |
AC_MSG_CHECKING(for AAlib support)
|
slouken@0
|
1151 |
video_aalib=no
|
slouken@0
|
1152 |
AC_TRY_COMPILE([
|
slouken@0
|
1153 |
#include <aalib.h>
|
slouken@0
|
1154 |
],[
|
slouken@0
|
1155 |
],[
|
slouken@0
|
1156 |
video_aalib=yes
|
slouken@0
|
1157 |
])
|
slouken@0
|
1158 |
AC_MSG_RESULT($video_aalib)
|
slouken@0
|
1159 |
if test x$video_aalib = xyes; then
|
slouken@1361
|
1160 |
AC_DEFINE(SDL_VIDEO_DRIVER_AALIB)
|
slouken@1361
|
1161 |
SOURCES="$SOURCES $srcdir/src/video/aalib/*.c"
|
slouken@1361
|
1162 |
BUILD_LIBS="$BUILD_LIBS -laa"
|
slouken@1361
|
1163 |
have_video=yes
|
slouken@0
|
1164 |
fi
|
slouken@0
|
1165 |
fi
|
slouken@0
|
1166 |
}
|
slouken@0
|
1167 |
|
slouken@1361
|
1168 |
dnl Set up the QTopia video driver if enabled
|
slouken@1361
|
1169 |
CheckQtopia()
|
slouken@1361
|
1170 |
{
|
slouken@1361
|
1171 |
AC_ARG_ENABLE(video-qtopia,
|
slouken@1361
|
1172 |
AC_HELP_STRING([--enable-video-qtopia], [use Qtopia video driver [default=no]]),
|
slouken@1361
|
1173 |
, enable_video_qtopia=no)
|
slouken@1361
|
1174 |
if test x$enable_video = xyes -a x$enable_video_qtopia = xyes; then
|
slouken@1361
|
1175 |
AC_MSG_CHECKING(for Qtopia support)
|
slouken@1361
|
1176 |
video_qtopia=no
|
slouken@1361
|
1177 |
QTOPIA_FLAGS="-DQT_QWS_EBX -DQT_QWS_CUSTOM -DQWS -I${QPEDIR}/include -I${QTDIR}/include/ -DNO_DEBUG -fno-rtti -fno-exceptions"
|
slouken@1361
|
1178 |
AC_LANG_CPLUSPLUS
|
slouken@1361
|
1179 |
OLD_CXX="$CXXFLAGS"
|
slouken@1361
|
1180 |
CXXFLAGS="$QTOPIA_FLAGS"
|
slouken@1361
|
1181 |
AC_TRY_COMPILE([
|
slouken@1361
|
1182 |
#include <qpe/qpeapplication.h>
|
slouken@1361
|
1183 |
],[
|
slouken@1361
|
1184 |
],[
|
slouken@1361
|
1185 |
video_qtopia=yes
|
slouken@1361
|
1186 |
])
|
slouken@1361
|
1187 |
CXXFLAGS="$OLD_CXX"
|
slouken@1361
|
1188 |
AC_MSG_RESULT($video_qtopia)
|
slouken@1361
|
1189 |
if test x$video_qtopia = xyes; then
|
slouken@1361
|
1190 |
AC_DEFINE(SDL_VIDEO_DRIVER_QTOPIA)
|
slouken@1361
|
1191 |
SOURCES="$SOURCES $srcdir/src/video/qtopia/*.cc"
|
slouken@1361
|
1192 |
BUILD_CFLAGS="$BUILD_CFLAGS $QTOPIA_FLAGS"
|
slouken@1361
|
1193 |
SDL_CFLAGS="$SDL_CFLAGS -DQWS -Dmain=SDL_main"
|
slouken@1361
|
1194 |
SDL_LIBS="-lSDLmain $SDL_LIBS -L${QPEDIR}/lib -L${QTDIR}/lib/ -lqpe -lqte"
|
slouken@1361
|
1195 |
have_video=yes
|
slouken@1361
|
1196 |
fi
|
slouken@1361
|
1197 |
AC_LANG_C
|
slouken@1361
|
1198 |
fi
|
slouken@1361
|
1199 |
}
|
slouken@1361
|
1200 |
|
slouken@1361
|
1201 |
dnl Set up the PicoGUI video driver if enabled
|
slouken@1361
|
1202 |
CheckPicoGUI()
|
slouken@1361
|
1203 |
{
|
slouken@1361
|
1204 |
AC_ARG_ENABLE(video-picogui,
|
slouken@1361
|
1205 |
AC_HELP_STRING([--enable-video-picogui], [use PicoGUI video driver [default=no]]),
|
slouken@1361
|
1206 |
, enable_video_picogui=no)
|
slouken@1361
|
1207 |
if test x$enable_video = xyes -a x$enable_video_picogui = xyes; then
|
slouken@1361
|
1208 |
AC_MSG_CHECKING(for PicoGUI support)
|
slouken@1361
|
1209 |
video_picogui=no
|
slouken@1361
|
1210 |
AC_TRY_COMPILE([
|
slouken@1361
|
1211 |
#include <picogui.h>
|
slouken@1361
|
1212 |
],[
|
slouken@1361
|
1213 |
],[
|
slouken@1361
|
1214 |
video_picogui=yes
|
slouken@1361
|
1215 |
])
|
slouken@1361
|
1216 |
AC_MSG_RESULT($video_picogui)
|
slouken@1361
|
1217 |
if test x$video_picogui = xyes; then
|
slouken@1361
|
1218 |
AC_DEFINE(SDL_VIDEO_DRIVER_PICOGUI)
|
slouken@1361
|
1219 |
SOURCES="$SOURCES $srcdir/src/video/picogui/*.c"
|
slouken@1361
|
1220 |
SDL_LIBS="$SDL_LIBS -lpgui"
|
slouken@1361
|
1221 |
have_video=yes
|
slouken@1361
|
1222 |
fi
|
slouken@1361
|
1223 |
fi
|
slouken@1361
|
1224 |
}
|
slouken@1361
|
1225 |
|
slouken@1361
|
1226 |
dnl Set up the Atari Bios keyboard driver
|
slouken@1361
|
1227 |
CheckAtariBiosEvent()
|
slouken@1361
|
1228 |
{
|
slouken@1361
|
1229 |
SOURCES="$SOURCES $srcdir/src/video/ataricommon/*.c"
|
slouken@1361
|
1230 |
}
|
slouken@1361
|
1231 |
|
slouken@281
|
1232 |
dnl Set up the Atari Xbios driver
|
slouken@281
|
1233 |
CheckAtariXbiosVideo()
|
slouken@281
|
1234 |
{
|
slouken@281
|
1235 |
AC_ARG_ENABLE(xbios,
|
slouken@1361
|
1236 |
AC_HELP_STRING([--enable-video-xbios], [use Atari Xbios video driver [default=yes]]),
|
slouken@281
|
1237 |
, enable_video_xbios=yes)
|
slouken@281
|
1238 |
video_xbios=no
|
slouken@281
|
1239 |
if test x$enable_video = xyes -a x$enable_video_xbios = xyes; then
|
slouken@281
|
1240 |
video_xbios=yes
|
slouken@1361
|
1241 |
AC_DEFINE(SDL_VIDEO_DRIVER_XBIOS)
|
slouken@1361
|
1242 |
SOURCES="$SOURCES $srcdir/src/video/xbios/*.c"
|
slouken@1361
|
1243 |
have_video=yes
|
slouken@281
|
1244 |
fi
|
slouken@281
|
1245 |
}
|
slouken@281
|
1246 |
|
slouken@281
|
1247 |
dnl Set up the Atari Gem driver
|
slouken@281
|
1248 |
CheckAtariGemVideo()
|
slouken@281
|
1249 |
{
|
slouken@281
|
1250 |
AC_ARG_ENABLE(gem,
|
slouken@1361
|
1251 |
AC_HELP_STRING([--enable-video-gem], [use Atari Gem video driver [default=yes]]),
|
slouken@281
|
1252 |
, enable_video_gem=yes)
|
slouken@281
|
1253 |
if test x$enable_video = xyes -a x$enable_video_gem = xyes; then
|
slouken@281
|
1254 |
video_gem=no
|
slouken@281
|
1255 |
AC_CHECK_HEADER(gem.h, have_gem_hdr=yes)
|
slouken@281
|
1256 |
AC_CHECK_LIB(gem, appl_init, have_gem_lib=yes)
|
slouken@281
|
1257 |
if test x$have_gem_hdr = xyes -a x$have_gem_lib = xyes; then
|
slouken@1361
|
1258 |
AC_DEFINE(SDL_VIDEO_DRIVER_GEM)
|
slouken@1361
|
1259 |
SOURCES="$SOURCES $srcdir/src/video/gem/*.c"
|
slouken@1361
|
1260 |
BUILD_LIBS="$BUILD_LIBS -lgem"
|
slouken@1361
|
1261 |
have_video=yes
|
slouken@281
|
1262 |
fi
|
slouken@281
|
1263 |
fi
|
slouken@281
|
1264 |
}
|
slouken@281
|
1265 |
|
slouken@1
|
1266 |
dnl rcg04172001 Set up the Null video driver.
|
slouken@1
|
1267 |
CheckDummyVideo()
|
slouken@1
|
1268 |
{
|
slouken@1
|
1269 |
AC_ARG_ENABLE(video-dummy,
|
slouken@1361
|
1270 |
AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [default=yes]]),
|
slouken@86
|
1271 |
, enable_video_dummy=yes)
|
slouken@1
|
1272 |
if test x$enable_video_dummy = xyes; then
|
slouken@1361
|
1273 |
AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY)
|
slouken@1361
|
1274 |
SOURCES="$SOURCES $srcdir/src/video/dummy/*.c"
|
slouken@1361
|
1275 |
have_video=yes
|
slouken@1
|
1276 |
fi
|
slouken@1
|
1277 |
}
|
slouken@1
|
1278 |
|
slouken@0
|
1279 |
dnl Check to see if OpenGL support is desired
|
slouken@0
|
1280 |
AC_ARG_ENABLE(video-opengl,
|
slouken@1361
|
1281 |
AC_HELP_STRING([--enable-video-opengl], [include OpenGL context creation [default=yes]]),
|
slouken@0
|
1282 |
, enable_video_opengl=yes)
|
slouken@0
|
1283 |
|
slouken@0
|
1284 |
dnl Find OpenGL
|
icculus@1191
|
1285 |
CheckOpenGLX11()
|
slouken@0
|
1286 |
{
|
slouken@0
|
1287 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@0
|
1288 |
AC_MSG_CHECKING(for OpenGL (GLX) support)
|
slouken@0
|
1289 |
video_opengl=no
|
slouken@0
|
1290 |
AC_TRY_COMPILE([
|
slouken@0
|
1291 |
#include <GL/gl.h>
|
slouken@0
|
1292 |
#include <GL/glx.h>
|
slouken@0
|
1293 |
],[
|
slouken@0
|
1294 |
],[
|
slouken@0
|
1295 |
video_opengl=yes
|
slouken@0
|
1296 |
])
|
slouken@0
|
1297 |
AC_MSG_RESULT($video_opengl)
|
slouken@0
|
1298 |
if test x$video_opengl = xyes; then
|
slouken@1361
|
1299 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@1361
|
1300 |
AC_DEFINE(SDL_VIDEO_OPENGL_GLX)
|
slouken@0
|
1301 |
fi
|
slouken@0
|
1302 |
fi
|
slouken@0
|
1303 |
}
|
slouken@0
|
1304 |
|
slouken@279
|
1305 |
dnl Find QNX RtP OpenGL
|
slouken@279
|
1306 |
CheckOpenGLQNX()
|
slouken@279
|
1307 |
{
|
slouken@279
|
1308 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@279
|
1309 |
AC_MSG_CHECKING(for OpenGL (Photon) support)
|
slouken@279
|
1310 |
video_opengl=no
|
slouken@279
|
1311 |
AC_TRY_COMPILE([
|
slouken@279
|
1312 |
#include <GL/gl.h>
|
slouken@279
|
1313 |
],[
|
slouken@279
|
1314 |
],[
|
slouken@279
|
1315 |
video_opengl=yes
|
slouken@279
|
1316 |
])
|
slouken@279
|
1317 |
AC_MSG_RESULT($video_opengl)
|
slouken@279
|
1318 |
if test x$video_opengl = xyes; then
|
slouken@1361
|
1319 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@1361
|
1320 |
BUILD_LIBS="$BUILD_LIBS -lGL"
|
slouken@279
|
1321 |
fi
|
slouken@279
|
1322 |
fi
|
slouken@279
|
1323 |
}
|
slouken@279
|
1324 |
|
slouken@1361
|
1325 |
dnl Check for Win32 OpenGL
|
slouken@1361
|
1326 |
CheckWIN32GL()
|
slouken@1361
|
1327 |
{
|
slouken@1361
|
1328 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@1361
|
1329 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@1361
|
1330 |
AC_DEFINE(SDL_VIDEO_OPENGL_WGL)
|
slouken@1361
|
1331 |
fi
|
slouken@1361
|
1332 |
}
|
slouken@1361
|
1333 |
|
slouken@0
|
1334 |
dnl Check for BeOS OpenGL
|
slouken@0
|
1335 |
CheckBeGL()
|
slouken@0
|
1336 |
{
|
slouken@0
|
1337 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@1361
|
1338 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@1361
|
1339 |
BUILD_LIBS="$BUILD_LIBS -lGL"
|
slouken@0
|
1340 |
fi
|
slouken@0
|
1341 |
}
|
slouken@0
|
1342 |
|
slouken@0
|
1343 |
dnl Check for MacOS OpenGL
|
slouken@0
|
1344 |
CheckMacGL()
|
slouken@0
|
1345 |
{
|
slouken@0
|
1346 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@1361
|
1347 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@0
|
1348 |
case "$target" in
|
slouken@0
|
1349 |
*-*-darwin*)
|
slouken@1361
|
1350 |
BUILD_LIBS="$BUILD_LIBS -framework OpenGL"
|
icculus@1133
|
1351 |
# The following is probably not available in Darwin:
|
slouken@1361
|
1352 |
BUILD_LIBS="$BUILD_LIBS -framework AGL"
|
slouken@0
|
1353 |
esac
|
slouken@0
|
1354 |
fi
|
slouken@0
|
1355 |
}
|
slouken@0
|
1356 |
|
patmandin@978
|
1357 |
dnl Check for Mesa offscreen rendering
|
patmandin@989
|
1358 |
CheckAtariOSMesa()
|
patmandin@978
|
1359 |
{
|
patmandin@989
|
1360 |
if test "x$enable_video" = "xyes" -a "x$enable_video_opengl" = "xyes"; then
|
patmandin@991
|
1361 |
AC_CHECK_HEADER(GL/osmesa.h, have_osmesa_hdr=yes)
|
patmandin@991
|
1362 |
AC_CHECK_LIB(OSMesa, OSMesaCreateContext, have_osmesa_lib=yes, have_osmesa_lib=no, -lm)
|
patmandin@991
|
1363 |
|
patmandin@991
|
1364 |
# Static linking to -lOSMesa
|
patmandin@989
|
1365 |
AC_PATH_PROG(OSMESA_CONFIG, osmesa-config, no)
|
patmandin@989
|
1366 |
if test "x$OSMESA_CONFIG" = "xno" -o "x$enable_atari_ldg" = "xno"; then
|
patmandin@991
|
1367 |
# -lOSMesa is really the static library
|
patmandin@989
|
1368 |
if test "x$have_osmesa_hdr" = "xyes" -a "x$have_osmesa_lib" = "xyes"; then
|
slouken@1361
|
1369 |
OSMESA_LIBS="-lOSMesa"
|
patmandin@989
|
1370 |
fi
|
patmandin@989
|
1371 |
else
|
patmandin@991
|
1372 |
# -lOSMesa is a loader for OSMesa.ldg
|
patmandin@989
|
1373 |
OSMESA_CFLAGS=`$OSMESA_CONFIG --cflags`
|
patmandin@989
|
1374 |
OSMESA_LIBS=`$OSMESA_CONFIG --libs`
|
patmandin@978
|
1375 |
fi
|
slouken@1361
|
1376 |
AC_DEFINE(SDL_VIDEO_OPENGL)
|
slouken@1361
|
1377 |
AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA)
|
slouken@1361
|
1378 |
BUILD_CFLAGS="$BUILD_CFLAGS $OSMESA_CFLAGS"
|
slouken@1361
|
1379 |
BUILD_LIBS="$BUILD_LIBS $OSMESA_LIBS"
|
patmandin@991
|
1380 |
|
patmandin@991
|
1381 |
AC_ARG_ENABLE(osmesa-shared,
|
slouken@1361
|
1382 |
AC_HELP_STRING([--enable-osmesa-shared], [dynamically load OSMesa OpenGL support [default=yes]]),
|
patmandin@991
|
1383 |
, enable_osmesa_shared=yes)
|
patmandin@991
|
1384 |
if test "x$enable_osmesa_shared" = "xyes" -a "x$enable_atari_ldg" = "xyes"; then
|
patmandin@991
|
1385 |
# Dynamic linking
|
patmandin@991
|
1386 |
if test "x$have_osmesa_hdr" = "xyes"; then
|
slouken@1361
|
1387 |
AC_DEFINE(SDL_VIDEO_OPENGL_OSMESA_DYNAMIC)
|
patmandin@991
|
1388 |
fi
|
slouken@1361
|
1389 |
fi
|
patmandin@978
|
1390 |
fi
|
patmandin@978
|
1391 |
}
|
patmandin@978
|
1392 |
|
slouken@0
|
1393 |
dnl See if we can use the new unified event interface in Linux 2.4
|
slouken@0
|
1394 |
CheckInputEvents()
|
slouken@0
|
1395 |
{
|
slouken@0
|
1396 |
dnl Check for Linux 2.4 unified input event interface support
|
slouken@0
|
1397 |
AC_ARG_ENABLE(input-events,
|
slouken@1361
|
1398 |
AC_HELP_STRING([--enable-input-events], [use Linux 2.4 unified input interface [default=yes]]),
|
slouken@211
|
1399 |
, enable_input_events=yes)
|
slouken@0
|
1400 |
if test x$enable_input_events = xyes; then
|
slouken@0
|
1401 |
AC_MSG_CHECKING(for Linux 2.4 unified input interface)
|
slouken@0
|
1402 |
use_input_events=no
|
slouken@0
|
1403 |
AC_TRY_COMPILE([
|
slouken@0
|
1404 |
#include <linux/input.h>
|
slouken@0
|
1405 |
],[
|
slouken@0
|
1406 |
#ifndef EVIOCGNAME
|
slouken@0
|
1407 |
#error EVIOCGNAME() ioctl not available
|
slouken@0
|
1408 |
#endif
|
slouken@0
|
1409 |
],[
|
slouken@0
|
1410 |
use_input_events=yes
|
slouken@0
|
1411 |
])
|
slouken@0
|
1412 |
AC_MSG_RESULT($use_input_events)
|
slouken@0
|
1413 |
if test x$use_input_events = xyes; then
|
slouken@1361
|
1414 |
AC_DEFINE(SDL_INPUT_LINUXEV)
|
slouken@0
|
1415 |
fi
|
slouken@0
|
1416 |
fi
|
slouken@0
|
1417 |
}
|
slouken@0
|
1418 |
|
icculus@1201
|
1419 |
dnl See if we can use the Touchscreen input library
|
icculus@1201
|
1420 |
CheckTslib()
|
icculus@1201
|
1421 |
{
|
icculus@1201
|
1422 |
AC_ARG_ENABLE(input-tslib,
|
slouken@1361
|
1423 |
AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [default=yes]]),
|
icculus@1201
|
1424 |
, enable_input_tslib=yes)
|
icculus@1201
|
1425 |
if test x$enable_input_tslib = xyes; then
|
icculus@1201
|
1426 |
AC_MSG_CHECKING(for Touchscreen library support)
|
icculus@1201
|
1427 |
enable_input_tslib=no
|
icculus@1201
|
1428 |
AC_TRY_COMPILE([
|
icculus@1201
|
1429 |
#include "tslib.h"
|
icculus@1201
|
1430 |
],[
|
icculus@1201
|
1431 |
],[
|
icculus@1201
|
1432 |
enable_input_tslib=yes
|
icculus@1201
|
1433 |
])
|
icculus@1201
|
1434 |
AC_MSG_RESULT($enable_input_tslib)
|
icculus@1201
|
1435 |
if test x$enable_input_tslib = xyes; then
|
slouken@1361
|
1436 |
AC_DEFINE(SDL_INPUT_TSLIB)
|
slouken@1361
|
1437 |
BUILD_LIBS="$BUILD_LIBS -lts"
|
icculus@1201
|
1438 |
fi
|
icculus@1201
|
1439 |
fi
|
icculus@1201
|
1440 |
}
|
icculus@1201
|
1441 |
|
slouken@399
|
1442 |
dnl See if we can use GNU pth library for threads
|
slouken@399
|
1443 |
CheckPTH()
|
slouken@399
|
1444 |
{
|
slouken@399
|
1445 |
dnl Check for pth support
|
slouken@399
|
1446 |
AC_ARG_ENABLE(pth,
|
slouken@1361
|
1447 |
AC_HELP_STRING([--enable-pth], [use GNU pth library for multi-threading [default=yes]]),
|
slouken@399
|
1448 |
, enable_pth=yes)
|
slouken@399
|
1449 |
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
slouken@399
|
1450 |
AC_PATH_PROG(PTH_CONFIG, pth-config, no)
|
slouken@399
|
1451 |
if test "$PTH_CONFIG" = "no"; then
|
slouken@399
|
1452 |
use_pth=no
|
slouken@399
|
1453 |
else
|
slouken@399
|
1454 |
use_pth=yes
|
slouken@399
|
1455 |
fi
|
slouken@399
|
1456 |
AC_MSG_CHECKING(pth)
|
slouken@1361
|
1457 |
AC_MSG_RESULT($use_pth)
|
slouken@399
|
1458 |
if test "x$use_pth" = xyes; then
|
slouken@1361
|
1459 |
AC_DEFINE(SDL_THREAD_PTH)
|
slouken@1361
|
1460 |
SOURCES="$SOURCES $srcdir/src/thread/pth/*.c"
|
slouken@1361
|
1461 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
|
slouken@1361
|
1462 |
SDL_CFLAGS="$SDL_CFLAGS `$PTH_CONFIG --cflags`"
|
slouken@1361
|
1463 |
SDL_LIBS="$SDL_LIBS `$PTH_CONFIG --libs --all`"
|
slouken@1361
|
1464 |
have_threads=yes
|
slouken@399
|
1465 |
fi
|
slouken@399
|
1466 |
fi
|
slouken@399
|
1467 |
}
|
slouken@399
|
1468 |
|
slouken@0
|
1469 |
dnl See what type of thread model to use on Linux and Solaris
|
slouken@0
|
1470 |
CheckPTHREAD()
|
slouken@0
|
1471 |
{
|
slouken@0
|
1472 |
dnl Check for pthread support
|
slouken@0
|
1473 |
AC_ARG_ENABLE(pthreads,
|
slouken@1361
|
1474 |
AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [default=yes]]),
|
slouken@0
|
1475 |
, enable_pthreads=yes)
|
slouken@0
|
1476 |
dnl This is used on Linux for glibc binary compatibility (Doh!)
|
slouken@0
|
1477 |
AC_ARG_ENABLE(pthread-sem,
|
slouken@1361
|
1478 |
AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [default=yes]]),
|
slouken@0
|
1479 |
, enable_pthread_sem=yes)
|
slouken@0
|
1480 |
case "$target" in
|
slouken@1324
|
1481 |
*-*-linux*)
|
slouken@1361
|
1482 |
pthread_cflags="-D_REENTRANT"
|
slouken@1324
|
1483 |
pthread_lib="-lpthread"
|
slouken@1324
|
1484 |
;;
|
slouken@0
|
1485 |
*-*-bsdi*)
|
slouken@0
|
1486 |
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1487 |
pthread_lib=""
|
slouken@0
|
1488 |
;;
|
slouken@0
|
1489 |
*-*-darwin*)
|
slouken@0
|
1490 |
pthread_cflags="-D_THREAD_SAFE"
|
slouken@0
|
1491 |
# causes Carbon.p complaints?
|
slouken@0
|
1492 |
# pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1493 |
;;
|
slouken@0
|
1494 |
*-*-freebsd*)
|
slouken@0
|
1495 |
pthread_cflags="-D_REENTRANT -D_THREAD_SAFE"
|
slouken@0
|
1496 |
pthread_lib="-pthread"
|
slouken@0
|
1497 |
;;
|
slouken@43
|
1498 |
*-*-netbsd*)
|
slouken@1361
|
1499 |
pthread_cflags="-I/usr/include -D_REENTRANT -D_THREAD_SAFE -D_POSIX_THREAD_SYSCALL_SOFT=1"
|
icculus@1200
|
1500 |
pthread_lib="-L/usr/lib -lpthread"
|
slouken@43
|
1501 |
;;
|
slouken@0
|
1502 |
*-*-openbsd*)
|
slouken@0
|
1503 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1504 |
pthread_lib="-pthread"
|
slouken@0
|
1505 |
;;
|
slouken@0
|
1506 |
*-*-solaris*)
|
slouken@0
|
1507 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1508 |
pthread_lib="-lpthread -lposix4"
|
slouken@0
|
1509 |
;;
|
slouken@0
|
1510 |
*-*-sysv5*)
|
slouken@0
|
1511 |
pthread_cflags="-D_REENTRANT -Kthread"
|
slouken@0
|
1512 |
pthread_lib=""
|
slouken@0
|
1513 |
;;
|
slouken@0
|
1514 |
*-*-irix*)
|
slouken@0
|
1515 |
pthread_cflags="-D_SGI_MP_SOURCE"
|
slouken@0
|
1516 |
pthread_lib="-lpthread"
|
slouken@0
|
1517 |
;;
|
slouken@0
|
1518 |
*-*-aix*)
|
slouken@0
|
1519 |
pthread_cflags="-D_REENTRANT -mthreads"
|
slouken@0
|
1520 |
pthread_lib="-lpthread"
|
slouken@0
|
1521 |
;;
|
icculus@425
|
1522 |
*-*-hpux11*)
|
icculus@425
|
1523 |
pthread_cflags="-D_REENTRANT"
|
icculus@425
|
1524 |
pthread_lib="-L/usr/lib -lpthread"
|
icculus@425
|
1525 |
;;
|
slouken@0
|
1526 |
*-*-qnx*)
|
slouken@0
|
1527 |
pthread_cflags=""
|
slouken@0
|
1528 |
pthread_lib=""
|
slouken@0
|
1529 |
;;
|
slouken@873
|
1530 |
*-*-osf*)
|
slouken@1019
|
1531 |
pthread_cflags="-D_REENTRANT"
|
slouken@873
|
1532 |
if test x$ac_cv_prog_gcc = xyes; then
|
slouken@873
|
1533 |
pthread_lib="-lpthread -lrt"
|
slouken@873
|
1534 |
else
|
slouken@1019
|
1535 |
pthread_lib="-lpthread -lexc -lrt"
|
slouken@873
|
1536 |
fi
|
slouken@873
|
1537 |
;;
|
slouken@0
|
1538 |
*)
|
slouken@0
|
1539 |
pthread_cflags="-D_REENTRANT"
|
slouken@0
|
1540 |
pthread_lib="-lpthread"
|
slouken@0
|
1541 |
;;
|
slouken@0
|
1542 |
esac
|
icculus@1140
|
1543 |
if test x$enable_threads = xyes -a x$enable_pthreads = xyes -a x$enable_ipod != xyes; then
|
slouken@415
|
1544 |
# Save the original compiler flags and libraries
|
slouken@415
|
1545 |
ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
|
slouken@415
|
1546 |
# Add the pthread compiler flags and libraries
|
slouken@415
|
1547 |
CFLAGS="$CFLAGS $pthread_cflags"; LIBS="$LIBS $pthread_lib"
|
slouken@415
|
1548 |
# Check to see if we have pthread support on this system
|
slouken@0
|
1549 |
AC_MSG_CHECKING(for pthreads)
|
slouken@0
|
1550 |
use_pthreads=no
|
slouken@0
|
1551 |
AC_TRY_LINK([
|
slouken@0
|
1552 |
#include <pthread.h>
|
slouken@0
|
1553 |
],[
|
slouken@0
|
1554 |
pthread_attr_t type;
|
slouken@0
|
1555 |
pthread_attr_init(&type);
|
slouken@0
|
1556 |
],[
|
slouken@0
|
1557 |
use_pthreads=yes
|
slouken@0
|
1558 |
])
|
slouken@0
|
1559 |
AC_MSG_RESULT($use_pthreads)
|
slouken@415
|
1560 |
# Restore the compiler flags and libraries
|
slouken@415
|
1561 |
CFLAGS="$ac_save_cflags"; LIBS="$ac_save_libs"
|
slouken@1361
|
1562 |
|
slouken@415
|
1563 |
# Do futher testing if we have pthread support...
|
slouken@0
|
1564 |
if test x$use_pthreads = xyes; then
|
slouken@1361
|
1565 |
AC_DEFINE(SDL_THREAD_PTHREAD)
|
slouken@1361
|
1566 |
BUILD_CFLAGS="$BUILD_CFLAGS $pthread_cflags"
|
slouken@1361
|
1567 |
BUILD_LIBS="$BUILD_LIBS $pthread_lib"
|
slouken@0
|
1568 |
SDL_CFLAGS="$SDL_CFLAGS $pthread_cflags"
|
slouken@0
|
1569 |
SDL_LIBS="$SDL_LIBS $pthread_lib"
|
slouken@0
|
1570 |
|
slouken@0
|
1571 |
# Check to see if recursive mutexes are available
|
slouken@0
|
1572 |
AC_MSG_CHECKING(for recursive mutexes)
|
slouken@0
|
1573 |
has_recursive_mutexes=no
|
slouken@1324
|
1574 |
if test x$has_recursive_mutexes = xno; then
|
slouken@1324
|
1575 |
AC_TRY_COMPILE([
|
slouken@1324
|
1576 |
#include <pthread.h>
|
slouken@1324
|
1577 |
],[
|
slouken@1324
|
1578 |
pthread_mutexattr_t attr;
|
slouken@1324
|
1579 |
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
|
slouken@1324
|
1580 |
],[
|
slouken@1324
|
1581 |
has_recursive_mutexes=yes
|
slouken@1361
|
1582 |
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX)
|
slouken@1324
|
1583 |
])
|
slouken@1324
|
1584 |
fi
|
slouken@1324
|
1585 |
if test x$has_recursive_mutexes = xno; then
|
slouken@1324
|
1586 |
AC_TRY_COMPILE([
|
slouken@1324
|
1587 |
#include <pthread.h>
|
slouken@1324
|
1588 |
],[
|
slouken@1324
|
1589 |
pthread_mutexattr_t attr;
|
slouken@1324
|
1590 |
pthread_mutexattr_setkind_np(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
|
slouken@1324
|
1591 |
],[
|
slouken@1324
|
1592 |
has_recursive_mutexes=yes
|
slouken@1361
|
1593 |
AC_DEFINE(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP)
|
slouken@1324
|
1594 |
])
|
slouken@1324
|
1595 |
fi
|
slouken@0
|
1596 |
AC_MSG_RESULT($has_recursive_mutexes)
|
slouken@0
|
1597 |
|
slouken@94
|
1598 |
# Check to see if pthread semaphore support is missing
|
slouken@94
|
1599 |
if test x$enable_pthread_sem = xyes; then
|
slouken@94
|
1600 |
AC_MSG_CHECKING(for pthread semaphores)
|
slouken@94
|
1601 |
have_pthread_sem=no
|
slouken@94
|
1602 |
AC_TRY_COMPILE([
|
slouken@94
|
1603 |
#include <pthread.h>
|
slouken@94
|
1604 |
#include <semaphore.h>
|
slouken@94
|
1605 |
],[
|
slouken@94
|
1606 |
],[
|
slouken@94
|
1607 |
have_pthread_sem=yes
|
slouken@94
|
1608 |
])
|
slouken@94
|
1609 |
AC_MSG_RESULT($have_pthread_sem)
|
slouken@94
|
1610 |
fi
|
slouken@94
|
1611 |
|
slouken@1361
|
1612 |
# Basic thread creation functions
|
slouken@1361
|
1613 |
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_systhread.c"
|
slouken@0
|
1614 |
|
slouken@1361
|
1615 |
# Semaphores
|
slouken@1361
|
1616 |
# We can fake these with mutexes and condition variables if necessary
|
slouken@1361
|
1617 |
if test x$have_pthread_sem = xyes; then
|
slouken@1361
|
1618 |
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syssem.c"
|
slouken@1361
|
1619 |
else
|
slouken@1361
|
1620 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syssem.c"
|
slouken@1361
|
1621 |
fi
|
slouken@399
|
1622 |
|
slouken@1361
|
1623 |
# Mutexes
|
slouken@1361
|
1624 |
# We can fake these with semaphores if necessary
|
slouken@1361
|
1625 |
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_sysmutex.c"
|
slouken@399
|
1626 |
|
slouken@1361
|
1627 |
# Condition variables
|
slouken@1361
|
1628 |
# We can fake these with semaphores and mutexes if necessary
|
slouken@1361
|
1629 |
SOURCES="$SOURCES $srcdir/src/thread/pthread/SDL_syscond.c"
|
slouken@185
|
1630 |
|
slouken@1361
|
1631 |
have_threads=yes
|
slouken@1361
|
1632 |
else
|
slouken@1361
|
1633 |
CheckPTH
|
slouken@814
|
1634 |
fi
|
slouken@814
|
1635 |
fi
|
slouken@814
|
1636 |
}
|
slouken@814
|
1637 |
|
slouken@0
|
1638 |
dnl Determine whether the compiler can produce Win32 executables
|
slouken@0
|
1639 |
CheckWIN32()
|
slouken@0
|
1640 |
{
|
slouken@0
|
1641 |
AC_MSG_CHECKING(Win32 compiler)
|
slouken@0
|
1642 |
have_win32_gcc=no
|
slouken@0
|
1643 |
AC_TRY_COMPILE([
|
slouken@0
|
1644 |
#include <windows.h>
|
slouken@0
|
1645 |
],[
|
slouken@0
|
1646 |
],[
|
slouken@0
|
1647 |
have_win32_gcc=yes
|
slouken@0
|
1648 |
])
|
slouken@0
|
1649 |
AC_MSG_RESULT($have_win32_gcc)
|
slouken@0
|
1650 |
if test x$have_win32_gcc != xyes; then
|
slouken@0
|
1651 |
AC_MSG_ERROR([
|
slouken@0
|
1652 |
*** Your compiler ($CC) does not produce Win32 executables!
|
slouken@0
|
1653 |
])
|
slouken@0
|
1654 |
fi
|
slouken@0
|
1655 |
|
slouken@0
|
1656 |
dnl See if the user wants to redirect standard output to files
|
slouken@0
|
1657 |
AC_ARG_ENABLE(stdio-redirect,
|
slouken@1361
|
1658 |
AC_HELP_STRING([--enable-stdio-redirect], [Redirect STDIO to files on Win32 [default=yes]]),
|
slouken@0
|
1659 |
, enable_stdio_redirect=yes)
|
slouken@0
|
1660 |
if test x$enable_stdio_redirect != xyes; then
|
slouken@1361
|
1661 |
BUILD_CFLAGS="$BUILD_CFLAGS -DNO_STDIO_REDIRECT"
|
slouken@1361
|
1662 |
fi
|
slouken@1361
|
1663 |
|
slouken@1361
|
1664 |
if test x$enable_video = xyes; then
|
slouken@1361
|
1665 |
AC_DEFINE(SDL_VIDEO_DRIVER_WINDIB)
|
slouken@1361
|
1666 |
SOURCES="$SOURCES $srcdir/src/video/wincommon/*.c"
|
slouken@1361
|
1667 |
SOURCES="$SOURCES $srcdir/src/video/windib/*.c"
|
slouken@1361
|
1668 |
have_video=yes
|
slouken@0
|
1669 |
fi
|
slouken@0
|
1670 |
}
|
slouken@0
|
1671 |
|
slouken@0
|
1672 |
dnl Find the DirectX includes and libraries
|
slouken@0
|
1673 |
CheckDIRECTX()
|
slouken@0
|
1674 |
{
|
slouken@0
|
1675 |
AC_ARG_ENABLE(directx,
|
slouken@1361
|
1676 |
AC_HELP_STRING([--enable-directx], [use DirectX for Win32 audio/video [default=yes]]),
|
slouken@0
|
1677 |
, enable_directx=yes)
|
slouken@0
|
1678 |
if test x$enable_directx = xyes; then
|
slouken@1361
|
1679 |
have_directx=no
|
slouken@1361
|
1680 |
AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
|
slouken@1361
|
1681 |
AC_CHECK_HEADER(dsound.h, have_dsound=yes)
|
slouken@1361
|
1682 |
AC_CHECK_HEADER(dinput.h, use_dinput=yes)
|
slouken@1361
|
1683 |
if test x$have_ddraw = xyes -a x$have_dsound = xyes -a x$use_dinput = xyes; then
|
slouken@1361
|
1684 |
have_directx=yes
|
slouken@371
|
1685 |
fi
|
slouken@1361
|
1686 |
if test x$enable_video = xyes -a x$have_directx = xyes; then
|
slouken@1361
|
1687 |
AC_DEFINE(SDL_VIDEO_DRIVER_DDRAW)
|
slouken@1361
|
1688 |
SOURCES="$SOURCES $srcdir/src/video/windx5/*.c"
|
slouken@1361
|
1689 |
have_video=yes
|
icculus@1187
|
1690 |
fi
|
icculus@1187
|
1691 |
fi
|
icculus@1187
|
1692 |
}
|
icculus@1187
|
1693 |
|
slouken@294
|
1694 |
dnl Check for the dlfcn.h interface for dynamically loading objects
|
slouken@294
|
1695 |
CheckDLOPEN()
|
slouken@294
|
1696 |
{
|
slouken@731
|
1697 |
AC_ARG_ENABLE(sdl-dlopen,
|
slouken@1361
|
1698 |
AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [default=yes]]),
|
slouken@731
|
1699 |
, enable_sdl_dlopen=yes)
|
slouken@731
|
1700 |
if test x$enable_sdl_dlopen = xyes; then
|
slouken@294
|
1701 |
AC_MSG_CHECKING(for dlopen)
|
slouken@1361
|
1702 |
have_dlopen=no
|
slouken@294
|
1703 |
AC_TRY_COMPILE([
|
slouken@294
|
1704 |
#include <dlfcn.h>
|
slouken@294
|
1705 |
],[
|
slouken@294
|
1706 |
],[
|
slouken@1361
|
1707 |
have_dlopen=yes
|
slouken@294
|
1708 |
])
|
slouken@1361
|
1709 |
AC_MSG_RESULT($have_dlopen)
|
slouken@294
|
1710 |
|
slouken@1361
|
1711 |
if test x$have_dlopen = xyes; then
|
slouken@1361
|
1712 |
AC_CHECK_LIB(c, dlopen, BUILD_LIBS="$BUILD_LIBS",
|
slouken@1361
|
1713 |
AC_CHECK_LIB(dl, dlopen, BUILD_LIBS="$BUILD_LIBS -ldl",
|
slouken@1361
|
1714 |
AC_CHECK_LIB(ltdl, dlopen, BUILD_LIBS="$BUILD_LIBS -lltdl")))
|
slouken@1361
|
1715 |
AC_CHECK_LIB(dl, dlvsym, have_dlvsym=yes)
|
slouken@1361
|
1716 |
if test x$have_dlvsym = xyes; then
|
slouken@1361
|
1717 |
AC_DEFINE(HAVE_DLVSYM)
|
slouken@1361
|
1718 |
fi
|
slouken@1361
|
1719 |
AC_DEFINE(SDL_LOADSO_DLOPEN)
|
slouken@1361
|
1720 |
SOURCES="$SOURCES $srcdir/src/loadso/dlopen/*.c"
|
slouken@1361
|
1721 |
have_loadso=yes
|
slouken@294
|
1722 |
fi
|
slouken@294
|
1723 |
fi
|
slouken@294
|
1724 |
}
|
slouken@294
|
1725 |
|
patmandin@651
|
1726 |
dnl Set up the Atari LDG (shared object loader)
|
patmandin@651
|
1727 |
CheckAtariLdg()
|
patmandin@651
|
1728 |
{
|
patmandin@651
|
1729 |
AC_ARG_ENABLE(atari-ldg,
|
slouken@1361
|
1730 |
AC_HELP_STRING([--enable-atari-ldg], [use Atari LDG for shared object loading [default=yes]]),
|
patmandin@651
|
1731 |
, enable_atari_ldg=yes)
|
patmandin@651
|
1732 |
if test x$video_gem = xyes -a x$enable_atari_ldg = xyes; then
|
patmandin@651
|
1733 |
AC_CHECK_HEADER(ldg.h, have_ldg_hdr=yes)
|
patmandin@651
|
1734 |
AC_CHECK_LIB(ldg, ldg_open, have_ldg_lib=yes, have_ldg_lib=no, -lgem)
|
patmandin@651
|
1735 |
if test x$have_ldg_hdr = xyes -a x$have_ldg_lib = xyes; then
|
slouken@1361
|
1736 |
AC_DEFINE(SDL_LOADSO_LDG)
|
slouken@1361
|
1737 |
SOURCES="$SOURCES $srcdir/src/loadso/mint/*.c"
|
slouken@1361
|
1738 |
BUILD_LIBS="$BUILD_LIBS -lldg -lgem"
|
icculus@1173
|
1739 |
have_loadso=yes
|
patmandin@651
|
1740 |
fi
|
patmandin@651
|
1741 |
fi
|
patmandin@651
|
1742 |
}
|
patmandin@651
|
1743 |
|
slouken@381
|
1744 |
dnl Check for the usbhid(3) library on *BSD
|
slouken@381
|
1745 |
CheckUSBHID()
|
slouken@381
|
1746 |
{
|
slouken@381
|
1747 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
1748 |
AC_CHECK_HEADER(usb.h, [USB_CFLAGS="-DHAVE_USB_H"])
|
slouken@1361
|
1749 |
AC_CHECK_HEADER(usbhid.h, [USB_CFLAGS="-DHAVE_USBHID_H"])
|
slouken@1361
|
1750 |
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
|
slouken@1361
|
1751 |
AC_CHECK_HEADER(libusbhid.h, [USB_CFLAGS="-DHAVE_LIBUSBHID_H"])
|
slouken@1361
|
1752 |
|
slouken@1361
|
1753 |
AC_CHECK_LIB(usbhid, hid_init, [USB_LIBS="$USB_LIBS -lusbhid"])
|
slouken@1361
|
1754 |
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
|
slouken@381
|
1755 |
|
slouken@1361
|
1756 |
save_CFLAGS="$CFLAGS"
|
slouken@1361
|
1757 |
CFLAGS="$CFLAGS $USB_CFLAGS"
|
slouken@381
|
1758 |
|
slouken@381
|
1759 |
AC_MSG_CHECKING(for usbhid)
|
slouken@381
|
1760 |
have_usbhid=no
|
slouken@381
|
1761 |
AC_TRY_COMPILE([
|
slouken@404
|
1762 |
#include <sys/types.h>
|
slouken@403
|
1763 |
#if defined(HAVE_USB_H)
|
slouken@403
|
1764 |
#include <usb.h>
|
slouken@403
|
1765 |
#endif
|
slouken@381
|
1766 |
#include <dev/usb/usb.h>
|
slouken@381
|
1767 |
#include <dev/usb/usbhid.h>
|
slouken@381
|
1768 |
#if defined(HAVE_USBHID_H)
|
slouken@381
|
1769 |
#include <usbhid.h>
|
slouken@381
|
1770 |
#elif defined(HAVE_LIBUSB_H)
|
slouken@381
|
1771 |
#include <libusb.h>
|
slouken@381
|
1772 |
#elif defined(HAVE_LIBUSBHID_H)
|
slouken@381
|
1773 |
#include <libusbhid.h>
|
slouken@404
|
1774 |
#endif
|
slouken@381
|
1775 |
],[
|
slouken@381
|
1776 |
struct report_desc *repdesc;
|
slouken@381
|
1777 |
struct usb_ctl_report *repbuf;
|
slouken@402
|
1778 |
hid_kind_t hidkind;
|
slouken@381
|
1779 |
],[
|
slouken@381
|
1780 |
have_usbhid=yes
|
slouken@381
|
1781 |
])
|
slouken@381
|
1782 |
AC_MSG_RESULT($have_usbhid)
|
slouken@381
|
1783 |
|
slouken@381
|
1784 |
if test x$have_usbhid = xyes; then
|
slouken@381
|
1785 |
AC_MSG_CHECKING(for ucr_data member of usb_ctl_report)
|
slouken@381
|
1786 |
have_usbhid_ucr_data=no
|
slouken@381
|
1787 |
AC_TRY_COMPILE([
|
slouken@404
|
1788 |
#include <sys/types.h>
|
slouken@404
|
1789 |
#if defined(HAVE_USB_H)
|
slouken@404
|
1790 |
#include <usb.h>
|
slouken@404
|
1791 |
#endif
|
slouken@381
|
1792 |
#include <dev/usb/usb.h>
|
slouken@381
|
1793 |
#include <dev/usb/usbhid.h>
|
slouken@381
|
1794 |
#if defined(HAVE_USBHID_H)
|
slouken@381
|
1795 |
#include <usbhid.h>
|
slouken@381
|
1796 |
#elif defined(HAVE_LIBUSB_H)
|
slouken@381
|
1797 |
#include <libusb.h>
|
slouken@381
|
1798 |
#elif defined(HAVE_LIBUSBHID_H)
|
slouken@381
|
1799 |
#include <libusbhid.h>
|
slouken@381
|
1800 |
#endif
|
slouken@381
|
1801 |
],[
|
slouken@381
|
1802 |
struct usb_ctl_report buf;
|
slouken@381
|
1803 |
if (buf.ucr_data) { }
|
slouken@381
|
1804 |
],[
|
slouken@381
|
1805 |
have_usbhid_ucr_data=yes
|
slouken@381
|
1806 |
])
|
slouken@381
|
1807 |
if test x$have_usbhid_ucr_data = xyes; then
|
slouken@1361
|
1808 |
USB_CFLAGS="$USB_CFLAGS -DUSBHID_UCR_DATA"
|
slouken@381
|
1809 |
fi
|
slouken@381
|
1810 |
AC_MSG_RESULT($have_usbhid_ucr_data)
|
slouken@407
|
1811 |
|
slouken@1361
|
1812 |
AC_MSG_CHECKING(for new usbhid API)
|
slouken@407
|
1813 |
have_usbhid_new=no
|
slouken@407
|
1814 |
AC_TRY_COMPILE([
|
slouken@407
|
1815 |
#include <sys/types.h>
|
slouken@407
|
1816 |
#if defined(HAVE_USB_H)
|
slouken@407
|
1817 |
#include <usb.h>
|
slouken@407
|
1818 |
#endif
|
slouken@407
|
1819 |
#include <dev/usb/usb.h>
|
slouken@407
|
1820 |
#include <dev/usb/usbhid.h>
|
slouken@407
|
1821 |
#if defined(HAVE_USBHID_H)
|
slouken@407
|
1822 |
#include <usbhid.h>
|
slouken@407
|
1823 |
#elif defined(HAVE_LIBUSB_H)
|
slouken@407
|
1824 |
#include <libusb.h>
|
slouken@407
|
1825 |
#elif defined(HAVE_LIBUSBHID_H)
|
slouken@407
|
1826 |
#include <libusbhid.h>
|
slouken@407
|
1827 |
#endif
|
slouken@407
|
1828 |
],[
|
slouken@407
|
1829 |
report_desc_t d;
|
slouken@1361
|
1830 |
hid_start_parse(d, 1, 1);
|
slouken@407
|
1831 |
],[
|
slouken@407
|
1832 |
have_usbhid_new=yes
|
slouken@407
|
1833 |
])
|
slouken@407
|
1834 |
if test x$have_usbhid_new = xyes; then
|
slouken@1361
|
1835 |
USB_CFLAGS="$USB_CFLAGS -DUSBHID_NEW"
|
slouken@407
|
1836 |
fi
|
slouken@407
|
1837 |
AC_MSG_RESULT($have_usbhid_new)
|
slouken@381
|
1838 |
|
slouken@1361
|
1839 |
AC_DEFINE(SDL_JOYSTICK_USBHID)
|
slouken@1361
|
1840 |
SOURCES="$SOURCES $srcdir/src/joystick/bsd/*.c"
|
slouken@1361
|
1841 |
BUILD_CFLAGS="$BUILD_CFLAGS $USB_CFLAGS"
|
slouken@1361
|
1842 |
BUILD_LIBS="$BUILD_CFLAGS $USB_LIBS"
|
slouken@1361
|
1843 |
have_joystick=yes
|
slouken@381
|
1844 |
fi
|
slouken@1361
|
1845 |
CFLAGS="$save_CFLAGS"
|
slouken@381
|
1846 |
fi
|
slouken@381
|
1847 |
}
|
slouken@381
|
1848 |
|
slouken@1361
|
1849 |
dnl Check for clock_gettime()
|
slouken@1361
|
1850 |
CheckClockGettime()
|
slouken@795
|
1851 |
{
|
slouken@1361
|
1852 |
AC_ARG_ENABLE(clock_gettime,
|
slouken@1361
|
1853 |
AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [default=no]]),
|
slouken@1361
|
1854 |
, enable_clock_gettime=no)
|
slouken@1361
|
1855 |
if test x$enable_clock_gettime = xyes; then
|
slouken@1361
|
1856 |
AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
|
slouken@1361
|
1857 |
if test x$have_clock_gettime = xyes; then
|
slouken@1361
|
1858 |
AC_DEFINE(HAVE_CLOCK_GETTIME)
|
slouken@1361
|
1859 |
BUILD_LIBS="$BUILD_LIBS -lrt"
|
icculus@1175
|
1860 |
fi
|
slouken@795
|
1861 |
fi
|
slouken@795
|
1862 |
}
|
slouken@795
|
1863 |
|
slouken@1062
|
1864 |
dnl Check for a valid linux/version.h
|
slouken@1062
|
1865 |
CheckLinuxVersion()
|
slouken@1062
|
1866 |
{
|
slouken@1062
|
1867 |
AC_CHECK_HEADER(linux/version.h, have_linux_version_h=yes)
|
slouken@1062
|
1868 |
if test x$have_linux_version_h = xyes; then
|
slouken@1361
|
1869 |
BUILD_CFLAGS="$BUILD_CFLAGS -DHAVE_LINUX_VERSION_H"
|
slouken@1062
|
1870 |
fi
|
slouken@1062
|
1871 |
}
|
slouken@1062
|
1872 |
|
slouken@1127
|
1873 |
dnl Check if we want to use RPATH
|
slouken@1127
|
1874 |
CheckRPATH()
|
slouken@1127
|
1875 |
{
|
slouken@1127
|
1876 |
AC_ARG_ENABLE(rpath,
|
slouken@1361
|
1877 |
AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [default=yes]]),
|
slouken@1127
|
1878 |
, enable_rpath=yes)
|
slouken@1127
|
1879 |
}
|
slouken@1127
|
1880 |
|
slouken@1361
|
1881 |
dnl Set up the configuration based on the target platform!
|
slouken@0
|
1882 |
case "$target" in
|
slouken@1361
|
1883 |
arm-*-elf*) # FIXME: Can we get more specific for iPodLinux?
|
slouken@1361
|
1884 |
ARCH=linux
|
slouken@1361
|
1885 |
CheckDummyVideo
|
slouken@1361
|
1886 |
CheckIPod
|
slouken@1361
|
1887 |
# Set up files for the timer library
|
icculus@1140
|
1888 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
1889 |
AC_DEFINE(SDL_TIMER_UNIX)
|
slouken@1361
|
1890 |
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
slouken@1361
|
1891 |
have_timers=yes
|
icculus@1140
|
1892 |
fi
|
slouken@1361
|
1893 |
;;
|
slouken@1361
|
1894 |
*-*-linux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-irix*|*-*-aix*|*-*-osf*)
|
slouken@719
|
1895 |
case "$target" in
|
slouken@1361
|
1896 |
*-*-linux*) ARCH=linux ;;
|
slouken@1361
|
1897 |
*-*-kfreebsd*-gnu) ARCH=kfreebsd-gnu ;;
|
slouken@1361
|
1898 |
*-*-knetbsd*-gnu) ARCH=knetbsd-gnu ;;
|
slouken@1361
|
1899 |
*-*-kopenbsd*-gnu) ARCH=kopenbsd-gnu ;;
|
slouken@1361
|
1900 |
*-*-gnu*) ARCH=gnu ;; # must be last of the gnu variants
|
slouken@1361
|
1901 |
*-*-bsdi*) ARCH=bsdi ;;
|
slouken@1361
|
1902 |
*-*-freebsd*) ARCH=freebsd ;;
|
slouken@1361
|
1903 |
*-*-netbsd*) ARCH=netbsd ;;
|
slouken@1361
|
1904 |
*-*-openbsd*) ARCH=openbsd ;;
|
slouken@1361
|
1905 |
*-*-sysv5*) ARCH=sysv5 ;;
|
slouken@1361
|
1906 |
*-*-solaris*) ARCH=solaris ;;
|
slouken@1361
|
1907 |
*-*-hpux*) ARCH=hpux ;;
|
slouken@1361
|
1908 |
*-*-irix*) ARCH=irix ;;
|
slouken@1361
|
1909 |
*-*-aix*) ARCH=aix ;;
|
slouken@1361
|
1910 |
*-*-osf*) ARCH=osf ;;
|
slouken@795
|
1911 |
esac
|
slouken@1
|
1912 |
CheckDummyVideo
|
slouken@68
|
1913 |
CheckDiskAudio
|
slouken@371
|
1914 |
CheckDLOPEN
|
slouken@0
|
1915 |
CheckNASM
|
slouken@1361
|
1916 |
CheckAltivec
|
slouken@0
|
1917 |
CheckOSS
|
slouken@1361
|
1918 |
CheckDMEDIA
|
slouken@0
|
1919 |
CheckALSA
|
slouken@0
|
1920 |
CheckARTSC
|
slouken@0
|
1921 |
CheckESD
|
slouken@0
|
1922 |
CheckNAS
|
slouken@0
|
1923 |
CheckX11
|
slouken@30
|
1924 |
CheckNANOX
|
slouken@0
|
1925 |
CheckFBCON
|
slouken@167
|
1926 |
CheckDirectFB
|
slouken@70
|
1927 |
CheckPS2GS
|
slouken@0
|
1928 |
CheckGGI
|
slouken@0
|
1929 |
CheckSVGA
|
slouken@1361
|
1930 |
CheckVGL
|
slouken@1361
|
1931 |
CheckWscons
|
slouken@0
|
1932 |
CheckAAlib
|
slouken@371
|
1933 |
CheckQtopia
|
slouken@433
|
1934 |
CheckPicoGUI
|
icculus@1191
|
1935 |
CheckOpenGLX11
|
slouken@0
|
1936 |
CheckInputEvents
|
icculus@1201
|
1937 |
CheckTslib
|
slouken@1361
|
1938 |
CheckUSBHID
|
slouken@0
|
1939 |
CheckPTHREAD
|
slouken@1361
|
1940 |
CheckClockGettime
|
slouken@1062
|
1941 |
CheckLinuxVersion
|
slouken@1127
|
1942 |
CheckRPATH
|
slouken@1361
|
1943 |
# Set up files for the audio library
|
slouken@1361
|
1944 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
1945 |
case $ARCH in
|
slouken@1361
|
1946 |
netbsd|sysv5|solaris|hpux)
|
slouken@1361
|
1947 |
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
|
slouken@1361
|
1948 |
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
slouken@1361
|
1949 |
have_audio=yes
|
slouken@1361
|
1950 |
;;
|
slouken@1361
|
1951 |
openbsd)
|
slouken@1361
|
1952 |
AC_DEFINE(SDL_AUDIO_DRIVER_OPENBSD)
|
slouken@1361
|
1953 |
SOURCES="$SOURCES $srcdir/src/audio/openbsd/*.c"
|
slouken@1361
|
1954 |
have_audio=yes
|
slouken@1361
|
1955 |
;;
|
slouken@1361
|
1956 |
aix)
|
slouken@1361
|
1957 |
AC_DEFINE(SDL_AUDIO_DRIVER_PAUD)
|
slouken@1361
|
1958 |
SOURCES="$SOURCES $srcdir/src/audio/paudio/*.c"
|
slouken@1361
|
1959 |
have_audio=yes
|
slouken@1361
|
1960 |
;;
|
slouken@1361
|
1961 |
osf)
|
slouken@1361
|
1962 |
AC_DEFINE(SDL_AUDIO_DRIVER_MMEAUDIO)
|
slouken@1361
|
1963 |
SOURCES="$SOURCES $srcdir/src/audio/mme/*.c"
|
slouken@1361
|
1964 |
BUILD_LIBS="$BUILD_LIBS -lmme"
|
slouken@1361
|
1965 |
have_audio=yes
|
slouken@1361
|
1966 |
;;
|
slouken@1361
|
1967 |
esac
|
slouken@371
|
1968 |
fi
|
slouken@0
|
1969 |
# Set up files for the joystick library
|
slouken@0
|
1970 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
1971 |
case $ARCH in
|
slouken@1361
|
1972 |
linux)
|
slouken@1361
|
1973 |
AC_DEFINE(SDL_JOYSTICK_LINUX)
|
slouken@1361
|
1974 |
SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
|
slouken@1361
|
1975 |
have_joystick=yes
|
slouken@1361
|
1976 |
;;
|
slouken@1361
|
1977 |
esac
|
slouken@0
|
1978 |
fi
|
slouken@0
|
1979 |
# Set up files for the cdrom library
|
slouken@0
|
1980 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
1981 |
case $ARCH in
|
slouken@1361
|
1982 |
linux|solaris)
|
slouken@1361
|
1983 |
AC_DEFINE(SDL_CDROM_LINUX)
|
slouken@1361
|
1984 |
SOURCES="$SOURCES $srcdir/src/cdrom/linux/*.c"
|
slouken@1361
|
1985 |
have_cdrom=yes
|
slouken@1361
|
1986 |
;;
|
slouken@1361
|
1987 |
*freebsd*)
|
slouken@1361
|
1988 |
AC_DEFINE(SDL_CDROM_FREEBSD)
|
slouken@1361
|
1989 |
SOURCES="$SOURCES $srcdir/src/cdrom/freebsd/*.c"
|
slouken@1361
|
1990 |
have_cdrom=yes
|
slouken@1361
|
1991 |
;;
|
slouken@1361
|
1992 |
*netbsd*|*openbsd*)
|
slouken@1361
|
1993 |
AC_DEFINE(SDL_CDROM_OPENBSD)
|
slouken@1361
|
1994 |
SOURCES="$SOURCES $srcdir/src/cdrom/openbsd/*.c"
|
slouken@1361
|
1995 |
have_cdrom=yes
|
slouken@1361
|
1996 |
;;
|
slouken@1361
|
1997 |
bsdi)
|
slouken@1361
|
1998 |
AC_DEFINE(SDL_CDROM_BSDI)
|
slouken@1361
|
1999 |
SOURCES="$SOURCES $srcdir/src/cdrom/bsdi/*.c"
|
slouken@1361
|
2000 |
have_cdrom=yes
|
slouken@1361
|
2001 |
;;
|
slouken@1361
|
2002 |
aix)
|
slouken@1361
|
2003 |
AC_DEFINE(SDL_CDROM_AIX)
|
slouken@1361
|
2004 |
SOURCES="$SOURCES $srcdir/src/cdrom/aix/*.c"
|
slouken@1361
|
2005 |
have_cdrom=yes
|
slouken@1361
|
2006 |
;;
|
slouken@1361
|
2007 |
osf)
|
slouken@1361
|
2008 |
AC_DEFINE(SDL_CDROM_OSF)
|
slouken@1361
|
2009 |
SOURCES="$SOURCES $srcdir/src/cdrom/osf/*.c"
|
slouken@1361
|
2010 |
have_cdrom=yes
|
slouken@1361
|
2011 |
;;
|
slouken@1361
|
2012 |
esac
|
slouken@0
|
2013 |
fi
|
slouken@0
|
2014 |
# Set up files for the thread library
|
slouken@1361
|
2015 |
if test x$enable_threads = xyes -a x$use_pthreads != xyes -a x$use_pth != xyes -a x$ARCH = xirix; then
|
slouken@1361
|
2016 |
AC_DEFINE(SDL_THREAD_SPROC)
|
slouken@1361
|
2017 |
SOURCES="$SOURCES $srcdir/src/thread/irix/*.c"
|
slouken@1361
|
2018 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
|
slouken@1361
|
2019 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
slouken@1361
|
2020 |
have_threads=yes
|
slouken@0
|
2021 |
fi
|
slouken@0
|
2022 |
# Set up files for the timer library
|
slouken@0
|
2023 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2024 |
AC_DEFINE(SDL_TIMER_UNIX)
|
slouken@1361
|
2025 |
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
slouken@1361
|
2026 |
have_timers=yes
|
slouken@0
|
2027 |
fi
|
slouken@1361
|
2028 |
# Do any final platform setup
|
slouken@1361
|
2029 |
case $ARCH in
|
slouken@1361
|
2030 |
netbsd)
|
slouken@1361
|
2031 |
# NetBSD does not define "unix"
|
slouken@1361
|
2032 |
BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
|
slouken@1361
|
2033 |
;;
|
slouken@1361
|
2034 |
openbsd)
|
slouken@1361
|
2035 |
# OpenBSD does not define "unix"
|
slouken@1361
|
2036 |
BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
|
slouken@1361
|
2037 |
;;
|
slouken@1361
|
2038 |
esac
|
slouken@0
|
2039 |
;;
|
slouken@0
|
2040 |
*-*-qnx*)
|
slouken@0
|
2041 |
ARCH=qnx
|
slouken@1
|
2042 |
CheckDummyVideo
|
slouken@68
|
2043 |
CheckDiskAudio
|
slouken@886
|
2044 |
# CheckNASM
|
slouken@371
|
2045 |
CheckDLOPEN
|
slouken@0
|
2046 |
CheckNAS
|
slouken@0
|
2047 |
CheckPHOTON
|
slouken@0
|
2048 |
CheckX11
|
icculus@1191
|
2049 |
CheckOpenGLX11
|
slouken@0
|
2050 |
CheckPTHREAD
|
slouken@0
|
2051 |
# Set up files for the audio library
|
slouken@0
|
2052 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
2053 |
AC_DEFINE(SDL_AUDIO_DRIVER_QNXNTO)
|
slouken@1361
|
2054 |
SOURCES="$SOURCES $srcdir/src/audio/nto/*.c"
|
slouken@1361
|
2055 |
BUILD_LIBS="$BUILD_LIBS -lasound"
|
slouken@1361
|
2056 |
have_audio=yes
|
slouken@0
|
2057 |
fi
|
slouken@0
|
2058 |
# Set up files for the cdrom library
|
slouken@0
|
2059 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2060 |
AC_DEFINE(SDL_CDROM_QNX)
|
slouken@1361
|
2061 |
SOURCES="$SOURCES $srcdir/src/cdrom/qnx/*.c"
|
slouken@1361
|
2062 |
have_cdrom=yes
|
slouken@0
|
2063 |
fi
|
slouken@0
|
2064 |
# Set up files for the timer library
|
slouken@0
|
2065 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2066 |
AC_DEFINE(SDL_TIMER_UNIX)
|
slouken@1361
|
2067 |
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
slouken@1361
|
2068 |
have_timers=yes
|
slouken@0
|
2069 |
fi
|
slouken@0
|
2070 |
;;
|
slouken@0
|
2071 |
*-*-cygwin* | *-*-mingw32*)
|
slouken@0
|
2072 |
ARCH=win32
|
slouken@0
|
2073 |
if test "$build" != "$target"; then # cross-compiling
|
slouken@0
|
2074 |
# Default cross-compile location
|
slouken@0
|
2075 |
ac_default_prefix=/usr/local/cross-tools/i386-mingw32msvc
|
slouken@0
|
2076 |
else
|
slouken@0
|
2077 |
# Look for the location of the tools and install there
|
slouken@750
|
2078 |
if test "$BUILD_PREFIX" != ""; then
|
slouken@1
|
2079 |
ac_default_prefix=$BUILD_PREFIX
|
slouken@1
|
2080 |
fi
|
slouken@0
|
2081 |
fi
|
slouken@1
|
2082 |
CheckDummyVideo
|
slouken@68
|
2083 |
CheckDiskAudio
|
slouken@0
|
2084 |
CheckWIN32
|
slouken@1361
|
2085 |
CheckWIN32GL
|
slouken@0
|
2086 |
CheckDIRECTX
|
slouken@0
|
2087 |
CheckNASM
|
slouken@0
|
2088 |
# Set up files for the audio library
|
slouken@0
|
2089 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
2090 |
AC_DEFINE(SDL_AUDIO_DRIVER_WAVEOUT)
|
slouken@1361
|
2091 |
SOURCES="$SOURCES $srcdir/src/audio/windib/*.c"
|
slouken@1361
|
2092 |
if test x$have_directx = xyes; then
|
slouken@1361
|
2093 |
AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND)
|
slouken@1361
|
2094 |
SOURCES="$SOURCES $srcdir/src/audio/windx5/*.c"
|
slouken@0
|
2095 |
fi
|
slouken@1361
|
2096 |
have_audio=yes
|
slouken@0
|
2097 |
fi
|
slouken@0
|
2098 |
# Set up files for the joystick library
|
slouken@0
|
2099 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2100 |
AC_DEFINE(SDL_JOYSTICK_WINMM)
|
slouken@1361
|
2101 |
SOURCES="$SOURCES $srcdir/src/joystick/win32/*.c"
|
slouken@1361
|
2102 |
have_joystick=yes
|
slouken@0
|
2103 |
fi
|
slouken@0
|
2104 |
# Set up files for the cdrom library
|
slouken@0
|
2105 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2106 |
AC_DEFINE(SDL_CDROM_WIN32)
|
slouken@1361
|
2107 |
SOURCES="$SOURCES $srcdir/src/cdrom/win32/*.c"
|
slouken@1361
|
2108 |
have_cdrom=yes
|
slouken@0
|
2109 |
fi
|
slouken@0
|
2110 |
# Set up files for the thread library
|
slouken@0
|
2111 |
if test x$enable_threads = xyes; then
|
slouken@1361
|
2112 |
AC_DEFINE(SDL_THREAD_WIN32)
|
slouken@1361
|
2113 |
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_sysmutex.c"
|
slouken@1361
|
2114 |
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_syssem.c"
|
slouken@1361
|
2115 |
SOURCES="$SOURCES $srcdir/src/thread/win32/SDL_systhread.c"
|
slouken@1361
|
2116 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
slouken@1361
|
2117 |
have_threads=yes
|
slouken@0
|
2118 |
fi
|
slouken@0
|
2119 |
# Set up files for the timer library
|
slouken@0
|
2120 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2121 |
AC_DEFINE(SDL_TIMER_WIN32)
|
slouken@1361
|
2122 |
SOURCES="$SOURCES $srcdir/src/timer/win32/*.c"
|
slouken@1361
|
2123 |
have_timers=yes
|
slouken@1361
|
2124 |
fi
|
slouken@1361
|
2125 |
# Set up files for the shared object loading library
|
slouken@1361
|
2126 |
if test x$enable_loadso = xyes; then
|
slouken@1361
|
2127 |
AC_DEFINE(SDL_LOADSO_WIN32)
|
slouken@1361
|
2128 |
SOURCES="$SOURCES $srcdir/src/loadso/win32/*.c"
|
slouken@1361
|
2129 |
have_loadso=yes
|
slouken@1361
|
2130 |
fi
|
slouken@1361
|
2131 |
# Set up the system libraries we need
|
slouken@1361
|
2132 |
BUILD_LIBS="$BUILD_LIBS -luser32 -lgdi32 -lwinmm"
|
slouken@1361
|
2133 |
if test x$have_directx = xyes; then
|
slouken@1361
|
2134 |
BUILD_LIBS="$BUILD_LIBS -ldxguid"
|
slouken@0
|
2135 |
fi
|
slouken@0
|
2136 |
# The Win32 platform requires special setup
|
slouken@0
|
2137 |
SDL_CFLAGS="$SDL_CFLAGS -Dmain=SDL_main"
|
slouken@1363
|
2138 |
SDL_LIBS="-lmingw32 -lSDLmain $SDL_LIBS -mwindows"
|
slouken@0
|
2139 |
;;
|
slouken@0
|
2140 |
*-*-beos*)
|
slouken@0
|
2141 |
ARCH=beos
|
slouken@0
|
2142 |
ac_default_prefix=/boot/develop/tools/gnupro
|
slouken@1
|
2143 |
CheckDummyVideo
|
slouken@68
|
2144 |
CheckDiskAudio
|
slouken@0
|
2145 |
CheckNASM
|
slouken@0
|
2146 |
CheckBWINDOW
|
slouken@0
|
2147 |
CheckBeGL
|
slouken@0
|
2148 |
# Set up files for the audio library
|
slouken@0
|
2149 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
2150 |
AC_DEFINE(SDL_AUDIO_DRIVER_BAUDIO)
|
slouken@1361
|
2151 |
SOURCES="$SOURCES $srcdir/src/audio/baudio/*.cc"
|
slouken@1361
|
2152 |
have_audio=yes
|
slouken@0
|
2153 |
fi
|
slouken@0
|
2154 |
# Set up files for the joystick library
|
slouken@0
|
2155 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2156 |
AC_DEFINE(SDL_JOYSTICK_BEOS)
|
slouken@1361
|
2157 |
SOURCES="$SOURCES $srcdir/src/joystick/beos/*.cc"
|
slouken@1361
|
2158 |
have_joystick=yes
|
slouken@0
|
2159 |
fi
|
slouken@0
|
2160 |
# Set up files for the cdrom library
|
slouken@0
|
2161 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2162 |
AC_DEFINE(SDL_CDROM_BEOS)
|
slouken@1361
|
2163 |
SOURCES="$SOURCES $srcdir/src/cdrom/beos/*.cc"
|
slouken@1361
|
2164 |
have_cdrom=yes
|
slouken@0
|
2165 |
fi
|
slouken@0
|
2166 |
# Set up files for the thread library
|
slouken@0
|
2167 |
if test x$enable_threads = xyes; then
|
slouken@1361
|
2168 |
AC_DEFINE(SDL_THREAD_BEOS)
|
slouken@1361
|
2169 |
SOURCES="$SOURCES $srcdir/src/thread/beos/*.c"
|
slouken@1361
|
2170 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_sysmutex.c"
|
slouken@1361
|
2171 |
SOURCES="$SOURCES $srcdir/src/thread/generic/SDL_syscond.c"
|
slouken@1361
|
2172 |
have_threads=yes
|
slouken@0
|
2173 |
fi
|
slouken@0
|
2174 |
# Set up files for the timer library
|
slouken@0
|
2175 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2176 |
AC_DEFINE(SDL_TIMER_BEOS)
|
slouken@1361
|
2177 |
SOURCES="$SOURCES $srcdir/src/timer/beos/*.c"
|
slouken@1361
|
2178 |
have_timers=yes
|
slouken@1361
|
2179 |
fi
|
slouken@1361
|
2180 |
# Set up files for the shared object loading library
|
slouken@1361
|
2181 |
if test x$enable_loadso = xyes; then
|
slouken@1361
|
2182 |
AC_DEFINE(SDL_LOADSO_BEOS)
|
slouken@1361
|
2183 |
SOURCES="$SOURCES $srcdir/src/loadso/beos/*.c"
|
slouken@1361
|
2184 |
have_loadso=yes
|
slouken@0
|
2185 |
fi
|
slouken@0
|
2186 |
# The BeOS platform requires special libraries
|
slouken@1361
|
2187 |
BUILD_LIBS="$BUILD_LIBS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
|
slouken@0
|
2188 |
;;
|
slouken@0
|
2189 |
*-*-darwin* )
|
icculus@1133
|
2190 |
# This could be either full "Mac OS X", or plain "Darwin" which is
|
slouken@158
|
2191 |
# just the OS X kernel sans upper layers like Carbon and Cocoa.
|
icculus@1133
|
2192 |
# Next line is broken, and a few files below require Mac OS X (full)
|
slouken@158
|
2193 |
ARCH=macosx
|
slouken@1
|
2194 |
CheckDummyVideo
|
slouken@68
|
2195 |
CheckDiskAudio
|
slouken@1361
|
2196 |
CheckDLOPEN
|
icculus@1133
|
2197 |
CheckCOCOA
|
icculus@1133
|
2198 |
CheckCARBON
|
icculus@1174
|
2199 |
CheckX11
|
slouken@0
|
2200 |
CheckMacGL
|
icculus@1191
|
2201 |
CheckOpenGLX11
|
slouken@0
|
2202 |
CheckPTHREAD
|
icculus@1047
|
2203 |
CheckAltivec
|
slouken@0
|
2204 |
# Set up files for the audio library
|
slouken@0
|
2205 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
2206 |
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO)
|
slouken@1361
|
2207 |
SOURCES="$SOURCES $srcdir/src/audio/macosx/*.c"
|
slouken@1361
|
2208 |
AC_DEFINE(SDL_AUDIO_DRIVER_SNDMGR)
|
slouken@1361
|
2209 |
SOURCES="$SOURCES $srcdir/src/audio/macrom/*.c"
|
slouken@1361
|
2210 |
have_audio=yes
|
slouken@0
|
2211 |
fi
|
slouken@0
|
2212 |
# Set up files for the joystick library
|
slouken@0
|
2213 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2214 |
AC_DEFINE(SDL_JOYSTICK_IOKIT)
|
slouken@1361
|
2215 |
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
|
slouken@1361
|
2216 |
BUILD_LIBS="$BUILD_LIBS -framework IOKit"
|
slouken@1361
|
2217 |
have_joystick=yes
|
slouken@0
|
2218 |
fi
|
slouken@0
|
2219 |
# Set up files for the cdrom library
|
slouken@0
|
2220 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2221 |
AC_DEFINE(SDL_CDROM_MACOSX)
|
slouken@1361
|
2222 |
SOURCES="$SOURCES $srcdir/src/cdrom/macosx/*.c"
|
slouken@1361
|
2223 |
have_cdrom=yes
|
slouken@0
|
2224 |
fi
|
slouken@0
|
2225 |
# Set up files for the timer library
|
slouken@0
|
2226 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2227 |
AC_DEFINE(SDL_TIMER_UNIX)
|
slouken@1361
|
2228 |
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
slouken@1361
|
2229 |
have_timers=yes
|
slouken@1361
|
2230 |
fi
|
slouken@1361
|
2231 |
# Set up files for the shared object loading library
|
slouken@1361
|
2232 |
if test x$enable_loadso = xyes -a x$have_dlopen != xyes; then
|
slouken@1361
|
2233 |
AC_DEFINE(SDL_LOADSO_DLCOMPAT)
|
slouken@1361
|
2234 |
SOURCES="$SOURCES $srcdir/src/loadso/macosx/*.c"
|
slouken@1361
|
2235 |
have_loadso=yes
|
slouken@0
|
2236 |
fi
|
slouken@387
|
2237 |
# The MacOS X platform requires special setup.
|
slouken@1361
|
2238 |
AC_DEFINE(TARGET_API_MAC_CARBON)
|
slouken@1361
|
2239 |
BUILD_CFLAGS="$BUILD_CFLAGS -fpascal-strings -DMACOSX"
|
slouken@387
|
2240 |
SDL_LIBS="-lSDLmain $SDL_LIBS"
|
icculus@1133
|
2241 |
if test x$enable_video_cocoa = xyes; then
|
slouken@1361
|
2242 |
BUILD_LIBS="$BUILD_LIBS -framework Cocoa"
|
icculus@1133
|
2243 |
fi
|
icculus@1133
|
2244 |
if test x$enable_video_carbon = xyes -o x$enable_video_cocoa = xyes; then
|
icculus@1133
|
2245 |
# The Cocoa backend still needs Carbon, and the YUV code QuickTime
|
slouken@1361
|
2246 |
BUILD_LIBS="$BUILD_LIBS -framework Carbon -framework QuickTime"
|
icculus@1133
|
2247 |
fi
|
slouken@1361
|
2248 |
# If either the audio or CD driver is used, add the AudioUnit framework
|
slouken@1361
|
2249 |
if test x$enable_audio = xyes -o x$enable_cdrom = xyes; then
|
slouken@1361
|
2250 |
BUILD_LIBS="$BUILD_LIBS -framework AudioToolbox -framework AudioUnit"
|
slouken@1361
|
2251 |
fi
|
slouken@0
|
2252 |
;;
|
slouken@281
|
2253 |
*-*-mint*)
|
slouken@281
|
2254 |
ARCH=mint
|
slouken@281
|
2255 |
CheckDummyVideo
|
slouken@281
|
2256 |
CheckDiskAudio
|
slouken@281
|
2257 |
CheckAtariBiosEvent
|
slouken@281
|
2258 |
CheckAtariXbiosVideo
|
slouken@281
|
2259 |
CheckAtariGemVideo
|
slouken@398
|
2260 |
CheckAtariAudio
|
patmandin@651
|
2261 |
CheckAtariLdg
|
slouken@1361
|
2262 |
CheckAtariOSMesa
|
slouken@281
|
2263 |
CheckPTH
|
slouken@281
|
2264 |
# Set up files for the audio library
|
slouken@398
|
2265 |
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
slouken@398
|
2266 |
if test x$enable_audio = xyes; then
|
slouken@1361
|
2267 |
AC_DEFINE(SDL_AUDIO_DRIVER_SUNAUDIO)
|
slouken@1361
|
2268 |
SOURCES="$SOURCES $srcdir/src/audio/sun/*.c"
|
slouken@1361
|
2269 |
have_audio=yes
|
slouken@398
|
2270 |
fi
|
slouken@281
|
2271 |
fi
|
slouken@281
|
2272 |
# Set up files for the joystick library
|
slouken@281
|
2273 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2274 |
AC_DEFINE(SDL_JOYSTICK_MINT)
|
slouken@1361
|
2275 |
SOURCES="$SOURCES $srcdir/src/joystick/mint/*.c"
|
slouken@1361
|
2276 |
have_joystick=yes
|
slouken@281
|
2277 |
fi
|
slouken@281
|
2278 |
# Set up files for the cdrom library
|
slouken@281
|
2279 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2280 |
AC_DEFINE(SDL_CDROM_MINT)
|
slouken@1361
|
2281 |
SOURCES="$SOURCES $srcdir/src/cdrom/mint/*.c"
|
slouken@1361
|
2282 |
have_cdrom=yes
|
slouken@281
|
2283 |
fi
|
slouken@281
|
2284 |
# Set up files for the timer library
|
slouken@281
|
2285 |
if test x$enable_timers = xyes; then
|
slouken@557
|
2286 |
if test x$enable_threads = xyes -a x$enable_pth = xyes; then
|
slouken@1361
|
2287 |
AC_DEFINE(SDL_TIMER_UNIX)
|
slouken@1361
|
2288 |
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
|
slouken@557
|
2289 |
else
|
slouken@1361
|
2290 |
AC_DEFINE(SDL_TIMER_MINT)
|
slouken@1361
|
2291 |
SOURCES="$SOURCES $srcdir/src/timer/mint/*.c"
|
slouken@557
|
2292 |
fi
|
slouken@1361
|
2293 |
have_timers=yes
|
slouken@281
|
2294 |
fi
|
slouken@281
|
2295 |
# MiNT does not define "unix"
|
slouken@1361
|
2296 |
BUILD_CFLAGS="$BUILD_CFLAGS -Dunix"
|
slouken@281
|
2297 |
;;
|
slouken@1035
|
2298 |
*-riscos)
|
slouken@687
|
2299 |
ARCH=riscos
|
slouken@1361
|
2300 |
CheckOSS
|
slouken@1361
|
2301 |
CheckPTHREAD
|
slouken@955
|
2302 |
# Set up files for the video library
|
slouken@955
|
2303 |
if test x$enable_video = xyes; then
|
slouken@1361
|
2304 |
AC_DEFINE(SDL_VIDEO_DRIVER_RISCOS)
|
slouken@1361
|
2305 |
SOURCES="$SOURCES $srcdir/src/video/riscos/*.c"
|
slouken@1361
|
2306 |
have_video=yes
|
slouken@955
|
2307 |
fi
|
slouken@955
|
2308 |
# Set up files for the joystick library
|
slouken@955
|
2309 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2310 |
AC_DEFINE(SDL_JOYSTICK_RISCOS)
|
slouken@1361
|
2311 |
SOURCES="$SOURCES $srcdir/src/joystick/riscos/*.c"
|
slouken@1361
|
2312 |
have_joystick=yes
|
slouken@955
|
2313 |
fi
|
slouken@955
|
2314 |
# Set up files for the timer library
|
slouken@955
|
2315 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2316 |
AC_DEFINE(SDL_TIMER_RISCOS)
|
slouken@1361
|
2317 |
SOURCES="$SOURCES $srcdir/src/timer/riscos/*.c"
|
slouken@1361
|
2318 |
have_timers=yes
|
slouken@955
|
2319 |
fi
|
slouken@1361
|
2320 |
# The RISC OS platform requires special setup.
|
slouken@1361
|
2321 |
BUILD_LIBS="$BUILD_LIBS -ljpeg -ltiff -lpng -lz"
|
slouken@687
|
2322 |
;;
|
slouken@0
|
2323 |
*)
|
slouken@1361
|
2324 |
AC_MSG_ERROR([
|
slouken@1361
|
2325 |
*** Unsupported target: Please add to configure.in
|
slouken@1361
|
2326 |
])
|
slouken@0
|
2327 |
;;
|
slouken@0
|
2328 |
esac
|
slouken@0
|
2329 |
|
slouken@1361
|
2330 |
# Verify that we have all the platform specific files we need
|
slouken@1361
|
2331 |
if test x$have_joystick != xyes; then
|
slouken@1361
|
2332 |
if test x$enable_joystick = xyes; then
|
slouken@1361
|
2333 |
AC_DEFINE(SDL_JOYSTICK_DISABLED)
|
slouken@1361
|
2334 |
fi
|
slouken@1361
|
2335 |
SOURCES="$SOURCES $srcdir/src/joystick/dummy/*.c"
|
slouken@1361
|
2336 |
fi
|
slouken@1361
|
2337 |
if test x$have_cdrom != xyes; then
|
slouken@1361
|
2338 |
if test x$enable_cdrom = xyes; then
|
slouken@1361
|
2339 |
AC_DEFINE(SDL_CDROM_DISABLED)
|
slouken@1361
|
2340 |
fi
|
slouken@1361
|
2341 |
SOURCES="$SOURCES $srcdir/src/cdrom/dummy/*.c"
|
slouken@1361
|
2342 |
fi
|
slouken@1361
|
2343 |
if test x$have_threads != xyes; then
|
slouken@1361
|
2344 |
if test x$enable_threads = xyes; then
|
slouken@1361
|
2345 |
AC_DEFINE(SDL_THREADS_DISABLED)
|
slouken@1361
|
2346 |
fi
|
slouken@1361
|
2347 |
SOURCES="$SOURCES $srcdir/src/thread/generic/*.c"
|
slouken@1361
|
2348 |
fi
|
slouken@1361
|
2349 |
if test x$have_timers != xyes; then
|
slouken@1361
|
2350 |
if test x$enable_timers = xyes; then
|
slouken@1361
|
2351 |
AC_DEFINE(SDL_TIMERS_DISABLED)
|
slouken@1361
|
2352 |
fi
|
slouken@1361
|
2353 |
SOURCES="$SOURCES $srcdir/src/timer/dummy/*.c"
|
slouken@1361
|
2354 |
fi
|
slouken@1361
|
2355 |
if test x$have_loadso != xyes; then
|
slouken@1361
|
2356 |
if test x$enable_loadso = xyes; then
|
slouken@1361
|
2357 |
AC_DEFINE(SDL_LOADSO_DISABLED)
|
slouken@1361
|
2358 |
fi
|
slouken@1361
|
2359 |
SOURCES="$SOURCES $srcdir/src/loadso/dummy/*.c"
|
slouken@1361
|
2360 |
fi
|
slouken@0
|
2361 |
|
slouken@1361
|
2362 |
OBJECTS=`echo $SOURCES | sed 's,[[^ ]]*/\([[^ ]]*\)\.asm,$(objects)/\1.lo,g'`
|
slouken@1361
|
2363 |
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.cc,$(objects)/\1.lo,g'`
|
slouken@1361
|
2364 |
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.m,$(objects)/\1.lo,g'`
|
slouken@1361
|
2365 |
OBJECTS=`echo $OBJECTS | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
|
slouken@0
|
2366 |
|
slouken@0
|
2367 |
# Set runtime shared library paths as needed
|
slouken@0
|
2368 |
|
slouken@1127
|
2369 |
if test "x$enable_rpath" = "xyes"; then
|
slouken@1127
|
2370 |
if test $ARCH = linux -o $ARCH = freebsd -o $ARCH = bsdi; then
|
slouken@1127
|
2371 |
SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib"
|
slouken@1127
|
2372 |
fi
|
slouken@1127
|
2373 |
if test $ARCH = solaris; then
|
slouken@1127
|
2374 |
SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
|
slouken@1127
|
2375 |
fi
|
slouken@1127
|
2376 |
else
|
slouken@1127
|
2377 |
SDL_RLD_FLAGS=""
|
slouken@0
|
2378 |
fi
|
slouken@387
|
2379 |
|
slouken@387
|
2380 |
case "$ARCH" in
|
slouken@401
|
2381 |
openbsd | netbsd | bsdi)
|
slouken@257
|
2382 |
SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
|
slouken@387
|
2383 |
;;
|
slouken@663
|
2384 |
qnx)
|
slouken@663
|
2385 |
SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
|
slouken@663
|
2386 |
;;
|
slouken@387
|
2387 |
macosx)
|
icculus@1133
|
2388 |
SHARED_SYSTEM_LIBS=""
|
icculus@1133
|
2389 |
if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
|
icculus@1133
|
2390 |
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Cocoa"
|
icculus@1133
|
2391 |
fi
|
icculus@1133
|
2392 |
if test x$enable_video = xyes -a x$enable_video_carbon = xyes; then
|
icculus@1133
|
2393 |
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework Carbon"
|
icculus@1133
|
2394 |
fi
|
slouken@387
|
2395 |
if test x$enable_video = xyes -a x$enable_video_opengl = xyes; then
|
slouken@387
|
2396 |
SHARED_SYSTEM_LIBS="$SHARED_SYSTEM_LIBS -framework OpenGL"
|
slouken@387
|
2397 |
fi
|
slouken@387
|
2398 |
;;
|
slouken@387
|
2399 |
*)
|
slouken@257
|
2400 |
SHARED_SYSTEM_LIBS=""
|
slouken@387
|
2401 |
;;
|
slouken@387
|
2402 |
esac
|
slouken@387
|
2403 |
|
slouken@807
|
2404 |
case "$ARCH" in
|
slouken@807
|
2405 |
macosx)
|
slouken@807
|
2406 |
# Evil hack to allow static linking on Mac OS X
|
slouken@807
|
2407 |
SDL_STATIC_LIBS="\${exec_prefix}/lib/libSDLmain.a \${exec_prefix}/lib/libSDL.a"
|
slouken@807
|
2408 |
;;
|
slouken@807
|
2409 |
*)
|
slouken@807
|
2410 |
SDL_STATIC_LIBS="$SDL_LIBS"
|
slouken@807
|
2411 |
;;
|
slouken@807
|
2412 |
esac
|
slouken@807
|
2413 |
|
slouken@257
|
2414 |
STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
|
slouken@1
|
2415 |
|
slouken@0
|
2416 |
dnl Expand the cflags and libraries needed by apps using SDL
|
slouken@0
|
2417 |
AC_SUBST(SDL_CFLAGS)
|
slouken@0
|
2418 |
AC_SUBST(SDL_LIBS)
|
slouken@807
|
2419 |
AC_SUBST(SDL_STATIC_LIBS)
|
slouken@0
|
2420 |
AC_SUBST(SDL_RLD_FLAGS)
|
slouken@1361
|
2421 |
if test x$enable_shared = xyes; then
|
slouken@1361
|
2422 |
ENABLE_SHARED_TRUE=
|
slouken@1361
|
2423 |
ENABLE_SHARED_FALSE="#"
|
slouken@1361
|
2424 |
else
|
slouken@1361
|
2425 |
ENABLE_SHARED_TRUE="#"
|
slouken@1361
|
2426 |
ENABLE_SHARED_FALSE=
|
slouken@1361
|
2427 |
fi
|
slouken@1361
|
2428 |
if test x$enable_static = xyes; then
|
slouken@1361
|
2429 |
ENABLE_STATIC_TRUE=
|
slouken@1361
|
2430 |
ENABLE_STATIC_FALSE="#"
|
slouken@1361
|
2431 |
else
|
slouken@1361
|
2432 |
ENABLE_STATIC_TRUE="#"
|
slouken@1361
|
2433 |
ENABLE_STATIC_FALSE=
|
slouken@1361
|
2434 |
fi
|
slouken@1361
|
2435 |
AC_SUBST(ENABLE_SHARED_TRUE)
|
slouken@1361
|
2436 |
AC_SUBST(ENABLE_SHARED_FALSE)
|
slouken@1361
|
2437 |
AC_SUBST(ENABLE_STATIC_TRUE)
|
slouken@1361
|
2438 |
AC_SUBST(ENABLE_STATIC_FALSE)
|
slouken@0
|
2439 |
|
slouken@257
|
2440 |
dnl Expand the libraries needed for static and dynamic linking
|
slouken@257
|
2441 |
AC_SUBST(STATIC_SYSTEM_LIBS)
|
slouken@257
|
2442 |
AC_SUBST(SHARED_SYSTEM_LIBS)
|
slouken@261
|
2443 |
AC_SUBST(SYSTEM_LIBS)
|
slouken@257
|
2444 |
|
slouken@1361
|
2445 |
dnl Expand the sources and objects needed to build the library
|
slouken@1361
|
2446 |
AC_SUBST(ac_aux_dir)
|
slouken@1361
|
2447 |
AC_SUBST(INCLUDE)
|
slouken@1361
|
2448 |
AC_SUBST(SOURCES)
|
slouken@1361
|
2449 |
AC_SUBST(OBJECTS)
|
slouken@1361
|
2450 |
AC_SUBST(BUILD_CFLAGS)
|
slouken@1361
|
2451 |
AC_SUBST(BUILD_LIBS)
|
slouken@158
|
2452 |
|
slouken@0
|
2453 |
AC_OUTPUT([
|
slouken@1361
|
2454 |
Makefile sdl-config SDL.spec SDL.qpg
|
slouken@1361
|
2455 |
], [
|
slouken@1361
|
2456 |
: >build-deps
|
slouken@1361
|
2457 |
make depend
|
slouken@1361
|
2458 |
])
|