summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorHenrique Dante de Almeida <hdante@profusion.mobi>2013-01-24 16:57:42 -0200
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-02-26 10:55:04 -0300
commitca8fc827a380c3525793dbaae7cdc7f8901bf0b6 (patch)
tree91b856b42924ad70e33eb6c91b00636af62d710e /m4
parentcbc203e0bf56c116c17859a064c23eb82e2d669b (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 'm4')
-rw-r--r--m4/gcc_check_builtin.m420
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 0000000..1434c5f
--- /dev/null
+++ b/m4/gcc_check_builtin.m4
@@ -0,0 +1,20 @@
1AC_DEFUN([EFL_CHECK_GCC_BUILTIN],
2[efl_check_gcc_builtin_save_libs=$LIBS
3LIBS="-lm $LIBS"
4AC_LINK_IFELSE(
5[AC_LANG_PROGRAM(
6[[#ifndef __GNUC__
7choke 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])])
19LIBS=$efl_check_gcc_builtin_save_libs])
20