source: CLRX/CLRadeonExtender/trunk/CLRX/Config.h.in @ 2578

Last change on this file since 2578 was 2578, checked in by matszpk, 3 years ago

CLRadeonExtender: Add STDC_FORMAT_MACROS to Config.h.in.

File size: 5.4 KB
Line 
1/*
2 *  CLRadeonExtender - Unofficial OpenCL Radeon Extensions Library
3 *  Copyright (C) 2014-2016 Mateusz Szpakowski
4 *
5 *  This library is free software; you can redistribute it and/or
6 *  modify it under the terms of the GNU Lesser General Public
7 *  License as published by the Free Software Foundation; either
8 *  version 2.1 of the License, or (at your option) any later version.
9 *
10 *  This library is distributed in the hope that it will be useful,
11 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 *  Lesser General Public License for more details.
14 *
15 *  You should have received a copy of the GNU Lesser General Public
16 *  License along with this library; if not, write to the Free Software
17 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef __CLRX_CONFIG_H__
21#define __CLRX_CONFIG_H__
22
23#define CLRX_VERSION "${CLRX_VERSION}"
24
25#define CLRX_MAJOR_VERSION ${CLRX_MAJOR_VERSION}
26
27#define CLRX_MINOR_VERSION ${CLRX_MINOR_VERSION}
28
29#define CLRX_MICRO_VERSION ${CLRX_MICRO_VERSION}
30
31#cmakedefine HAVE_GNU11
32
33#cmakedefine HAVE_ELF_H
34
35#cmakedefine HAVE_INT128
36
37#cmakedefine HAVE_UBUNTU_GPUPRO
38
39/* architecture setup */
40
41#if defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || \
42        defined(_M_IX86) || defined(__i386) || defined(_X86_)
43#  define HAVE_ARCH_INTEL 1
44#  define HAVE_ARCH_X86 1
45#  define HAVE_32BIT 1
46#endif
47
48#if defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || \
49        defined(_M_X64) || defined(_M_AMD64)
50#  define HAVE_ARCH_INTEL 1
51#  define HAVE_ARCH_X86_64 1
52#  define HAVE_64BIT 1
53#endif
54
55#if defined(__powerpc__) || defined(__powerpc) || defined(_M_PPC) || \
56    defined(__POWERPC__) || defined(__ppc)
57#  define HAVE_ARCH_POWERPC 1
58#  if defined(__powerpc64__) || defined(__ppc64__) || _M_PPC>=620 || defined(__arch64__)
59#    define HAVE_ARCH_POWERPC64 1
60#    define HAVE_64BIT 1
61#  else
62#    define HAVE_ARCH_POWERPC32 1
63#    define HAVE_32BIT 1
64#  endif
65#endif
66
67#if defined(__arm__) || defined(__thumb__) || defined(_M_ARM) || defined(_M_ARMT)
68#  define HAVE_ARCH_ARM 1
69#  if defined(__aarch64__)
70#    define HAVE_ARCH_ARM64 1
71#    define HAVE_64BIT 1
72#  else
73#    define HAVE_ARCH_ARM32 1
74#    define HAVE_32BIT 1
75#  endif
76#endif
77
78#if !defined(HAVE_ARCH_ARM) && defined(__aarch64__)
79#  define HAVE_ARCH_ARM 1
80#  define HAVE_ARCH_ARM64 1
81#  define HAVE_64BIT 1
82#endif
83
84/* endianness */
85#if defined(__BIG_ENDIAN__) || defined(__ARMEB__) || defined(__THUMBEB__) || \
86    defined(__AARCH64EB__) || defined(_MIPSEB)  || defined(__MIPSEB__) || \
87    defined(__MIPSEB)
88#  define HAVE_BIG_ENDIAN 1
89#else
90#  define HAVE_LITTLE_ENDIAN 1
91#endif
92
93/* machine bits */
94#if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
95#  ifdef _WIN64
96#    define HAVE_64BIT 1
97#  else
98#    ifdef _WIN32
99#      define HAVE_32BIT 1
100#    endif
101#  endif
102#endif
103
104#if !defined(HAVE_32BIT) && !defined(HAVE_64BIT)
105#  if defined(__SIZEOF_POINTER__) && __SIZEOF_POINTER__==8
106#    define HAVE_64BIT 1
107#  else
108#    define HAVE_32BIT 1
109#  endif
110#endif
111
112/* operating system */
113
114#ifdef __GNU__
115#  define HAVE_GNU 1
116#endif
117
118#if defined(__linux__) || defined(linux)
119#  define HAVE_LINUX 1
120#endif
121
122#if defined(_WIN32) || defined(_WIN64) || defined(__WINDOWS__) || defined(__WIN32__)
123#  define HAVE_WINDOWS 1
124#endif
125
126#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
127        defined(__bsdi__) || defined(__DragonFly__)
128#  define HAVE_BSD 1
129#endif
130
131/* config setup */
132
133#ifndef HAVE_WINDOWS
134#  define SYSTEM_CONFIG_PATH "/etc"
135
136#  ifdef HAVE_32BIT
137#  define DEFAULT_AMDOCLPATH "/usr/lib/libamdocl32.so"
138#  else
139#    ifdef HAVE_UBUNTU_GPUPRO
140#    define DEFAULT_AMDOCLPATH "/usr/lib/x86_64-linux-gnu/amdgpu-pro/libamdocl64.so"
141#    else
142#    define DEFAULT_AMDOCLPATH "/usr/lib64/libamdocl64.so"
143#    endif
144#  endif
145
146#  define CLRX_NATIVE_DIR_SEP '/'
147#  define CLRX_NATIVE_DIR_SEP_S "/"
148
149#  define CLRX_ALT_DIR_SEP '\\'
150#  define CLRX_ALT_DIR_SEP_S "\\"
151
152#else
153#  define SYSTEM_CONFIG_PATH "c:\\etc"
154
155#  ifdef HAVE_32BIT
156#  define DEFAULT_AMDOCLPATH "c:\\Windows\\System32\\amdocl32.dll"
157#  else
158#  define DEFAULT_AMDOCLPATH "c:\\Windows\\System32\\amdocl64.dll"
159#  endif
160
161#  define CLRX_NATIVE_DIR_SEP '\\'
162#  define CLRX_NATIVE_DIR_SEP_S "\\"
163
164#  define CLRX_ALT_DIR_SEP '/'
165#  define CLRX_ALT_DIR_SEP_S "/"
166
167#  define strcasecmp(A,B) _stricmp(A,B)
168#  define strncasecmp(A,B,N) _strnicmp(A,B,N)
169#  if _MSC_VER<1900
170#    define snprintf(B,N,F,...) _snprintf(B,N,F,__VA_ARGS__)
171#  endif
172#endif
173
174/* symbols visibility */
175
176#if __GNUC__ >= 4
177#  define CLRX_INTERNAL __attribute__((visibility("hidden")))
178#else
179#  define CLRX_INTERNAL
180#endif
181
182/* types and defs */
183
184typedef signed char cxchar;
185typedef unsigned char cxuchar;
186typedef unsigned char cxbyte;
187typedef signed short cxshort;
188typedef unsigned short cxushort;
189typedef signed int cxint;
190typedef unsigned int cxuint;
191typedef signed long cxlong;
192typedef unsigned long cxulong;
193typedef signed long long cxllong;
194typedef unsigned long long cxullong;
195#ifdef _MSC_VER
196#  ifdef HAVE_64BIT
197typedef signed long long ssize_t;
198#    define SSIZE_MIN (-9223372036854775808LL)
199#    define SSIZE_MAX (9223372036854775807LL)
200#  else
201typedef signed long ssize_t;
202#    define SSIZE_MIN (-2147483648LL)
203#    define SSIZE_MAX (2147483647LL)
204#  endif
205#  define NOMINMAX
206#endif
207
208#if __cplusplus < 201103L || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
209#define __STDC_LIMIT_MACROS 1
210#define __STDC_FORMAT_MACROS 1
211#endif
212
213#endif
Note: See TracBrowser for help on using the repository browser.