php-src/ext/fileinfo/config.m4
Anatol Belski 411e97c72d Upgraded libmagic to 5.29
yet unfinished port to libmagic 5.28

catch with missing libmagic port pieces

regenerate data file with magic from 5.28

test magic files from 5.28

missing files

fix path

pure c99 is still not supported

move right to 5.29, yet some bugs present

more sync with orig lib

more ZMM usage

use unpatched data for now

partial revert according to bug #67705

Revert "more ZMM usage"

This reverts commit 5e3c9b851034b455942b219b18bdc49c8315c3ee.

several fixes, so it's now closer to the clean port
2016-11-24 13:44:04 +01:00

58 lines
1.4 KiB
Plaintext

dnl $Id$
dnl config.m4 for extension fileinfo
PHP_ARG_ENABLE(fileinfo, for fileinfo support,
[ --disable-fileinfo Disable fileinfo support], yes)
if test "$PHP_FILEINFO" != "no"; then
libmagic_sources=" \
libmagic/apprentice.c libmagic/apptype.c libmagic/ascmagic.c \
libmagic/cdf.c libmagic/cdf_time.c libmagic/compress.c \
libmagic/encoding.c libmagic/fsmagic.c libmagic/funcs.c \
libmagic/is_tar.c libmagic/magic.c libmagic/print.c \
libmagic/readcdf.c libmagic/softmagic.c libmagic/der.c"
AC_MSG_CHECKING([for strcasestr])
AC_TRY_RUN([
#include <string.h>
#include <strings.h>
#include <stdlib.h>
int main(void)
{
char *s0, *s1, *ret;
s0 = (char *) malloc(42);
s1 = (char *) malloc(8);
memset(s0, 'X', 42);
s0[24] = 'Y';
s0[26] = 'Z';
s0[41] = '\0';
memset(s1, 'x', 8);
s1[0] = 'y';
s1[2] = 'Z';
s1[7] = '\0';
ret = strcasestr(s0, s1);
return !(NULL != ret);
}
],[
dnl using the platform implementation
AC_MSG_RESULT(yes)
],[
AC_MSG_RESULT(no)
AC_MSG_NOTICE(using libmagic strcasestr implementation)
libmagic_sources="$libmagic_sources libmagic/strcasestr.c"
])
PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic)
PHP_ADD_BUILD_DIR($ext_builddir/libmagic)
AC_CHECK_FUNCS([utimes strndup])
PHP_ADD_MAKEFILE_FRAGMENT
fi