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