summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad House <bradmssw@php.net>2004-05-16 02:59:34 +0000
committerBrad House <bradmssw@php.net>2004-05-16 02:59:34 +0000
commit92c72cb8d85d9115c08f857f2237bd532848a786 (patch)
tree0561ded1b718c3a8a54b9e68e7e5677ef4766b00
parent72d12fb3205f5b8c10e55aa752eaf585adabd41c (diff)
downloadphp-git-92c72cb8d85d9115c08f857f2237bd532848a786.tar.gz
update config.m4 for libmonetra 4.0 compatability.
Library no longer has MCVE_ symbols, the header file has #define\'s to convert MCVE_ -> M_ to reflect the Monetra name change from MCVE. More updates to follow.
-rw-r--r--ext/mcve/config.m435
1 files changed, 30 insertions, 5 deletions
diff --git a/ext/mcve/config.m4 b/ext/mcve/config.m4
index e20aa6e136..3593d973d8 100644
--- a/ext/mcve/config.m4
+++ b/ext/mcve/config.m4
@@ -1,7 +1,7 @@
dnl config.m4 for PHP MCVE Extension
PHP_ARG_WITH(mcve, for MCVE support,
-[ --with-mcve[=DIR] Include MCVE support. libmcve >= 3.2.2 required])
+[ --with-mcve[=DIR] Include MCVE support. libmcve >= 3.2.2 or libmonetra >= 4.0 required])
PHP_ARG_WITH(openssl-dir,OpenSSL dir for MCVE,
[ --with-openssl-dir[=DIR] MCVE: openssl install prefix.], no, no)
@@ -14,7 +14,7 @@ if test "$PHP_MCVE" != "no"; then
AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more information.])
])
else
- AC_MSG_RESULT([If configure fails, try adding --with-openssl-dir=DIR])
+ AC_MSG_RESULT([If configure fails, try adding --with-openssl-dir=<DIR>])
fi
case "$PHP_MCVE" in
@@ -53,16 +53,41 @@ yes
PHP_ADD_INCLUDE($MCVE_DIR/include)
PHP_ADD_LIBRARY_WITH_PATH(mcve, $MCVE_DIR/lib, MCVE_SHARED_LIBADD)
- dnl Build test
+ dnl Build test. Check for libmcve or libmonetra
+ dnl libmonetra_compat.h handle's MCVE_ -> M_ conversion
+ dnl so it is API compatible
+
+ has_mcve=0
+ dnl check for libmcve
PHP_CHECK_LIBRARY(mcve, MCVE_DestroyEngine,
[
- AC_DEFINE(HAVE_MCVE, 1, [ ])
+ has_mcve=1
], [
- AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.])
+ has_mcve=0
], [
$MCVE_SHARED_LIBADD
])
+ dnl check for libmonetra if no proper libmcve
+ dnl symlink named libmcve is created to libmonetra
+ dnl during libmonetra install, so this is valid
+ if test "$has_mcve" = "0" ; then
+ PHP_CHECK_LIBRARY(mcve, M_DestroyEngine,
+ [
+ has_mcve=1
+ ], [
+ has_mcve=0
+ ], [
+ $MCVE_SHARED_LIBADD
+ ])
+ fi
+
+ if test "$has_mcve" = "1" ; then
+ AC_DEFINE(HAVE_MCVE, 1, [ ])
+ else
+ AC_MSG_ERROR([MCVE: Sanity check failed. Please check config.log for more information.])
+ fi
+
PHP_NEW_EXTENSION(mcve, mcve.c, $ext_shared)
PHP_SUBST(MCVE_SHARED_LIBADD)
fi