diff --git a/m4/ax_lib_oracle_oci.m4 b/m4/ax_lib_oracle_oci.m4 index a08a7b0..7e53862 100644 --- a/m4/ax_lib_oracle_oci.m4 +++ b/m4/ax_lib_oracle_oci.m4 @@ -242,12 +242,12 @@ if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV); if test "$oci_header_found" = "yes" -a "$oci_lib_found" = "yes" -a \ -n "$oracle_version_req"; then - oracle_version_major=`cat $oracle_include_dir/oci.h \ + oracle_version_major=`cat $oracle_include_dir/oci*.h \ | grep '#define.*OCI_MAJOR_VERSION.*' \ | sed -e 's/#define OCI_MAJOR_VERSION *//' \ | sed -e 's/ *\/\*.*\*\///'` - oracle_version_minor=`cat $oracle_include_dir/oci.h \ + oracle_version_minor=`cat $oracle_include_dir/oci*.h \ | grep '#define.*OCI_MINOR_VERSION.*' \ | sed -e 's/#define OCI_MINOR_VERSION *//' \ | sed -e 's/ *\/\*.*\*\///'` diff --git a/src/main.c b/src/main.c index 62c8412..9655c7a 100644 --- a/src/main.c +++ b/src/main.c @@ -190,11 +190,13 @@ int main(int argc, const char *argv[]) { "rm", '\0', POPT_ARG_NONE, 0, ACTION_RM, "Remove file from Oracle directory" }, { "sysdba", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSDBA, "Connect as SYSDBA" }, { "sysoper", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSOPER, "Connect as SYSOPER" }, +#if OCI_MAJOR_VERSION >= 12 { "sysasm", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSASM, "Connect as SYSASM" }, { "sysbkp", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSBKP, "Connect as SYSBKP" }, { "sysdgd", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSDGD, "Connect as SYSDGD" }, { "syskmt", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSKMT, "Connect as SYSKMT" }, { "sysrac", '\0', POPT_ARG_VAL, &programOptions.adminMode, OCI_SYSRAC, "Connect as SYSRAC" }, +#endif { NULL, '\0', POPT_ARG_INCLUDE_TABLE, transferModeOptions, 0, "Transfer options:" }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, compressionOptions, 0, "Compression options:" }, { NULL, '\0', POPT_ARG_INCLUDE_TABLE, lsOptions, 0, "File list options:" },