Skip to content

Commit

Permalink
Add support for Oracle 12: do not try to link to nnz10 but to nnz12
Browse files Browse the repository at this point in the history
  • Loading branch information
Joost van Baal-Ilić authored and peti committed Aug 26, 2015
1 parent 08242a8 commit c7eb082
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions m4/ax_lib_oracle_oci.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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],
[
Expand Down Expand Up @@ -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])
Expand Down

0 comments on commit c7eb082

Please sign in to comment.