From 2d5fb3614586f85cbb364c909900b02f1c23d894 Mon Sep 17 00:00:00 2001 From: Ting-Wei Lan Date: Sat, 20 Jan 2018 16:57:38 +0800 Subject: configure: Don't put includes in function body of AC_LANG_PROGRAM The second argument of AC_LANG_PROGRAM is the content of main function. We cannot put any includes there, or we end up testing whether the compiler supports nested functions because headers may have definitions for inline functions. https://bugzilla.gnome.org/show_bug.cgi?id=792713 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index fa88b4b2a..47e5fe0b4 100644 --- a/configure.ac +++ b/configure.ac @@ -173,8 +173,8 @@ if test "x$have_statvfs" = "xyes" ; then fi # Check for defines we expect -AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ -#include "stdio.h" +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ +#include "stdio.h"]], [[ printf ("%s", __FUNCTION__); ]])], [have_function=yes], -- cgit v1.2.1