diff options
Diffstat (limited to 'm4/ax_lib_oracle_oci.m4')
-rw-r--r-- | m4/ax_lib_oracle_oci.m4 | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/m4/ax_lib_oracle_oci.m4 b/m4/ax_lib_oracle_oci.m4 index cb8ccdb4785..ec1efd0a5e9 100644 --- a/m4/ax_lib_oracle_oci.m4 +++ b/m4/ax_lib_oracle_oci.m4 @@ -291,7 +291,7 @@ Please, locate Oracle directories using --with-oracle or \ AC_LINK_IFELSE([ AC_LANG_PROGRAM([[@%:@include <oci.h>]], [[ -OCIEnv* envh = 0; +OCIEnv *envh = 0; OCIEnvNlsCreate(&envh, OCI_DEFAULT, 0, 0, 0, 0, 0, 0, 0, 0); if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV); ]] @@ -309,6 +309,33 @@ if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV); ) fi + dnl + dnl Check OCIServerRelease2() API + dnl + if test "$oci_header_found" = "yes"; then + + AC_MSG_CHECKING([for Oracle OCIServerRelease2() API in $oracle_lib_dir]) + + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([[@%:@include <oci.h>]], + [[ +OCIEnv *envh = 0; +OCIError *errh = 0; +OraText buf[256]; +ub4 version; +sword ret = OCIServerRelease2(envh, errh, buf, (ub4)sizeof(buf), OCI_HTYPE_SVCCTX, &version, OCI_DEFAULT); + ]] + )], + [ + AC_DEFINE(HAVE_OCI_SERVER_RELEASE2, 1, [Define to 1 if OCIServerRelease2 API are supported.]) + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT([no]) + ] + ) + fi + CPPFLAGS="$saved_CPPFLAGS" LDFLAGS="$saved_LDFLAGS" LIBS="$saved_LIBS" |