summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in2
-rw-r--r--ext/date/lib/timelib_structs.h4
-rw-r--r--scripts/phpize.m42
-rw-r--r--win32/build/confutils.js2
4 files changed, 8 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 06db0a7c50..3720d0f53d 100644
--- a/configure.in
+++ b/configure.in
@@ -186,6 +186,8 @@ PHP_INIT_BUILD_SYSTEM
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
+CFLAGS="$CFLAGS -D HAVE_TIMELIB_CONFIG_H=1"
+
abs_srcdir=`(cd $srcdir; pwd)`
abs_builddir=`pwd`
diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h
index 6d8aa028d5..339c576d6b 100644
--- a/ext/date/lib/timelib_structs.h
+++ b/ext/date/lib/timelib_structs.h
@@ -21,7 +21,9 @@
#ifndef __TIMELIB_STRUCTS_H__
#define __TIMELIB_STRUCTS_H__
-#include "timelib_config.h"
+#ifdef HAVE_TIMELIB_CONFIG_H
+# include "timelib_config.h"
+#endif
#ifndef TIMELIB_OMIT_STDINT
diff --git a/scripts/phpize.m4 b/scripts/phpize.m4
index d745ca7443..617976cc3a 100644
--- a/scripts/phpize.m4
+++ b/scripts/phpize.m4
@@ -19,6 +19,8 @@ dnl
test -z "$CFLAGS" && auto_cflags=1
+CFLAGS="$CFLAGS -D HAVE_TIMELIB_CONFIG_H=1"
+
abs_srcdir=`(cd $srcdir && pwd)`
abs_builddir=`pwd`
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
index 8a4cb9347b..135dd69ad5 100644
--- a/win32/build/confutils.js
+++ b/win32/build/confutils.js
@@ -2583,7 +2583,7 @@ function toolset_setup_common_cflags()
// General CFLAGS for building objects
DEFINE("CFLAGS", "/nologo $(BASE_INCLUDES) /D _WINDOWS \
- /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 ");
+ /D ZEND_WIN32=1 /D PHP_WIN32=1 /D WIN32 /D _MBCS /W3 /D HAVE_TIMELIB_CONFIG_H=1");
if (VS_TOOLSET) {
ADD_FLAG("CFLAGS", " /FD ");