1
2 /*
3 * features.c - List of compile time selectable features
4 *
5 * Written by
6 * groepaz <groepaz@gmx.net>
7 * Marco van den Heuvel <blackystardust68@yahoo.com>
8 *
9 * This file is part of VICE, the Versatile Commodore Emulator.
10 * See README for copyright notice.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
25 * 02111-1307 USA.
26 *
27 */
28
29 #include "vice.h"
30
31 #include <stdlib.h>
32
33 #include "debug.h"
34 #include "vicefeatures.h"
35
36 /* FIXME: define "UNIX" for all supported unixish OS */
37 #if !defined(BEOS_COMPILE) && !defined(AMIGA_SUPPORT) && !defined(WIN32)
38 # define UNIX
39 #endif
40
41 static const feature_list_t featurelist[] = {
42 #ifdef UNIX /* unix */
43 { "BSD_JOYSTICK", "Enable support for BSD style joysticks.",
44 #ifndef BSD_JOYSTICK
45 0 },
46 #else
47 1 },
48 #endif
49 #endif
50 /* all */
51 { "DEBUG", "Enable debugging code",
52 #ifndef DEBUG
53 0 },
54 #else
55 1 },
56 #endif
57 /* all */
58 { "HAVE_DEBUG_THREADS", "Enable thread debugging code",
59 #ifdef HAVE_DEBUG_THREADS
60 1 },
61 #else
62 0 },
63 #endif
64 /* (all) */
65 { "FEATURE_CPUMEMHISTORY", "Use the memmap feature.",
66 #ifndef FEATURE_CPUMEMHISTORY
67 0 },
68 #else
69 1 },
70 #endif
71 #ifdef UNIX /* (unix) */
72 { "HAS_DIGITAL_JOYSTICK", "Enable emulation for digital joysticks.",
73 #ifndef HAS_DIGITAL_JOYSTICK
74 0 },
75 #else
76 1 },
77 #endif
78 #endif
79 #ifdef MACOSX_SUPPORT /* (osx) */
80 { "HAS_HIDMGR", "Enable Mac IOHIDManager Joystick driver.",
81 #ifndef HAS_HIDMGR
82 0 },
83 #else
84 1 },
85 #endif
86 #endif
87 #ifdef UNIX /* (unix) */
88 { "HAS_USB_JOYSTICK", "Enable emulation for USB joysticks.",
89 #ifndef HAS_USB_JOYSTICK
90 0 },
91 #else
92 1 },
93 #endif
94 #endif
95 #if defined(MACOSX_SUPPORT) /* (osx) */
96 { "HAVE_AUDIO_UNIT", "Enable AudioUnit support.",
97 #ifndef HAVE_AUDIO_UNIT
98 0 },
99 #else
100 1 },
101 #endif
102 #endif
103 #if defined(AMIGA_SUPPORT) || defined(BEOS_COMPILE) || defined(UNIX) || defined(WIN32) /* (amiga/beos/unix/windows) */
104 { "HAVE_CATWEASELMKIII", "Support for Catweasel MKIII.",
105 #ifndef HAVE_CATWEASELMKIII
106 0 },
107 #else
108 1 },
109 #endif
110 #endif
111 #ifdef AMIGA_SUPPORT /* (amiga) */
112 { "HAVE_DEVICES_AHI_H", "Define to 1 if you have the <devices/ahi.h> header file.",
113 #ifndef HAVE_DEVICES_AHI_H
114 0 },
115 #else
116 1 },
117 #endif
118 #endif
119 #ifdef WIN32 /* (windows) */
120 { "HAVE_DINPUT", "Use DirectInput joystick driver",
121 #ifndef HAVE_DINPUT
122 0 },
123 #else
124 1 },
125 #endif
126 #endif
127 #if defined(UNIX) || defined(MACOSX_SUPPORT) || defined(WIN32) /* (unix/osx/windows) */
128 { "HAVE_DYNLIB_SUPPORT", "Support for dynamic library loading.",
129 #ifndef HAVE_DYNLIB_SUPPORT
130 0 },
131 #else
132 1 },
133 #endif
134 #endif
135 /* (all) */
136 { "HAVE_FFMPEG", "Have FFMPEG av* libs available",
137 #ifndef HAVE_FFMPEG
138 0 },
139 #else
140 1 },
141 #endif
142 /* (all) */
143 { "HAVE_FFMPEG_HEADER_SUBDIRS", "FFMPEG uses subdirs for headers",
144 #ifndef HAVE_FFMPEG_HEADER_SUBDIRS
145 0 },
146 #else
147 1 },
148 #endif
149 /* (all) */
150 { "HAVE_FFMPEG_SWSCALE", "Have FFMPEG swscale lib available",
151 #ifndef HAVE_FFMPEG_SWSCALE
152 0 },
153 #else
154 1 },
155 #endif
156 /* (all) */
157 { "HAVE_FFMPEG_SWRESAMPLE", "Have FFMPEG swresample lib available",
158 #ifndef HAVE_FFMPEG_SWRESAMPLE
159 0 },
160 #else
161 1 },
162 #endif
163 /* (all) */
164 { "HAVE_FFMPEG_AVRESAMPLE", "Have FFMPEG avresample lib available",
165 #ifndef HAVE_FFMPEG_AVRESAMPLE
166 0 },
167 #else
168 1 },
169 #endif
170 /* (all) */
171 { "SHARED_FFMPEG", "FFMPEG libraries are shared",
172 #ifndef SHARED_FFMPEG
173 0 },
174 #else
175 1 },
176 #endif
177 /* (all) */
178 { "STATIC_FFMPEG", "FFMPEG libraries are static",
179 #ifndef STATIC_FFMPEG
180 0 },
181 #else
182 1 },
183 #endif
184 /* (all) */
185 { "HAVE_GIF", "Can we use the GIF or UNGIF library?",
186 #ifndef HAVE_GIF
187 0 },
188 #else
189 1 },
190 #endif
191 #if defined(AMIGA_SUPPORT) || defined(BEOS_COMPILE) || defined(UNIX) || defined(WIN32) /* (amiga/beos/unix/windows) */
192 { "HAVE_HARDSID", "Support for HardSID.",
193 #ifndef HAVE_HARDSID
194 0 },
195 #else
196 1 },
197 #endif
198 #endif
199 #if defined(AMIGA_SUPPORT) || defined(USE_SDLUI) || defined(USE_SDLUI2) || defined(UNIX) || defined(MACOSX_SUPPORT) || defined(WIN32) /* (amiga/sdl/unix/osx/windows) */
200 { "HAVE_HWSCALE", "Enable arbitrary window scaling",
201 #ifndef HAVE_HWSCALE
202 0 },
203 #else
204 1 },
205 #endif
206 #endif
207 /* (all) */
208 { "HAVE_IPV6", "Define if ipv6 can be used",
209 #ifndef HAVE_IPV6
210 0 },
211 #else
212 1 },
213 #endif
214 /* (all) */
215 { "HAVE_JPEG", "Can we use the JPEG library?",
216 #ifndef HAVE_JPEG
217 0 },
218 #else
219 1 },
220 #endif
221 #if defined(UNIX) || defined(WIN32) /* (unix/windows) */
222 { "HAVE_LIBIEEE1284", "Define to 1 if you have the `ieee1284' library", /* (-lieee1284) */
223 #ifndef HAVE_LIBIEEE1284
224 0 },
225 #else
226 1 },
227 #endif
228 #endif
229 #if defined(UNIX) || defined(MACOSX_SUPPORT) || defined(WIN32) /* (unix/osx/windows) */
230 { "HAVE_MIDI", "Enable MIDI emulation.",
231 #ifndef HAVE_MIDI
232 0 },
233 #else
234 1 },
235 #endif
236 #endif
237 /* (all) */
238 { "HAVE_MOUSE", "Enable mouse/paddle support",
239 #ifndef HAVE_MOUSE
240 0 },
241 #else
242 1 },
243 #endif
244 /* (all) */
245 { "HAVE_LIGHTPEN", "Enable lightpen support",
246 #if !defined(HAVE_MOUSE) || !defined(HAVE_LIGHTPEN)
247 0 },
248 #else
249 1 },
250 #endif
251 /* (all) */
252 { "HAVE_NETWORK", "Enable netplay support",
253 #ifndef HAVE_NETWORK
254 0 },
255 #else
256 1 },
257 #endif
258 #if defined(UNIX) || defined(WIN32) /* (unix/windows) */
259 { "HAVE_REALDEVICE", "Support for OpenCBM", /* (former CBM4Linux). */
260 #ifndef HAVE_REALDEVICE
261 0 },
262 #else
263 1 },
264 #endif
265 #endif
266 /* (all) */
267 { "HAVE_PANGO", "Enable support for Pango",
268 #ifndef HAVE_PANGO
269 0 },
270 #else
271 1 },
272 #endif
273 #if defined(BEOS_COMPILE) || defined(UNIX) || defined(WIN32) /* (beos/unix/windows) */
274 { "HAVE_PARSID", "Support for ParSID.",
275 #ifndef HAVE_PARSID
276 0 },
277 #else
278 1 },
279 #endif
280 #endif
281 /* (all) */
282 { "HAVE_PNG", "Can we use the PNG library?",
283 #ifndef HAVE_PNG
284 0 },
285 #else
286 1 },
287 #endif
288 #ifdef AMIGA_SUPPORT /* (amiga) */
289 { "HAVE_PROTO_OPENPCI_H", "Define to 1 if you have the <proto/openpci.h> header file.",
290 #ifndef HAVE_PROTO_OPENPCI_H
291 0 },
292 #else
293 1 },
294 #endif
295 #endif
296 /* (all) */
297 { "HAVE_FASTSID", "Enable FASTSID support.",
298 #ifndef HAVE_FASTSID
299 0 },
300 #else
301 1 },
302 #endif
303 /* (all) */
304 { "HAVE_RESID", "Enable ReSID support.",
305 #ifndef HAVE_RESID
306 0 },
307 #else
308 1 },
309 #endif
310 #ifdef HAVE_RESID
311 /* (all) */
312 { "HAVE_NEW_8580_FILTER", "Enable experimental new 8580 Filter emulation.",
313 #ifndef HAVE_NEW_8580_FILTER
314 0 },
315 #else
316 1 },
317 #endif
318 #endif
319 /* (all) */
320 { "HAVE_RESID_DTV", "Enable ReSID-DTV support.",
321 #ifndef HAVE_RESID_DTV
322 0 },
323 #else
324 1 },
325 #endif
326 /* (all) */
327 { "HAVE_RS232DEV", "Enable RS232 emulation.",
328 #ifndef HAVE_RS232DEV
329 0 },
330 #else
331 1 },
332 #endif
333 /* (all) */
334 { "HAVE_RS232NET", "Enable RS232 emulation. (via network)",
335 #ifndef HAVE_RS232NET
336 0 },
337 #else
338 1 },
339 #endif
340 #if defined(USE_SDLUI) || defined(USE_SDLUI2) /* (sdl) */
341 { "HAVE_SDL_NUMJOYSTICKS", "Define to 1 if you have the `SDL_NumJoysticks' function.",
342 #ifndef HAVE_SDL_NUMJOYSTICKS
343 0 },
344 #else
345 1 },
346 #endif
347 #endif
348 #if defined(AMIGA_SUPPORT) || defined(BEOS_COMPILE) || defined(UNIX) || defined(WIN32) /* (amiga/beos/unix/windows) */
349 { "HAVE_SSI2001", "Support for SSI-2001.",
350 #ifndef HAVE_SSI2001
351 0 },
352 #else
353 1 },
354 #endif
355 #endif
356 #if defined(UNIX) /* (unix) */
357 { "HAVE_SYS_AUDIO_H", "Define to 1 if you have the <sys/audio.h> header file.",
358 #ifndef HAVE_SYS_AUDIO_H
359 0 },
360 #else
361 1 },
362 #endif
363 #endif
364 #if defined(UNIX) /* (unix) */
365 { "HAVE_SYS_AUDIOIO_H", "Define to 1 if you have the <sys/audioio.h> header file.",
366 #ifndef HAVE_SYS_AUDIOIO_H
367 0 },
368 #else
369 1 },
370 #endif
371 #endif
372 /* (all) */
373 { "HAVE_RAWNET", "Enable raw ethernet emulation.",
374 #ifndef HAVE_RAWNET
375 0 },
376 #else
377 1 },
378 #endif
379 /* (all) */
380 { "HAVE_PCAP", "Support for PCAP library.",
381 #ifndef HAVE_PCAP
382 0 },
383 #else
384 1 },
385 #endif
386 /* (all) */
387 { "HAVE_TUNTAP", "Support for TUN/TAP virtual network interface.",
388 #ifndef HAVE_TUNTAP
389 0 },
390 #else
391 1 },
392 #endif
393 /* (all) */
394 { "HAVE_X64_IMAGE", "Support for X64 image files",
395 #ifndef HAVE_X64_IMAGE
396 0 },
397 #else
398 1 },
399 #endif
400
401 /* (all) */
402 { "HAVE_ZLIB", "Can we use the ZLIB compression library?",
403 #ifndef HAVE_ZLIB
404 0 },
405 #else
406 1 },
407 #endif
408 #ifdef UNIX /* (unix) */
409 { "LINUX_JOYSTICK", "Enable support for Linux style joysticks.",
410 #ifndef LINUX_JOYSTICK
411 0 },
412 #else
413 1 },
414 #endif
415 #endif
416 #ifdef MACOSX_SUPPORT /* (osx) */
417 { "MAC_JOYSTICK", "Enable Mac Joystick support.",
418 #ifndef MAC_JOYSTICK
419 0 },
420 #else
421 1 },
422 #endif
423 #endif
424 #if defined(UNIX) /* (unix) */
425 { "USE_ALSA", "Enable alsa support.",
426 #ifndef USE_ALSA
427 0 },
428 #else
429 1 },
430 #endif
431 #endif
432 #if defined(MACOSX_SUPPORT) /* (osx) */
433 { "USE_COREAUDIO", "Enable CoreAudio support.",
434 #ifndef USE_COREAUDIO
435 0 },
436 #else
437 1 },
438 #endif
439 #endif
440 #if defined(WIN32) /* (windows) */
441 { "USE_DXSOUND", "Enable directx sound support.",
442 #ifndef USE_DXSOUND
443 0 },
444 #else
445 1 },
446 #endif
447 #endif
448 /* (all) */
449 { "USE_EMBEDDED", "Use embedded data files.",
450 #ifndef USE_EMBEDDED
451 0 },
452 #else
453 1 },
454 #endif
455 /* (all) */
456 { "USE_LAMEMP3", "Enable lamemp3 encoding support.",
457 #ifndef USE_LAMEMP3
458 0 },
459 #else
460 1 },
461 #endif
462 /* (all) */
463 { "USE_PORTAUDIO", "Enable portaudio sound input support.",
464 #ifndef USE_PORTAUDIO
465 0 },
466 #else
467 1 },
468 #endif
469 /* (all) */
470 { "USE_MPG123", "Enable mp3 decoding support.",
471 #ifndef USE_MPG123
472 0 },
473 #else
474 1 },
475 #endif
476 /* (all) */
477 { "USE_FLAC", "Enable flac support.",
478 #ifndef USE_FLAC
479 0 },
480 #else
481 1 },
482 #endif
483 /* (all) */
484 { "USE_VORBIS", "Enable ogg/vorbis support.",
485 #ifndef USE_VORBIS
486 0 },
487 #else
488 1 },
489 #endif
490 #if defined(UNIX) /* (unix) */
491 { "USE_OSS", "Enable oss support.",
492 #ifndef USE_OSS
493 0 },
494 #else
495 1 },
496 #endif
497 #endif
498 /* (all) */
499 { "USE_PULSE", "Enable pulseaudio support.",
500 #ifndef USE_PULSE
501 0 },
502 #else
503 1 },
504 #endif
505 /* (all) */
506 { "USE_SDL_AUDIO", "Enable SDL sound support.",
507 #ifndef USE_SDL_AUDIO
508 0 },
509 #else
510 1 },
511 #endif
512 #if 0
513 # ifdef UNIX /* (unix) */
514 { "USE_UI_THREADS", "Enable multithreaded UI.",
515 # ifndef USE_UI_THREADS
516 0 },
517 # else
518 1 },
519 # endif
520 # endif
521 #endif
522
523 /*
524 * Used in Gtk3 for Unix. Gtk3 can also use fontconfig as a backend on MacOS
525 * and Windows.
526 */
527 { "HAVE_FONTCONFIG", "Fontconfig support for dynamical font loading.",
528 #ifndef HAVE_FONTCONFIG
529 0 },
530 #else
531 1 },
532 #endif
533
534 /* Gtk3UI debubbing support */
535 { "HAVE_DEBUG_GTK3UI", "Enable debugging messages in the Gtk3 UI.",
536 #ifndef HAVE_DEBUG_GTK3UI
537 0 },
538 #else
539 1 },
540 #endif
541
542 { NULL, NULL, 0 }
543 };
544
vice_get_feature_list(void)545 const feature_list_t *vice_get_feature_list(void)
546 {
547 return &featurelist[0];
548 }
549