File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
mcrypt /
config.m4
Revision
1.1.1.2 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue May 29 12:34:40 2012 UTC (12 years, 5 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
HEAD
php 5.4.3+patches
dnl
dnl $Id: config.m4,v 1.1.1.2 2012/05/29 12:34:40 misho Exp $
dnl
AC_DEFUN([PHP_MCRYPT_CHECK_VERSION],[
old_CPPFLAGS=$CPPFLAGS
CPPFLAGS=-I$MCRYPT_DIR/include
AC_MSG_CHECKING(for libmcrypt version)
AC_EGREP_CPP(yes,[
#include <mcrypt.h>
#if MCRYPT_API_VERSION >= 20021217
yes
#endif
],[
AC_MSG_RESULT(>= 2.5.6)
],[
AC_MSG_ERROR(libmcrypt version 2.5.6 or greater required.)
])
CPPFLAGS=$old_CPPFLAGS
])
PHP_ARG_WITH(mcrypt, for mcrypt support,
[ --with-mcrypt[=DIR] Include mcrypt support])
if test "$PHP_MCRYPT" != "no"; then
for i in $PHP_MCRYPT /usr/local /usr; do
test -f $i/include/mcrypt.h && MCRYPT_DIR=$i && break
done
if test -z "$MCRYPT_DIR"; then
AC_MSG_ERROR(mcrypt.h not found. Please reinstall libmcrypt.)
fi
PHP_MCRYPT_CHECK_VERSION
PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
[
PHP_ADD_LIBRARY(ltdl,, MCRYPT_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
],[
PHP_CHECK_LIBRARY(mcrypt, mcrypt_module_open,
[
AC_DEFINE(HAVE_LIBMCRYPT,1,[ ])
],[
AC_MSG_ERROR([Sorry, I was not able to diagnose which libmcrypt version you have installed.])
],[
-L$MCRYPT_DIR/$PHP_LIBDIR
])
],[
-L$MCRYPT_DIR/$PHP_LIBDIR -lltdl
])
PHP_ADD_LIBRARY_WITH_PATH(mcrypt, $MCRYPT_DIR/$PHP_LIBDIR, MCRYPT_SHARED_LIBADD)
PHP_ADD_INCLUDE($MCRYPT_DIR/include)
PHP_SUBST(MCRYPT_SHARED_LIBADD)
PHP_NEW_EXTENSION(mcrypt, mcrypt.c mcrypt_filter.c, $ext_shared)
fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>