summaryrefslogtreecommitdiffstats
path: root/2775.patch
blob: 9ced075dae06bfe105b637d3e11d7582dfc79401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 9950f69baf175606d8fb72ce0b9bb10b892934f1 Mon Sep 17 00:00:00 2001
From: Remi Collet <fedora@famillecollet.com>
Date: Thu, 4 Sep 2014 15:30:38 +0200
Subject: [PATCH] Fix JSON detection

---
 ext/config.m4 | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/ext/config.m4 b/ext/config.m4
index 88f8e4c..2340e9b 100644
--- a/ext/config.m4
+++ b/ext/config.m4
@@ -399,23 +399,17 @@ registry.c"
 		[[#include "php_config.h"]]
 	)
 
-	AC_CHECK_DECL(
-		[HAVE_JSON],
+	AC_CHECK_HEADERS(
+		[ext/json/php_json.h],
 		[
-			AC_CHECK_HEADERS(
-				[ext/json/php_json.h],
-				[
-					PHP_ADD_EXTENSION_DEP([phalcon], [json])
-					AC_DEFINE([PHALCON_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time])
-				],
-				,
-				[[#include "main/php.h"]]
-			)
+			PHP_ADD_EXTENSION_DEP([phalcon], [json])
+			AC_DEFINE([PHALCON_USE_PHP_JSON], [1], [Whether PHP json extension is present at compile time])
 		],
 		,
-		[[#include "php_config.h"]]
+		[[#include "main/php.h"]]
 	)
 
+
 	AC_CHECK_DECL(
 		[HAVE_PHP_SESSION],
 		[