diff options
author | Henrique Dante de Almeida <hdante@profusion.mobi> | 2013-01-24 16:57:42 -0200 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2013-02-26 10:55:04 -0300 |
commit | ca8fc827a380c3525793dbaae7cdc7f8901bf0b6 (patch) | |
tree | 91b856b42924ad70e33eb6c91b00636af62d710e /m4 | |
parent | cbc203e0bf56c116c17859a064c23eb82e2d669b (diff) |
efl: Fixes to support compiling with CFLAGS=-Werror
This allows compiling with gcc 4.7.2 without errors (using the
default configuration).
Diffstat (limited to '')
-rw-r--r-- | m4/gcc_check_builtin.m4 | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/m4/gcc_check_builtin.m4 b/m4/gcc_check_builtin.m4 new file mode 100644 index 0000000000..1434c5f80a --- /dev/null +++ b/m4/gcc_check_builtin.m4 | |||
@@ -0,0 +1,20 @@ | |||
1 | AC_DEFUN([EFL_CHECK_GCC_BUILTIN], | ||
2 | [efl_check_gcc_builtin_save_libs=$LIBS | ||
3 | LIBS="-lm $LIBS" | ||
4 | AC_LINK_IFELSE( | ||
5 | [AC_LANG_PROGRAM( | ||
6 | [[#ifndef __GNUC__ | ||
7 | choke me | ||
8 | #else | ||
9 | #undef $1 | ||
10 | /* Declare this function with same prototype as __builtin_$1. | ||
11 | This removes warning about conflicting type with builtin */ | ||
12 | __typeof__(__builtin_$1) $1; | ||
13 | |||
14 | __typeof__(__builtin_$1) *f = $1; | ||
15 | #endif | ||
16 | ]], [[return f != $1;]] | ||
17 | )], | ||
18 | [AC_DEFINE([$2], [123], [GCC builtin $1 exists])]) | ||
19 | LIBS=$efl_check_gcc_builtin_save_libs]) | ||
20 | |||