[icinga-checkins] icinga.org: icinga-core/master: initial linking against ocilib

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


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

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

initial linking against ocilib

---

 configure    |   98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 configure.in |    6 ++--
 2 files changed, 101 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index c1b8a6c..e7c4bee 100755
--- a/configure
+++ b/configure
@@ -1324,6 +1324,7 @@ Optional Features:
                           timing
   --enable-event-broker   enables integration of event broker routines
   --enable-idoutils       enables database connectivity using idoutils
+  --enable-oracle         enables idoutils with ocilib and oracle
   --enable-embedded-perl  will enable embedded Perl interpreter
   --enable-cygwin         enables building under the CYGWIN environment
   --enable-libtap         Enable built-in libtap for unit-testing (default:
@@ -7787,8 +7788,105 @@ echo "$as_me: error: ERROR - We really need a libdbi to link against" >&2;}
 fi
 
 
+
+
+		USE_OCILIB=no
+	# Check whether --enable-oracle was given.
+if test "${enable_oracle+set}" = set; then
+  enableval=$enable_oracle; USE_OCILIB=$enableval
+else
+  USE_OCILIB=no
+fi
+
+	if test x$USE_OCILIB = xyes; then
+
+				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"
+
+				#AC_CHECK_HEADER(ocilib.h, [], [], [${OCILIB_INC}])
+
+
+		cat >>confdefs.h <<\_ACEOF
+#define HAVE_OCILIB_H "1"
+_ACEOF
+
+                                { echo "$as_me:$LINENO: checking for ocilib" >&5
+echo $ECHO_N "checking for ocilib... $ECHO_C" >&6; }
+                { echo "$as_me:$LINENO: checking for main in -locilib" >&5
+echo $ECHO_N "checking for main in -locilib... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ocilib_main+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-locilib  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+
+int
+main ()
+{
+return main ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ocilib_main=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_ocilib_main=no
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ocilib_main" >&5
+echo "${ECHO_T}$ac_cv_lib_ocilib_main" >&6; }
+if test $ac_cv_lib_ocilib_main = yes; then
+  DBLIBS_OCI="${DBCFLAGS} -locilib"
+else
+  { { echo "$as_me:$LINENO: error: ERROR - We really need a ocilib to link against" >&5
+echo "$as_me: error: ERROR - We really need a ocilib to link against" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+		DBLIBS="${DBLIBS} ${DBLIBS_OCI}"
+
+
+				 cat >>confdefs.h <<_ACEOF
+#define USE_ORACLE 1
+_ACEOF
+
+	fi
+fi
 
 USEPERL=no;
 INSTALLPERLSTUFF=no;
diff --git a/configure.in b/configure.in
index ef1c93a..ea2e189 100644
--- a/configure.in
+++ b/configure.in
@@ -679,15 +679,15 @@ if test x$USE_IDOUTILS = xyes; then
 
 	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)
+	AC_ARG_ENABLE(oracle,AC_HELP_STRING([--enable-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}"
+		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}])





More information about the icinga-checkins mailing list