# ===========================================================================
# http://www.nongnu.org/autoconf-archive/ax_lib_oracle_oci.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_LIB_ORACLE_OCI([MINIMUM-VERSION])
#
# DESCRIPTION
#
# This macro provides tests of availability of Oracle OCI API of
# particular version or newer. This macros checks for Oracle OCI headers
# and libraries and defines compilation flags.
#
# Macro supports following options and their values:
#
# 1) Single-option usage:
#
# --with-oracle -- path to ORACLE_HOME directory
#
# 2) Two-options usage (both options are required):
#
# --with-oracle-include -- path to directory with OCI headers
# --with-oracle-lib -- path to directory with OCI libraries
#
# NOTE: These options described above do not take yes|no values. If 'yes'
# value is passed, then WARNING message will be displayed, 'no' value, as
# well as the --without-oracle-* variations will cause the macro to not
# check anything.
#
# This macro calls:
#
# AC_SUBST(ORACLE_OCI_CFLAGS)
# AC_SUBST(ORACLE_OCI_LDFLAGS)
# AC_SUBST(ORACLE_OCI_LIBS)
# AC_SUBST(ORACLE_OCI_VERSION)
#
# And sets:
#
# HAVE_ORACLE_OCI
#
# LICENSE
#
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved.
#
# ADAPTATION
#
# Macro adapted for ZABBIX usage
#
AC_DEFUN([AX_LIB_ORACLE_OCI],
[
AC_ARG_WITH([oracle],
AS_HELP_STRING([--with-oracle@<:@=ARG@:>@],[use Oracle OCI API from given Oracle home (ARG=path); use existing ORACLE_HOME (ARG=yes); disable Oracle OCI support (ARG=no)
]),
[
if test "$withval" = "no"; then
want_oracle_oci="no"
elif test "$withval" = "yes"; then
want_oracle_oci="yes"
oracle_home_dir="$ORACLE_HOME"
elif test -d "$withval"; then
want_oracle_oci="yes"
oracle_home_dir="$withval"
else
want_oracle_oci="yes"
oracle_home_dir=""
fi
],
[want_oracle_oci="no"]
)
AC_ARG_WITH([oracle-include],
AS_HELP_STRING([--with-oracle-include@<:@=DIR@:>@],[use Oracle OCI API headers from given path
]),
[
if test "$withval" != "no"; then
want_oracle_oci="yes"
oracle_home_include_dir="$withval"
fi
],
[oracle_home_include_dir=""]
)
AC_ARG_WITH([oracle-lib],
AS_HELP_STRING([--with-oracle-lib@<:@=DIR@:>@],[use Oracle OCI API libraries from given path
]),
[