1/* 2 * SPDX-License-Identifier: GPL-2.0-or-later 3 * 4 * Copyright (C) 2020-2021 The DOSBox Staging Team 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License along 17 * with this program; if not, write to the Free Software Foundation, Inc., 18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 */ 20 21#ifndef DOSBOX_CONFIG_H 22#define DOSBOX_CONFIG_H 23 24/* Version and branding tweaks 25 */ 26 27// Emulator version 28#define VERSION "@version@" 29 30/* Operating System 31 */ 32 33// Defined if compiling for OS from BSD family 34#mesondefine BSD 35 36// Defined if compiling for Linux (non-Android) 37#mesondefine LINUX 38 39// Defined if compiling for macOS 40#mesondefine MACOSX 41 42// Defined if compiling for Windows (any option) 43#mesondefine WIN32 44 45/* CPU and FPU emulation 46 * 47 * These defines are mostly relevant to modules src/cpu/ and src/fpu/ 48 */ 49 50// The type of cpu this target has 51#mesondefine C_TARGETCPU 52 53// Define to 1 if target CPU supports unaligned memory access 54#mesondefine C_UNALIGNED_MEMORY 55 56// Define to 1 to use x86/x86_64 dynamic cpu core 57// Can not be used together with C_DYNREC 58#mesondefine C_DYNAMIC_X86 59 60// Define to 1 to use recompiling cpu core 61// Can not be used together with C_DYNAMIC_X86 62#mesondefine C_DYNREC 63 64// Define to 1 to enable floating point emulation 65#mesondefine C_FPU 66 67// Define to 1 to use fpu core implemented in x86 assembler 68#mesondefine C_FPU_X86 69 70// TODO Define to 1 to use inlined memory functions in cpu core 71#define C_CORE_INLINE 1 72 73/* Emulator features 74 * 75 * Turn on or off optional emulator features that depend on external libraries. 76 * This way it's easier to port or package on a new platform, where these 77 * libraries might be missing. 78 */ 79 80// Define to 1 to enable internal modem emulation (using SDL2_net) 81#mesondefine C_MODEM 82 83// Define to 1 to enable IPX over Internet networking (using SDL2_net) 84#mesondefine C_IPX 85 86// Enable serial port passthrough support 87#mesondefine C_DIRECTSERIAL 88 89// Define to 1 to use opengl display output support 90#mesondefine C_OPENGL 91 92// Define to 1 to enable FluidSynth integration (built-in MIDI synth) 93#mesondefine C_FLUIDSYNTH 94 95// Define to 1 to enable libslirp Ethernet support 96#mesondefine C_SLIRP 97 98// Define to 1 to enable Novell NE 2000 NIC emulation 99#mesondefine C_NE2000 100 101// Define to 1 to enable screenshots in .png format 102#mesondefine C_SSHOT 103 104// Define to 1 to enable internal debugger (using ncurses or pdcurses) 105#mesondefine C_DEBUG 106 107// Define to 1 to enable heavy debugging (requires C_DEBUG) 108#mesondefine C_HEAVY_DEBUG 109 110// Define to 1 to enable MT-32 emulator 111#mesondefine C_MT32EMU 112 113// Compiler supports Core Audio headers 114#mesondefine C_COREAUDIO 115 116// Compiler supports Core MIDI headers 117#mesondefine C_COREMIDI 118 119// Compiler supports Core Foundation headers 120#mesondefine C_COREFOUNDATION 121 122// Define to 1 to enable ALSA MIDI support 123#mesondefine C_ALSA 124 125/* Compiler features and extensions 126 * 127 * These are defines for compiler features we can't reliably verify during 128 * compilation time. 129 */ 130 131#mesondefine C_HAS_BUILTIN_EXPECT 132 133/* Defines for checking availability of standard functions and structs. 134 * 135 * Sometimes available functions, structs, or struct fields differ slightly 136 * between operating systems. 137 */ 138 139// Defined if function clock_gettime is available 140#mesondefine HAVE_CLOCK_GETTIME 141 142// Defined if function __builtin_available is available 143#mesondefine HAVE_BUILTIN_AVAILABLE 144 145// Defined if function __builtin___clear_cache is available 146#mesondefine HAVE_BUILTIN_CLEAR_CACHE 147 148// Defined if function mprotect is available 149#mesondefine HAVE_MPROTECT 150 151// Defined if function mmap is available 152#mesondefine HAVE_MMAP 153 154// Defined if mmap flag MAPJIT is available 155#mesondefine HAVE_MAP_JIT 156 157// Defined if function pthread_jit_write_protect_np is available 158#mesondefine HAVE_PTHREAD_WRITE_PROTECT_NP 159 160// Defined if function sys_icache_invalidate is available 161#mesondefine HAVE_SYS_ICACHE_INVALIDATE 162 163// Defined if function pthread_setname_np is available 164#mesondefine HAVE_PTHREAD_SETNAME_NP 165 166// Defined if function realpath is available 167#mesondefine HAVE_REALPATH 168 169// Defind if function setpriority is available 170#mesondefine HAVE_SETPRIORITY 171 172// field d_type in struct dirent is not defined in POSIX 173// Some OSes do not implement it (e.g. Haiku) 174#mesondefine HAVE_STRUCT_DIRENT_D_TYPE 175 176/* Available headers 177 * 178 * Checks for non-POSIX headers and POSIX headers not supported on Windows. 179 */ 180 181#mesondefine HAVE_NETINET_IN_H 182#mesondefine HAVE_PWD_H 183#define HAVE_STDLIB_H 1 184#mesondefine HAVE_STRINGS_H 185#mesondefine HAVE_SYS_SOCKET_H 186#define HAVE_SYS_TYPES_H 1 187 188/* Hardware-related defines 189 */ 190 191// Define to 1 when host/target processor uses big endian byte ordering 192#mesondefine WORDS_BIGENDIAN 193 194// Non-4K page size (only on selected architectures) 195#mesondefine PAGESIZE 196 197/* Windows-related defines 198 */ 199 200// Prevent <windows.h> from clobbering std::min and std::max 201#mesondefine NOMINMAX 202 203// Enables mathematical constants (such as M_PI) in Windows math.h header 204// https://docs.microsoft.com/en-us/cpp/c-runtime-library/math-constants 205#mesondefine _USE_MATH_DEFINES 206 207#endif 208