summaryrefslogtreecommitdiffstats
path: root/config.m4
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-12 11:46:08 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-12 11:46:08 +0200
commit84f13bbeb4edfb35d6ba45528e6d1329c0d357e5 (patch)
treebfcb1b0341dea88fa4a303518eabecb5d8284c3f /config.m4
php-pecl-xdiff: 1.5.2 (php 5, beta) and 2.0.1 (php 7, stable) - New packages
Diffstat (limited to 'config.m4')
-rw-r--r--config.m443
1 files changed, 43 insertions, 0 deletions
diff --git a/config.m4 b/config.m4
new file mode 100644
index 0000000..5908718
--- /dev/null
+++ b/config.m4
@@ -0,0 +1,43 @@
+dnl config.m4 for extension xdiff
+dnl adapted to use bundled copy of the library
+
+PHP_ARG_WITH(xdiff, for xdiff support,
+[ --with-xdiff Include xdiff support])
+
+
+if test "$PHP_XDIFF" != "no"; then
+
+ dnl Checks for header files.
+ AC_STDC_HEADERS
+ AC_CHECK_HEADERS(stdio.h limits.h)
+
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_INLINE
+ AC_C_VOLATILE
+ AC_C_CONST
+ AC_C_BIGENDIAN
+
+ dnl Checks for library functions.
+ AC_CHECK_FUNCS(memset memcmp memchr memcpy strlen malloc free realloc)
+
+ LIBSRC="\
+ libxdiff/xadler32.c \
+ libxdiff/xalloc.c \
+ libxdiff/xbdiff.c \
+ libxdiff/xbpatchi.c \
+ libxdiff/xdiffi.c \
+ libxdiff/xemit.c \
+ libxdiff/xmerge3.c \
+ libxdiff/xmissing.c \
+ libxdiff/xpatchi.c \
+ libxdiff/xprepare.c \
+ libxdiff/xrabdiff.c \
+ libxdiff/xrabply.c \
+ libxdiff/xutils.c \
+ libxdiff/xversion.c \
+ "
+
+ PHP_NEW_EXTENSION(xdiff, xdiff.c $LIBSRC, $ext_shared)
+ PHP_ADD_BUILD_DIR($ext_builddir/libxdiff, 1)
+ PHP_ADD_INCLUDE([$ext_srcdir/libxdiff])
+fi