From ede47339e7c3893eb4c9f04985d8271f22c4397d Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Nov 2016 15:40:02 +0200 Subject: Update to better support new instant client installation layout (autotools) --- m4/liboci.m4 | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'm4/liboci.m4') diff --git a/m4/liboci.m4 b/m4/liboci.m4 index 7d9cb52..0d180bf 100644 --- a/m4/liboci.m4 +++ b/m4/liboci.m4 @@ -112,12 +112,36 @@ main () oci_found=yes ]) + # Try the new Instant Client layout. + # + if test x"$oci_found" = xno; then + CPPFLAGS="$CPPFLAGS -I$ORACLE_HOME/include" + LDFLAGS="$LDFLAGS -L$ORACLE_HOME/lib" + LIBS="-lclntsh $LIBS" + + CXX_LIBTOOL_LINK_IFELSE([ +AC_LANG_SOURCE([ +#include + +int +main () +{ + OCIEnv* env (0); + OCIEnvNlsCreate (&env, OCI_THREADED, 0, 0, 0, 0, 0, 0, 0, 0); + OCIHandleFree (env, OCI_HTYPE_ENV); + return 0; +} +])], +[ +oci_found=yes +]) + fi + if test x"$oci_found" = xno; then CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" fi - fi fi -- cgit v1.1