[PHP-CVS] cvs: php-src /ext/mcve config.m4 mcve.c

2004-12-07 Thread Brad House
bradmsswTue Dec  7 22:02:33 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 mcve.c 
  Log:
  Newer versions of libmonetra broke compatability with one function. Make 
workaround that detects version, and works with both.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.10r2=1.11ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.10 php-src/ext/mcve/config.m4:1.11
--- php-src/ext/mcve/config.m4:1.10 Sun May 30 10:33:44 2004
+++ php-src/ext/mcve/config.m4  Tue Dec  7 22:02:33 2004
@@ -51,6 +51,20 @@
   ],[
 AC_MSG_ERROR([libmcve 3.2.2 or greater required.])
   ])
+
+  AC_MSG_CHECKING([for correct libmonetra 4.2 or higher])
+  AC_EGREP_CPP(yes,[
+#include $MCVE_DIR/include/mcve.h
+#ifdef MCVE_SetSSL_CAfile
+yes
+#endif
+  ],[
+AC_MSG_RESULT([yes])
+  ],[
+AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
+AC_MSG_ERROR([no])
+  ])
+
   CPPFLAGS=$saved_CPPFLAGS
 
   PHP_ADD_INCLUDE($MCVE_DIR/include)
http://cvs.php.net/diff.php/php-src/ext/mcve/mcve.c?r1=1.28r2=1.29ty=u
Index: php-src/ext/mcve/mcve.c
diff -u php-src/ext/mcve/mcve.c:1.28 php-src/ext/mcve/mcve.c:1.29
--- php-src/ext/mcve/mcve.c:1.28Sun May 30 18:41:13 2004
+++ php-src/ext/mcve/mcve.c Tue Dec  7 22:02:33 2004
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: mcve.c,v 1.28 2004/05/30 22:41:13 bradmssw Exp $ */
+/* $Id: mcve.c,v 1.29 2004/12/08 03:02:33 bradmssw Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -25,6 +25,14 @@
 
 #include php.h
 
+#if PHP_WIN32
+#include config.w32.h
+#elif defined NETWARE
+#include config.nw.h
+#else
+#include php_config.h
+#endif
+
 #if HAVE_MCVE
 
 /* standard php include(s) */
@@ -719,23 +727,34 @@
 }
 /* }}} */
 
-/* {{{ proto int m_setssl_files(string sslkeyfile, string sslcertfile)
+/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string 
sslcertfile)
Set certificate key files and certificates if server requires client 
certificate
verification
 */
 PHP_FUNCTION(m_setssl_files)
 {
+   MCVE_CONN *conn;
int retval;
-   zval **arg1, **arg2;
+   zval **arg1, **arg2, **arg3;
 
+#ifndef LIBMONETRA_BELOW_4_2
+   if (ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, arg1, arg2, 
arg3) == FAILURE)
+   WRONG_PARAM_COUNT;
+   ZEND_FETCH_RESOURCE(conn, MCVE_CONN *, arg1, -1, mcve connection, 
le_conn);
+#else
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, arg1, arg2) == 
FAILURE)
WRONG_PARAM_COUNT;
+#endif
 
-   convert_to_string_ex(arg1);
convert_to_string_ex(arg2);
 
+#ifndef LIBMONETRA_BELOW_4_2
+   convert_to_string_ex(arg3);
+   retval = MCVE_SetSSL_Files(conn, Z_STRVAL_PP(arg2), Z_STRVAL_PP(arg3));
+#else
+   convert_to_string_ex(arg1); 
retval = MCVE_SetSSL_Files(Z_STRVAL_PP(arg1), Z_STRVAL_PP(arg2));
-
+#endif
RETURN_LONG(retval);
 }
 /* }}} */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-12-07 Thread Jani Taskinen
sniper  Wed Dec  8 01:46:34 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  Fix build. This was not supposed to halt configure if test fails.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.11r2=1.12ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.11 php-src/ext/mcve/config.m4:1.12
--- php-src/ext/mcve/config.m4:1.11 Tue Dec  7 22:02:33 2004
+++ php-src/ext/mcve/config.m4  Wed Dec  8 01:46:33 2004
@@ -62,7 +62,7 @@
 AC_MSG_RESULT([yes])
   ],[
 AC_DEFINE([LIBMONETRA_BELOW_4_2], 1, [Whether or not we're using 
libmonetra 4.2 or higher ])
-AC_MSG_ERROR([no])
+AC_MSG_RESULT([no])
   ])
 
   CPPFLAGS=$saved_CPPFLAGS

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-30 Thread Brad House
bradmsswSun May 30 10:33:44 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  manually check for egrep
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.9r2=1.10ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.9 php-src/ext/mcve/config.m4:1.10
--- php-src/ext/mcve/config.m4:1.9  Wed May 26 06:11:18 2004
+++ php-src/ext/mcve/config.m4  Sun May 30 10:33:44 2004
@@ -7,6 +7,9 @@
 [  --with-openssl-dir[=DIR]  MCVE: openssl install prefix.], no, no)
 
 if test $PHP_MCVE != no; then
+  dnl determine egrep command for AC_EGREP_CPP below
+  AC_CHECK_PROG(EGREP, egrep, grep -E)
+  AC_SUBST(EGREP)
 
   if test $PHP_OPENSSL_DIR != no; then
 PHP_OPENSSL=$PHP_OPENSSL_DIR

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-26 Thread Wez Furlong
AC_PROG_EGREP is not supported by autoconf 2.13, which is the recommended
version to use.
Please revert this and solve it some other way, particularly in the 4.3
branch! :-)

-Wez. 

 -Original Message-
 From: Brad House [mailto:[EMAIL PROTECTED] 
 Sent: 25 May 2004 18:09
 To: [EMAIL PROTECTED]
 Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 
 
 bradmssw  Tue May 25 13:08:41 2004 EDT
 
   Modified files:  
 /php-src/ext/mcve config.m4 
   Log:
   PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
   requires AC_PROG_EGREP when you phpize

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-26 Thread Wez Furlong
wez Wed May 26 06:11:18 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  Fix build...
  
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.8r2=1.9ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.8 php-src/ext/mcve/config.m4:1.9
--- php-src/ext/mcve/config.m4:1.8  Tue May 25 13:08:41 2004
+++ php-src/ext/mcve/config.m4  Wed May 26 06:11:18 2004
@@ -1,7 +1,5 @@
 dnl config.m4 for PHP MCVE Extension
 
-AC_PROG_EGREP
-
 PHP_ARG_WITH(mcve, for MCVE support,
 [  --with-mcve[=DIR]   Include MCVE support. libmcve = 3.2.2 or libmonetra = 
4.0 required])
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-26 Thread Wez Furlong
That code might be GPL'd ;-)

It looks a bit too magical, so how about a simple:

AC_CHECK_PROG(EGREP, egrep, grep -E)
AC_SUBST(EGREP)

Instead? (please check that it works!)

--Wez.

 -Original Message-
 From: Brad House [mailto:[EMAIL PROTECTED] 
 Sent: 26 May 2004 13:32
 To: Wez Furlong
 Cc: 'Brad House'; [EMAIL PROTECTED]
 Subject: Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4
 
 oops, didn't realize that ...
 I got an error message with 'phpize' when I tried to use
 autoconf 2.13, and it said I must use 2.5 ...
 
 The reason I added it is someone else did the
AC_EGREP_CPP
 stuff, and it pretty much just hangs on that line
 without defining $EGREP, and AC_PROG_EGREP is what
 defines it...
 
 Anyhow, is it ok with you if I just add this snippet to the
 config.m4 file (above the AC_PROG_EGREP call) ... I just
 ripped it out of the aclocal.m4 that was generated with phpize:
 
 # AC_PROG_EGREP
 # -
 # This is predefined starting with Autoconf 2.54, so this conditional
 # definition can be removed once we require Autoconf 2.54 or later.
 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
 [if echo a | (grep -E '(a|b)') /dev/null 21
  then ac_cv_prog_egrep='grep -E'
  else ac_cv_prog_egrep='egrep'
  fi])
   EGREP=$ac_cv_prog_egrep
   AC_SUBST([EGREP])
 ])])
 
 
 -Brad
 
 Wez Furlong wrote:
  AC_PROG_EGREP is not supported by autoconf 2.13, which is 
 the recommended
  version to use.
  Please revert this and solve it some other way, 
 particularly in the 4.3
  branch! :-)
  
  -Wez. 
  
  
 -Original Message-
 From: Brad House [mailto:[EMAIL PROTECTED] 
 Sent: 25 May 2004 18:09
 To: [EMAIL PROTECTED]
 Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 
 
 bradmsswTue May 25 13:08:41 2004 EDT
 
   Modified files:  
 /php-src/ext/mcve   config.m4 
   Log:
   PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's 
 MCVE_SHARED_LIBADD
   requires AC_PROG_EGREP when you phpize
  
  
  
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-26 Thread Brad House
heh, yours seems so much ... erm ... simpler
I'll give it a test and commit it if it works.
Thanks!
-Brad
Wez Furlong wrote:
That code might be GPL'd ;-)
It looks a bit too magical, so how about a simple:
AC_CHECK_PROG(EGREP, egrep, grep -E)
AC_SUBST(EGREP)
Instead? (please check that it works!)
--Wez.

-Original Message-
From: Brad House [mailto:[EMAIL PROTECTED] 
Sent: 26 May 2004 13:32
To: Wez Furlong
Cc: 'Brad House'; [EMAIL PROTECTED]
Subject: Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4

oops, didn't realize that ...
I got an error message with 'phpize' when I tried to use
autoconf 2.13, and it said I must use 2.5 ...
The reason I added it is someone else did the
  AC_EGREP_CPP
stuff, and it pretty much just hangs on that line
without defining $EGREP, and AC_PROG_EGREP is what
defines it...
Anyhow, is it ok with you if I just add this snippet to the
config.m4 file (above the AC_PROG_EGREP call) ... I just
ripped it out of the aclocal.m4 that was generated with phpize:
# AC_PROG_EGREP
# -
# This is predefined starting with Autoconf 2.54, so this conditional
# definition can be removed once we require Autoconf 2.54 or later.
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
   [if echo a | (grep -E '(a|b)') /dev/null 21
then ac_cv_prog_egrep='grep -E'
else ac_cv_prog_egrep='egrep'
fi])
 EGREP=$ac_cv_prog_egrep
 AC_SUBST([EGREP])
])])
-Brad
Wez Furlong wrote:
AC_PROG_EGREP is not supported by autoconf 2.13, which is 
the recommended
version to use.
Please revert this and solve it some other way, 
particularly in the 4.3
branch! :-)
-Wez. 


-Original Message-
From: Brad House [mailto:[EMAIL PROTECTED] 
Sent: 25 May 2004 18:09
To: [EMAIL PROTECTED]
Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 

bradmsswTue May 25 13:08:41 2004 EDT
Modified files:  
  /php-src/ext/mcve	config.m4 
Log:
PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's 
MCVE_SHARED_LIBADD
requires AC_PROG_EGREP when you phpize



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-26 Thread Brad House
oops, didn't realize that ...
I got an error message with 'phpize' when I tried to use
autoconf 2.13, and it said I must use 2.5 ...
The reason I added it is someone else did the
  AC_EGREP_CPP
stuff, and it pretty much just hangs on that line
without defining $EGREP, and AC_PROG_EGREP is what
defines it...
Anyhow, is it ok with you if I just add this snippet to the
config.m4 file (above the AC_PROG_EGREP call) ... I just
ripped it out of the aclocal.m4 that was generated with phpize:
# AC_PROG_EGREP
# -
# This is predefined starting with Autoconf 2.54, so this conditional
# definition can be removed once we require Autoconf 2.54 or later.
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
   [if echo a | (grep -E '(a|b)') /dev/null 21
then ac_cv_prog_egrep='grep -E'
else ac_cv_prog_egrep='egrep'
fi])
 EGREP=$ac_cv_prog_egrep
 AC_SUBST([EGREP])
])])
-Brad
Wez Furlong wrote:
AC_PROG_EGREP is not supported by autoconf 2.13, which is the recommended
version to use.
Please revert this and solve it some other way, particularly in the 4.3
branch! :-)
-Wez. 


-Original Message-
From: Brad House [mailto:[EMAIL PROTECTED] 
Sent: 25 May 2004 18:09
To: [EMAIL PROTECTED]
Subject: [PHP-CVS] cvs: php-src /ext/mcve config.m4 

bradmsswTue May 25 13:08:41 2004 EDT
 Modified files:  
   /php-src/ext/mcve	config.m4 
 Log:
 PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
 requires AC_PROG_EGREP when you phpize


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-25 Thread Brad House
bradmsswTue May 25 13:08:41 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  PHP_SETUP_OPENSSL is NOT SNMP_SHARED_LIBADD, it's MCVE_SHARED_LIBADD
  requires AC_PROG_EGREP when you phpize
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.7r2=1.8ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.7 php-src/ext/mcve/config.m4:1.8
--- php-src/ext/mcve/config.m4:1.7  Sat May 15 22:59:33 2004
+++ php-src/ext/mcve/config.m4  Tue May 25 13:08:41 2004
@@ -1,5 +1,7 @@
 dnl config.m4 for PHP MCVE Extension
 
+AC_PROG_EGREP
+
 PHP_ARG_WITH(mcve, for MCVE support,
 [  --with-mcve[=DIR]   Include MCVE support. libmcve = 3.2.2 or libmonetra = 
4.0 required])
 
@@ -10,7 +12,7 @@
 
   if test $PHP_OPENSSL_DIR != no; then
 PHP_OPENSSL=$PHP_OPENSSL_DIR
-PHP_SETUP_OPENSSL(SNMP_SHARED_LIBADD, [], [
+PHP_SETUP_OPENSSL(MCVE_SHARED_LIBADD, [], [
   AC_MSG_ERROR([MCVE: OpenSSL check failed. Please check config.log for more 
information.])
 ])
   else

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/mcve config.m4

2004-05-15 Thread Brad House
bradmsswSat May 15 22:59:33 2004 EDT

  Modified files:  
/php-src/ext/mcve   config.m4 
  Log:
  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.
  
http://cvs.php.net/diff.php/php-src/ext/mcve/config.m4?r1=1.6r2=1.7ty=u
Index: php-src/ext/mcve/config.m4
diff -u php-src/ext/mcve/config.m4:1.6 php-src/ext/mcve/config.m4:1.7
--- php-src/ext/mcve/config.m4:1.6  Sat Jan 17 07:59:32 2004
+++ php-src/ext/mcve/config.m4  Sat May 15 22:59:33 2004
@@ -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 @@
   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 @@
   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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php