x86/xen: resume timer irqs early
[linux/fpc-iii.git] / tools / perf / config / feature-tests.mak
blobf79305739eccdbea8a7ee7dc65be5862543808a4
1 define SOURCE_HELLO
2 #include <stdio.h>
3 int main(void)
5 return puts(\"hi\");
7 endef
9 ifndef NO_DWARF
10 define SOURCE_DWARF
11 #include <dwarf.h>
12 #include <elfutils/libdw.h>
13 #include <elfutils/version.h>
14 #ifndef _ELFUTILS_PREREQ
15 #error
16 #endif
18 int main(void)
20 Dwarf *dbg = dwarf_begin(0, DWARF_C_READ);
21 return (long)dbg;
23 endef
24 endif
26 define SOURCE_LIBELF
27 #include <libelf.h>
29 int main(void)
31 Elf *elf = elf_begin(0, ELF_C_READ, 0);
32 return (long)elf;
34 endef
36 define SOURCE_GLIBC
37 #include <gnu/libc-version.h>
39 int main(void)
41 const char *version = gnu_get_libc_version();
42 return (long)version;
44 endef
46 define SOURCE_BIONIC
47 #include <android/api-level.h>
49 int main(void)
51 return __ANDROID_API__;
53 endef
55 define SOURCE_ELF_MMAP
56 #include <libelf.h>
57 int main(void)
59 Elf *elf = elf_begin(0, ELF_C_READ_MMAP, 0);
60 return (long)elf;
62 endef
64 define SOURCE_ELF_GETPHDRNUM
65 #include <libelf.h>
66 int main(void)
68 size_t dst;
69 return elf_getphdrnum(0, &dst);
71 endef
73 ifndef NO_SLANG
74 define SOURCE_SLANG
75 #include <slang.h>
77 int main(void)
79 return SLsmg_init_smg();
81 endef
82 endif
84 ifndef NO_GTK2
85 define SOURCE_GTK2
86 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
87 #include <gtk/gtk.h>
88 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
90 int main(int argc, char *argv[])
92 gtk_init(&argc, &argv);
94 return 0;
96 endef
98 define SOURCE_GTK2_INFOBAR
99 #pragma GCC diagnostic ignored \"-Wstrict-prototypes\"
100 #include <gtk/gtk.h>
101 #pragma GCC diagnostic error \"-Wstrict-prototypes\"
103 int main(void)
105 gtk_info_bar_new();
107 return 0;
109 endef
110 endif
112 ifndef NO_LIBPERL
113 define SOURCE_PERL_EMBED
114 #include <EXTERN.h>
115 #include <perl.h>
117 int main(void)
119 perl_alloc();
120 return 0;
122 endef
123 endif
125 ifndef NO_LIBPYTHON
126 define SOURCE_PYTHON_VERSION
127 #include <Python.h>
128 #if PY_VERSION_HEX >= 0x03000000
129 #error
130 #endif
131 int main(void)
133 return 0;
135 endef
136 define SOURCE_PYTHON_EMBED
137 #include <Python.h>
138 int main(void)
140 Py_Initialize();
141 return 0;
143 endef
144 endif
146 define SOURCE_BFD
147 #include <bfd.h>
149 int main(void)
151 bfd_demangle(0, 0, 0);
152 return 0;
154 endef
156 define SOURCE_CPLUS_DEMANGLE
157 extern char *cplus_demangle(const char *, int);
159 int main(void)
161 cplus_demangle(0, 0);
162 return 0;
164 endef
166 define SOURCE_STRLCPY
167 #include <stdlib.h>
168 extern size_t strlcpy(char *dest, const char *src, size_t size);
170 int main(void)
172 strlcpy(NULL, NULL, 0);
173 return 0;
175 endef
177 ifndef NO_LIBUNWIND
178 define SOURCE_LIBUNWIND
179 #include <libunwind.h>
180 #include <stdlib.h>
182 extern int UNW_OBJ(dwarf_search_unwind_table) (unw_addr_space_t as,
183 unw_word_t ip,
184 unw_dyn_info_t *di,
185 unw_proc_info_t *pi,
186 int need_unwind_info, void *arg);
189 #define dwarf_search_unwind_table UNW_OBJ(dwarf_search_unwind_table)
191 int main(void)
193 unw_addr_space_t addr_space;
194 addr_space = unw_create_addr_space(NULL, 0);
195 unw_init_remote(NULL, addr_space, NULL);
196 dwarf_search_unwind_table(addr_space, 0, NULL, NULL, 0, NULL);
197 return 0;
199 endef
200 endif
202 ifndef NO_BACKTRACE
203 define SOURCE_BACKTRACE
204 #include <execinfo.h>
205 #include <stdio.h>
207 int main(void)
209 backtrace(NULL, 0);
210 backtrace_symbols(NULL, 0);
211 return 0;
213 endef
214 endif
216 ifndef NO_LIBAUDIT
217 define SOURCE_LIBAUDIT
218 #include <libaudit.h>
220 int main(void)
222 printf(\"error message: %s\", audit_errno_to_name(0));
223 return audit_open();
225 endef
226 endif
228 define SOURCE_ON_EXIT
229 #include <stdio.h>
231 int main(void)
233 return on_exit(NULL, NULL);
235 endef
237 define SOURCE_LIBNUMA
238 #include <numa.h>
239 #include <numaif.h>
241 int main(void)
243 numa_available();
244 return 0;
246 endef