Permalink
Browse files

Add support for Oracle 12: do not try to link to nnz10 but to nnz12

  • Loading branch information...
Joost van Baal-Ilić authored and peti committed Jul 8, 2015
1 parent 08242a8 commit c7eb082eef9235792e1b3f343305e719e0de8e9e
Showing with 16 additions and 5 deletions.
  1. +16 −5 m4/ax_lib_oracle_oci.m4
View
@@ -41,13 +41,14 @@
# LICENSE
#
# Copyright (c) 2008 Mateusz Loskot <mateusz@loskot.net>
# Copyright (c) 2015 Joost van Baal-Ilić <joostvb+autoconf@uvt.nl>
#
# 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. This file is offered as-is, without any
# warranty.
#serial 10
#serial 11
AC_DEFUN([AX_LIB_ORACLE_OCI],
[
@@ -271,15 +272,25 @@ if (envh) OCIHandleFree(envh, OCI_HTYPE_ENV);
oracle_version_checked="yes"
AC_MSG_RESULT([yes])
dnl Add -lnnz10 flag to Oracle >= 10.x
AC_MSG_CHECKING([for Oracle version >= 10.x to use -lnnz10 flag])
oracle_nnz10_check=`expr $oracle_version_number \>\= 10 \* 1000000`
if test "$oracle_nnz10_check" = "1"; then
dnl Add -lnnz10 flag to Oracle = 10.x
AC_MSG_CHECKING([for Oracle version = 10.x to use -lnnz10 flag])
oracle_nnz_check=`expr $oracle_version_major \= 10`
if test "$oracle_nnz_check" = "1"; then
ORACLE_OCI_LDFLAGS="$ORACLE_OCI_LDFLAGS -lnnz10"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
dnl Add -lnnz12 flag to Oracle = 12.x
AC_MSG_CHECKING([for Oracle version = 12.x to use -lnnz12 flag])
oracle_nnz_check=`expr $oracle_version_major \= 12`
if test "$oracle_nnz_check" = "1"; then
ORACLE_OCI_LDFLAGS="$ORACLE_OCI_LDFLAGS -lnnz12"
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
else
oracle_version_checked="no"
AC_MSG_RESULT([no])

0 comments on commit c7eb082

Please sign in to comment.