aboutsummaryrefslogtreecommitdiff
path: root/m4/liboci.m4
diff options
context:
space:
mode:
authorConstantin Michael <constantin@codesynthesis.com>2011-11-25 15:19:24 +0200
committerConstantin Michael <constantin@codesynthesis.com>2011-11-28 12:27:28 +0200
commitbc5c60b4694baa76a2584802cdc464144536fb2d (patch)
tree4efa31d437e8338ff6c590df7f27941b45ab9b56 /m4/liboci.m4
parentca2bec1322525e0c7ce5c316c3ed19b52d800bdf (diff)
Corrections to OCI automake configuration scripts
Diffstat (limited to 'm4/liboci.m4')
-rw-r--r--m4/liboci.m420
1 files changed, 14 insertions, 6 deletions
diff --git a/m4/liboci.m4 b/m4/liboci.m4
index 7fc0447..e21b956 100644
--- a/m4/liboci.m4
+++ b/m4/liboci.m4
@@ -12,7 +12,7 @@ oci_found=no
AC_ARG_WITH(
[oci],
- [AC_HELP_STRING([--with-oci=DIR],[location of oci sdk directory])],
+ [AC_HELP_STRING([--with-oci=DIR],[oracle home or instant client directory])],
[oci_dir=${withval}],
[oci_dir=])
@@ -25,8 +25,8 @@ save_LIBS="$LIBS"
# If oci_dir was given, add the necessary preprocessor and linker flags.
#
if test x"$oci_dir" != x; then
- # Check whether oci_dir refers to an Oracle server or an Instant Client
- # installation.
+ # Check whether oci_dir refers to Oracle home or an Instant Client
+ # directory.
#
if test -d "$oci_dir/sdk/include"; then
CPPFLAGS="$CPPFLAGS -I$oci_dir/sdk/include"
@@ -52,7 +52,7 @@ oci_found=yes
if test x"$oci_found" = xno; then
LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS -Wc,`ls $oci_dir/libclntsh.so.* 2>/dev/null`"
+ LIBS="-Wc,`ls $oci_dir/libclntsh.* 2>/dev/null` $save_LIBS"
fi
elif test -d "$oci_dir/rdbms/public"; then
CPPFLAGS="$CPPFLAGS -I$oci_dir/rdbms/public"
@@ -61,7 +61,9 @@ oci_found=yes
fi
fi
-CXX_LIBTOOL_LINK_IFELSE(
+if test x"$oci_found" = xno; then
+
+ CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[
#include <oci.h>
@@ -78,14 +80,20 @@ main ()
oci_found=yes
])
+fi
+
if test x"$oci_found" = xno; then
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+
# Try using ORACLE_HOME if it exists.
#
if test x"$ORACLE_HOME" != x; then
CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/rdbms/public"
LDFLAGS="$LDFLAGS -L$ORACLE_HOME/lib"
- LIBS="$LIBS -lclntsh"
+ LIBS="-lclntsh $LIBS"
CXX_LIBTOOL_LINK_IFELSE(
AC_LANG_SOURCE([[