xref: /PHP-7.1/ext/date/config0.m4 (revision 7f6387b5)
1dnl $Id$
2dnl config.m4 for date extension
3
4sinclude(ext/date/lib/timelib.m4)
5sinclude(lib/timelib.m4)
6
7PHP_DATE_CFLAGS="-I@ext_builddir@/lib -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -DHAVE_TIMELIB_CONFIG_H=1"
8timelib_sources="lib/astro.c lib/dow.c lib/parse_date.c lib/parse_tz.c
9                 lib/timelib.c lib/tm2unixtime.c lib/unixtime2tm.c lib/parse_iso_intervals.c lib/interval.c"
10
11PHP_NEW_EXTENSION(date, php_date.c $timelib_sources, no,, $PHP_DATE_CFLAGS)
12
13PHP_ADD_BUILD_DIR([$ext_builddir/lib], 1)
14PHP_ADD_INCLUDE([$ext_builddir/lib])
15PHP_ADD_INCLUDE([$ext_srcdir/lib])
16
17PHP_INSTALL_HEADERS([ext/date], [php_date.h lib/timelib.h lib/timelib_structs.h lib/timelib_config.h])
18AC_DEFINE([HAVE_TIMELIB_CONFIG_H], [1], [Have timelib_config.h])
19
20cat > $ext_builddir/lib/timelib_config.h <<EOF
21#ifdef PHP_WIN32
22# include "config.w32.h"
23#else
24# include <php_config.h>
25#endif
26#include <php_stdint.h>
27#define TIMELIB_OMIT_STDINT 1
28
29#include "zend.h"
30
31#define timelib_malloc  emalloc
32#define timelib_realloc erealloc
33#define timelib_calloc  ecalloc
34#define timelib_strdup  estrdup
35#define timelib_free    efree
36EOF
37