media/webrtc/trunk/build/build_config.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/webrtc/trunk/build/build_config.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,197 @@
     1.4 +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +
     1.8 +// This file adds defines about the platform we're currently building on.
     1.9 +//  Operating System:
    1.10 +//    OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
    1.11 +//  Compiler:
    1.12 +//    COMPILER_MSVC / COMPILER_GCC
    1.13 +//  Processor:
    1.14 +//    ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
    1.15 +//    ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
    1.16 +
    1.17 +#ifndef BUILD_BUILD_CONFIG_H_
    1.18 +#define BUILD_BUILD_CONFIG_H_
    1.19 +
    1.20 +#if defined(__APPLE__)
    1.21 +#include <TargetConditionals.h>
    1.22 +#endif
    1.23 +
    1.24 +// A set of macros to use for platform detection.
    1.25 +#if defined(__APPLE__)
    1.26 +#define OS_MACOSX 1
    1.27 +#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
    1.28 +#define OS_IOS 1
    1.29 +#endif  // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
    1.30 +#elif defined(ANDROID)
    1.31 +#define OS_ANDROID 1
    1.32 +#elif defined(__native_client__)
    1.33 +#define OS_NACL 1
    1.34 +#elif defined(__linux__)
    1.35 +#define OS_LINUX 1
    1.36 +// Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined.
    1.37 +#if !defined(TOOLKIT_VIEWS)
    1.38 +#define TOOLKIT_GTK
    1.39 +#endif
    1.40 +#elif defined(_WIN32)
    1.41 +#define OS_WIN 1
    1.42 +#define TOOLKIT_VIEWS 1
    1.43 +#elif defined(__DragonFly__)
    1.44 +#define OS_DRAGONFLY 1
    1.45 +#define TOOLKIT_GTK
    1.46 +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
    1.47 +#define OS_FREEBSD 1
    1.48 +#define TOOLKIT_GTK
    1.49 +#elif defined(__NetBSD__)
    1.50 +#define OS_NETBSD 1
    1.51 +#define TOOLKIT_GTK
    1.52 +#elif defined(__OpenBSD__)
    1.53 +#define OS_OPENBSD 1
    1.54 +#define TOOLKIT_GTK
    1.55 +#elif defined(__sun)
    1.56 +#define OS_SOLARIS 1
    1.57 +#define TOOLKIT_GTK
    1.58 +#else
    1.59 +#error Please add support for your platform in build/build_config.h
    1.60 +#endif
    1.61 +
    1.62 +#if defined(USE_OPENSSL) && defined(USE_NSS)
    1.63 +#error Cannot use both OpenSSL and NSS
    1.64 +#endif
    1.65 +
    1.66 +// For access to standard BSD features, use OS_BSD instead of a
    1.67 +// more specific macro.
    1.68 +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)	\
    1.69 +  || defined(OS_NETBSD) || defined(OS_OPENBSD)
    1.70 +#define OS_BSD 1
    1.71 +#endif
    1.72 +
    1.73 +// For access to standard POSIXish features, use OS_POSIX instead of a
    1.74 +// more specific macro.
    1.75 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||	\
    1.76 +    defined(OS_SOLARIS) || defined(OS_ANDROID) || defined(OS_NACL)
    1.77 +#define OS_POSIX 1
    1.78 +#endif
    1.79 +
    1.80 +#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && \
    1.81 +    !defined(OS_NACL)
    1.82 +#define USE_X11 1  // Use X for graphics.
    1.83 +#endif
    1.84 +
    1.85 +// Use tcmalloc
    1.86 +#if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC)
    1.87 +#define USE_TCMALLOC 1
    1.88 +#endif
    1.89 +
    1.90 +// Compiler detection.
    1.91 +#if defined(__GNUC__)
    1.92 +#define COMPILER_GCC 1
    1.93 +#elif defined(_MSC_VER)
    1.94 +#define COMPILER_MSVC 1
    1.95 +#else
    1.96 +#error Please add support for your compiler in build/build_config.h
    1.97 +#endif
    1.98 +
    1.99 +// Processor architecture detection.  For more info on what's defined, see:
   1.100 +//   http://msdn.microsoft.com/en-us/library/b0084kay.aspx
   1.101 +//   http://www.agner.org/optimize/calling_conventions.pdf
   1.102 +//   or with gcc, run: "echo | gcc -E -dM -"
   1.103 +#if defined(_M_X64) || defined(__x86_64__)
   1.104 +#define ARCH_CPU_X86_FAMILY 1
   1.105 +#define ARCH_CPU_X86_64 1
   1.106 +#define ARCH_CPU_64_BITS 1
   1.107 +#define ARCH_CPU_LITTLE_ENDIAN 1
   1.108 +#elif defined(_M_IX86) || defined(__i386__)
   1.109 +#define ARCH_CPU_X86_FAMILY 1
   1.110 +#define ARCH_CPU_X86 1
   1.111 +#define ARCH_CPU_32_BITS 1
   1.112 +#define ARCH_CPU_LITTLE_ENDIAN 1
   1.113 +#elif defined(__ARMEL__)
   1.114 +#define ARCH_CPU_ARM_FAMILY 1
   1.115 +#define ARCH_CPU_ARMEL 1
   1.116 +#define ARCH_CPU_32_BITS 1
   1.117 +#define ARCH_CPU_LITTLE_ENDIAN 1
   1.118 +#elif defined(__pnacl__)
   1.119 +#define ARCH_CPU_32_BITS 1
   1.120 +#elif defined(__MIPSEL__)
   1.121 +#define ARCH_CPU_MIPS_FAMILY 1
   1.122 +#define ARCH_CPU_MIPSEL 1
   1.123 +#define ARCH_CPU_32_BITS 1
   1.124 +#define ARCH_CPU_LITTLE_ENDIAN 1
   1.125 +#elif defined(__powerpc64__)
   1.126 +#define ARCH_CPU_PPC_FAMILY 1
   1.127 +#define ARCH_CPU_PPC64 1
   1.128 +#define ARCH_CPU_64_BITS 1
   1.129 +#define ARCH_CPU_BIG_ENDIAN 1
   1.130 +#elif defined(__ppc__) || defined(__powerpc__)
   1.131 +#define ARCH_CPU_PPC_FAMILY 1
   1.132 +#define ARCH_CPU_PPC 1
   1.133 +#define ARCH_CPU_32_BITS 1
   1.134 +#define ARCH_CPU_BIG_ENDIAN 1
   1.135 +#elif defined(__sparc64__)
   1.136 +#define ARCH_CPU_SPARC_FAMILY 1
   1.137 +#define ARCH_CPU_SPARC 1
   1.138 +#define ARCH_CPU_64_BITS 1
   1.139 +#elif defined(__sparc__)
   1.140 +#define ARCH_CPU_SPARC_FAMILY 1
   1.141 +#define ARCH_CPU_SPARC 1
   1.142 +#define ARCH_CPU_32_BITS 1
   1.143 +#elif defined(__mips__)
   1.144 +#define ARCH_CPU_MIPS_FAMILY 1
   1.145 +#define ARCH_CPU_MIPS 1
   1.146 +#define ARCH_CPU_32_BITS 1
   1.147 +#elif defined(__hppa__)
   1.148 +#define ARCH_CPU_HPPA 1
   1.149 +#define ARCH_CPU_32_BITS 1
   1.150 +#elif defined(__ia64__)
   1.151 +#define ARCH_CPU_IA64 1
   1.152 +#define ARCH_CPU_64_BITS 1
   1.153 +#elif defined(__s390x__)
   1.154 +#define ARCH_CPU_S390X 1
   1.155 +#define ARCH_CPU_64_BITS 1
   1.156 +#elif defined(__s390__)
   1.157 +#define ARCH_CPU_S390 1
   1.158 +#define ARCH_CPU_32_BITS 1
   1.159 +#elif defined(__alpha__)
   1.160 +#define ARCH_CPU_ALPHA 1
   1.161 +#define ARCH_CPU_64_BITS 1
   1.162 +#else
   1.163 +#error Please add support for your architecture in build/build_config.h
   1.164 +#endif
   1.165 +
   1.166 +// Type detection for wchar_t.
   1.167 +#if defined(OS_WIN)
   1.168 +#define WCHAR_T_IS_UTF16
   1.169 +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
   1.170 +    defined(__WCHAR_MAX__) && \
   1.171 +    (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
   1.172 +#define WCHAR_T_IS_UTF32
   1.173 +#elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
   1.174 +    defined(__WCHAR_MAX__) && \
   1.175 +    (__WCHAR_MAX__ == 0x7fff || __WCHAR_MAX__ == 0xffff)
   1.176 +// On Posix, we'll detect short wchar_t, but projects aren't guaranteed to
   1.177 +// compile in this mode (in particular, Chrome doesn't). This is intended for
   1.178 +// other projects using base who manage their own dependencies and make sure
   1.179 +// short wchar works for them.
   1.180 +#define WCHAR_T_IS_UTF16
   1.181 +#else
   1.182 +#error Please add support for your compiler in build/build_config.h
   1.183 +#endif
   1.184 +
   1.185 +#if defined(__ARMEL__) && !defined(OS_IOS)
   1.186 +#define WCHAR_T_IS_UNSIGNED 1
   1.187 +#elif defined(__MIPSEL__)
   1.188 +#define WCHAR_T_IS_UNSIGNED 0
   1.189 +#endif
   1.190 +
   1.191 +#if defined(OS_ANDROID)
   1.192 +// The compiler thinks std::string::const_iterator and "const char*" are
   1.193 +// equivalent types.
   1.194 +#define STD_STRING_ITERATOR_IS_CHAR_POINTER
   1.195 +// The compiler thinks base::string16::const_iterator and "char16*" are
   1.196 +// equivalent types.
   1.197 +#define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER
   1.198 +#endif
   1.199 +
   1.200 +#endif  // BUILD_BUILD_CONFIG_H_

mercurial