[icinga-checkins] icinga.org: icinga-core/master: prepare configure for ocilib support

git at icinga.org git at icinga.org
Mon Oct 19 18:51:26 CEST 2009


Module: icinga-core
Branch: master
Commit: db2520c7e8637790aa6559d80c781004b25289d8
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=db2520c7e8637790aa6559d80c781004b25289d8

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Sep 25 18:42:07 2009 +0200

prepare configure for ocilib support

---

 configure.in                     |   37 +++++++++++++++++++++++++++++++++++--
 docbook                          |    2 +-
 module/idoutils/include/ido2db.h |    6 +++---
 3 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/configure.in b/configure.in
index 1ee0d46..ef1c93a 100644
--- a/configure.in
+++ b/configure.in
@@ -657,7 +657,7 @@ if test x$USE_IDOUTILS = xyes; then
 	fi
 	dnl Checks for libdbi
 
-	dnl Optional GD library and include paths
+	dnl Optional libdbi library and include paths
 	AC_ARG_WITH(dbi-lib,AC_HELP_STRING([--with-dbi-lib=DIR],[sets location of the dbi library]),[
         	LDFLAGS="${LDFLAGS} -L${withval}"
 	        LD_RUN_PATH="${withval}${LD_RUN_PATH:+:}${LD_RUN_PATH}"
@@ -670,8 +670,41 @@ if test x$USE_IDOUTILS = xyes; then
 	AC_MSG_CHECKING(for libdi)
 	AC_CHECK_LIB([dbi], [main],DBLIBS="$DBCFLAGS -ldbi" , [AC_MSG_ERROR([ERROR - We really need a libdbi to link against])] )
 	AC_SUBST(DBLIBS)
-fi
 
+	dnl first approach is to provide oracle with ocilib as an addon to libdbi
+	dnl this requires libdbi installed too, only if enabled by configure, 
+	dnl oracle spexific code will be compiled - kind of easy recompiling without flag
+	dnl and getting libdbi supported rdbms back
+	dnl ocilib is to be expected in /usr/local/lib and /usr/local/include
+
+	dnl Check for optional ocilib 
+	USE_OCILIB=no
+	AC_ARG_ENABLE(idoutils_oracle,AC_HELP_STRING([--use-oracle],[enables idoutils with ocilib and oracle]),USE_OCILIB=$enableval,USE_OCILIB=no)
+	if test x$USE_OCILIB = xyes; then
+
+		dnl FIXME - allow user to set specific dirs
+		OCILIB_INC="/usr/local/include"
+		OCILIB_LIB="/usr/local/lib"
+
+		CFLAGS="${CFLAGS} -I${OCILIB_INC} -DOCI_IMPORT_UNICODE -DOCI_CHARSET_UNICODE"
+		LDFLAGS="${LDFLAGS} -L${OCILIB_LIB}"
+
+		dnl check and include ocilib.h
+		#AC_CHECK_HEADER(ocilib.h, [], [], [${OCILIB_INC}])
+
+		dnl check and include ocilib library, at runtime
+
+		AC_DEFINE(HAVE_OCILIB_H,"1")
+                dnl check libs
+                AC_MSG_CHECKING(for ocilib)
+                AC_CHECK_LIB([ocilib], [main],DBLIBS_OCI="${DBCFLAGS} -locilib" , [AC_MSG_ERROR([ERROR - We really need a ocilib to link against])] )
+		DBLIBS="${DBLIBS} ${DBLIBS_OCI}"
+                 AC_SUBST(DBLIBS) 
+
+		dnl everything went fine, set code free
+		 AC_DEFINE_UNQUOTED(USE_ORACLE)
+	fi
+fi
 
 USEPERL=no;
 INSTALLPERLSTUFF=no;
diff --git a/docbook b/docbook
index f7b6e3e..661f628 160000
--- a/docbook
+++ b/docbook
@@ -1 +1 @@
-Subproject commit f7b6e3e42596820a58d825b3e1bbdafdaea45f6e
+Subproject commit 661f628a749d9e69b0a3b7ff08dead568bb28bee
diff --git a/module/idoutils/include/ido2db.h b/module/idoutils/include/ido2db.h
index 8a3382f..f7fb9c1 100644
--- a/module/idoutils/include/ido2db.h
+++ b/module/idoutils/include/ido2db.h
@@ -12,9 +12,9 @@
 #include "../../../include/config.h"
 #include "utils.h"
 
-#ifdef USE_ORACLE
-#include "ocilib.h"
-#endif
+//#ifdef USE_ORACLE
+//#include "ocilib.h"
+//#endif
 
 
 /*************** mbuf definitions *************/





More information about the icinga-checkins mailing list