[tracker] configure: Don't put includes in function body of AC_LANG_PROGRAM
- From: Ting-Wei Lan <lantw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] configure: Don't put includes in function body of AC_LANG_PROGRAM
- Date: Sat, 27 Jan 2018 08:55:38 +0000 (UTC)
commit 2d5fb3614586f85cbb364c909900b02f1c23d894
Author: Ting-Wei Lan <lantw src gnome org>
Date: Sat Jan 20 16:57:38 2018 +0800
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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index fa88b4b..47e5fe0 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],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]