media/webrtc/trunk/build/build_config.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 // This file adds defines about the platform we're currently building on.
michael@0 6 // Operating System:
michael@0 7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
michael@0 8 // Compiler:
michael@0 9 // COMPILER_MSVC / COMPILER_GCC
michael@0 10 // Processor:
michael@0 11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
michael@0 12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
michael@0 13
michael@0 14 #ifndef BUILD_BUILD_CONFIG_H_
michael@0 15 #define BUILD_BUILD_CONFIG_H_
michael@0 16
michael@0 17 #if defined(__APPLE__)
michael@0 18 #include <TargetConditionals.h>
michael@0 19 #endif
michael@0 20
michael@0 21 // A set of macros to use for platform detection.
michael@0 22 #if defined(__APPLE__)
michael@0 23 #define OS_MACOSX 1
michael@0 24 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
michael@0 25 #define OS_IOS 1
michael@0 26 #endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
michael@0 27 #elif defined(ANDROID)
michael@0 28 #define OS_ANDROID 1
michael@0 29 #elif defined(__native_client__)
michael@0 30 #define OS_NACL 1
michael@0 31 #elif defined(__linux__)
michael@0 32 #define OS_LINUX 1
michael@0 33 // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined.
michael@0 34 #if !defined(TOOLKIT_VIEWS)
michael@0 35 #define TOOLKIT_GTK
michael@0 36 #endif
michael@0 37 #elif defined(_WIN32)
michael@0 38 #define OS_WIN 1
michael@0 39 #define TOOLKIT_VIEWS 1
michael@0 40 #elif defined(__DragonFly__)
michael@0 41 #define OS_DRAGONFLY 1
michael@0 42 #define TOOLKIT_GTK
michael@0 43 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
michael@0 44 #define OS_FREEBSD 1
michael@0 45 #define TOOLKIT_GTK
michael@0 46 #elif defined(__NetBSD__)
michael@0 47 #define OS_NETBSD 1
michael@0 48 #define TOOLKIT_GTK
michael@0 49 #elif defined(__OpenBSD__)
michael@0 50 #define OS_OPENBSD 1
michael@0 51 #define TOOLKIT_GTK
michael@0 52 #elif defined(__sun)
michael@0 53 #define OS_SOLARIS 1
michael@0 54 #define TOOLKIT_GTK
michael@0 55 #else
michael@0 56 #error Please add support for your platform in build/build_config.h
michael@0 57 #endif
michael@0 58
michael@0 59 #if defined(USE_OPENSSL) && defined(USE_NSS)
michael@0 60 #error Cannot use both OpenSSL and NSS
michael@0 61 #endif
michael@0 62
michael@0 63 // For access to standard BSD features, use OS_BSD instead of a
michael@0 64 // more specific macro.
michael@0 65 #if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \
michael@0 66 || defined(OS_NETBSD) || defined(OS_OPENBSD)
michael@0 67 #define OS_BSD 1
michael@0 68 #endif
michael@0 69
michael@0 70 // For access to standard POSIXish features, use OS_POSIX instead of a
michael@0 71 // more specific macro.
michael@0 72 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
michael@0 73 defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL)
michael@0 74 #define OS_POSIX 1
michael@0 75 #endif
michael@0 76
michael@0 77 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
michael@0 78 !defined(OS_NACL)
michael@0 79 #define USE_X11 1 // Use X for graphics.
michael@0 80 #endif
michael@0 81
michael@0 82 // Use tcmalloc
michael@0 83 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC)
michael@0 84 #define USE_TCMALLOC 1
michael@0 85 #endif
michael@0 86
michael@0 87 // Compiler detection.
michael@0 88 #if defined(__GNUC__)
michael@0 89 #define COMPILER_GCC 1
michael@0 90 #elif defined(_MSC_VER)
michael@0 91 #define COMPILER_MSVC 1
michael@0 92 #else
michael@0 93 #error Please add support for your compiler in build/build_config.h
michael@0 94 #endif
michael@0 95
michael@0 96 // Processor architecture detection. For more info on what's defined, see:
michael@0 97 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx
michael@0 98 // http://www.agner.org/optimize/calling_conventions.pdf
michael@0 99 // or with gcc, run: "echo | gcc -E -dM -"
michael@0 100 #if defined(_M_X64) || defined(__x86_64__)
michael@0 101 #define ARCH_CPU_X86_FAMILY 1
michael@0 102 #define ARCH_CPU_X86_64 1
michael@0 103 #define ARCH_CPU_64_BITS 1
michael@0 104 #define ARCH_CPU_LITTLE_ENDIAN 1
michael@0 105 #elif defined(_M_IX86) || defined(__i386__)
michael@0 106 #define ARCH_CPU_X86_FAMILY 1
michael@0 107 #define ARCH_CPU_X86 1
michael@0 108 #define ARCH_CPU_32_BITS 1
michael@0 109 #define ARCH_CPU_LITTLE_ENDIAN 1
michael@0 110 #elif defined(__ARMEL__)
michael@0 111 #define ARCH_CPU_ARM_FAMILY 1
michael@0 112 #define ARCH_CPU_ARMEL 1
michael@0 113 #define ARCH_CPU_32_BITS 1
michael@0 114 #define ARCH_CPU_LITTLE_ENDIAN 1
michael@0 115 #elif defined(__pnacl__)
michael@0 116 #define ARCH_CPU_32_BITS 1
michael@0 117 #elif defined(__MIPSEL__)
michael@0 118 #define ARCH_CPU_MIPS_FAMILY 1
michael@0 119 #define ARCH_CPU_MIPSEL 1
michael@0 120 #define ARCH_CPU_32_BITS 1
michael@0 121 #define ARCH_CPU_LITTLE_ENDIAN 1
michael@0 122 #elif defined(__powerpc64__)
michael@0 123 #define ARCH_CPU_PPC_FAMILY 1
michael@0 124 #define ARCH_CPU_PPC64 1
michael@0 125 #define ARCH_CPU_64_BITS 1
michael@0 126 #define ARCH_CPU_BIG_ENDIAN 1
michael@0 127 #elif defined(__ppc__) || defined(__powerpc__)
michael@0 128 #define ARCH_CPU_PPC_FAMILY 1
michael@0 129 #define ARCH_CPU_PPC 1
michael@0 130 #define ARCH_CPU_32_BITS 1
michael@0 131 #define ARCH_CPU_BIG_ENDIAN 1
michael@0 132 #elif defined(__sparc64__)
michael@0 133 #define ARCH_CPU_SPARC_FAMILY 1
michael@0 134 #define ARCH_CPU_SPARC 1
michael@0 135 #define ARCH_CPU_64_BITS 1
michael@0 136 #elif defined(__sparc__)
michael@0 137 #define ARCH_CPU_SPARC_FAMILY 1
michael@0 138 #define ARCH_CPU_SPARC 1
michael@0 139 #define ARCH_CPU_32_BITS 1
michael@0 140 #elif defined(__mips__)
michael@0 141 #define ARCH_CPU_MIPS_FAMILY 1
michael@0 142 #define ARCH_CPU_MIPS 1
michael@0 143 #define ARCH_CPU_32_BITS 1
michael@0 144 #elif defined(__hppa__)
michael@0 145 #define ARCH_CPU_HPPA 1
michael@0 146 #define ARCH_CPU_32_BITS 1
michael@0 147 #elif defined(__ia64__)
michael@0 148 #define ARCH_CPU_IA64 1
michael@0 149 #define ARCH_CPU_64_BITS 1
michael@0 150 #elif defined(__s390x__)
michael@0 151 #define ARCH_CPU_S390X 1
michael@0 152 #define ARCH_CPU_64_BITS 1
michael@0 153 #elif defined(__s390__)
michael@0 154 #define ARCH_CPU_S390 1
michael@0 155 #define ARCH_CPU_32_BITS 1
michael@0 156 #elif defined(__alpha__)
michael@0 157 #define ARCH_CPU_ALPHA 1
michael@0 158 #define ARCH_CPU_64_BITS 1
michael@0 159 #else
michael@0 160 #error Please add support for your architecture in build/build_config.h
michael@0 161 #endif
michael@0 162
michael@0 163 // Type detection for wchar_t.
michael@0 164 #if defined(OS_WIN)
michael@0 165 #define WCHAR_T_IS_UTF16
michael@0 166 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
michael@0 167 defined(__WCHAR_MAX__) && \
michael@0 168 (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
michael@0 169 #define WCHAR_T_IS_UTF32
michael@0 170 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
michael@0 171 defined(__WCHAR_MAX__) && \
michael@0 172 (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
michael@0 173 // On Posix, we'll detect short wchar_t, but projects aren't guaranteed to
michael@0 174 // compile in this mode (in particular, Chrome doesn't). This is intended for
michael@0 175 // other projects using base who manage their own dependencies and make sure
michael@0 176 // short wchar works for them.
michael@0 177 #define WCHAR_T_IS_UTF16
michael@0 178 #else
michael@0 179 #error Please add support for your compiler in build/build_config.h
michael@0 180 #endif
michael@0 181
michael@0 182 #if defined(__ARMEL__) && !defined(OS_IOS)
michael@0 183 #define WCHAR_T_IS_UNSIGNED 1
michael@0 184 #elif defined(__MIPSEL__)
michael@0 185 #define WCHAR_T_IS_UNSIGNED 0
michael@0 186 #endif
michael@0 187
michael@0 188 #if defined(OS_ANDROID)
michael@0 189 // The compiler thinks std::string::const_iterator and "const char*" are
michael@0 190 // equivalent types.
michael@0 191 #define STD_STRING_ITERATOR_IS_CHAR_POINTER
michael@0 192 // The compiler thinks base::string16::const_iterator and "char16*" are
michael@0 193 // equivalent types.
michael@0 194 #define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
michael@0 195 #endif
michael@0 196
michael@0 197 #endif // BUILD_BUILD_CONFIG_H_

mercurial