diff options
author | foobar <sniper@php.net> | 2003-01-24 17:51:19 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2003-01-24 17:51:19 +0000 |
commit | 142da0ed58e87e657e02fdc287eab9e16f540a2e (patch) | |
tree | 68393d0ba1a6d007401e0120a6a6eb5db81c6036 /ext/oci8/config.m4 | |
parent | 6efe008598ecb705028e638adfe7f39dff6d6b15 (diff) | |
download | php-git-142da0ed58e87e657e02fdc287eab9e16f540a2e.tar.gz |
Fix bug #21795, Undeclared statement in oci8.c (OCI_ATTR_STATEMENT)
Diffstat (limited to 'ext/oci8/config.m4')
-rw-r--r-- | ext/oci8/config.m4 | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index 626b5ce59c..4646a7011a 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -2,6 +2,22 @@ dnl dnl $Id$ dnl +AC_DEFUN(PHP_OCI_IF_DEFINED,[ + old_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$3 + AC_EGREP_CPP(yes,[ +#include <oci.h> +#if defined($1) + yes +#endif + ],[ + CPPFLAGS=$old_CPPFLAGS + $2 + ],[ + CPPFLAGS=$old_CPPFLAGS + ]) +]) + AC_DEFUN(AC_OCI8_VERSION,[ AC_MSG_CHECKING([Oracle version]) if test -s "$OCI8_DIR/orainst/unix.rgs"; then @@ -40,15 +56,19 @@ if test "$PHP_OCI8" != "no"; then if test -d "$OCI8_DIR/rdbms/public"; then PHP_ADD_INCLUDE($OCI8_DIR/rdbms/public) + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/public" fi if test -d "$OCI8_DIR/rdbms/demo"; then PHP_ADD_INCLUDE($OCI8_DIR/rdbms/demo) + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/rdbms/demo" fi if test -d "$OCI8_DIR/network/public"; then PHP_ADD_INCLUDE($OCI8_DIR/network/public) + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/network/public" fi if test -d "$OCI8_DIR/plsql/public"; then PHP_ADD_INCLUDE($OCI8_DIR/plsql/public) + OCI8_INCLUDES="$OCI8_INCLUDES -I$OCI8_DIR/plsql/public" fi if test -f "$OCI8_DIR/lib/sysliblist"; then @@ -73,8 +93,12 @@ if test "$PHP_OCI8" != "no"; then fi PHP_ADD_LIBPATH($OCI8_DIR/lib, OCI8_SHARED_LIBADD) AC_DEFINE(HAVE_OCI8_TEMP_LOB,1,[ ]) - AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ]) AC_DEFINE(HAVE_OCI8_SHARED_MODE,1,[ ]) + + dnl + dnl OCI_ATTR_STATEMENT is not available in all 8.1.x versions + dnl + PHP_OCI_IF_DEFINED(OCI_ATTR_STATEMENT, [AC_DEFINE(HAVE_OCI8_ATTR_STATEMENT,1,[ ])], $OCI8_INCLUDES) ;; 9.0) |