Code

Merge branch 'ff/oracle'
authorFlorian Forster <octo@noris.net>
Fri, 31 Oct 2008 10:31:43 +0000 (11:31 +0100)
committerFlorian Forster <octo@noris.net>
Fri, 31 Oct 2008 10:31:43 +0000 (11:31 +0100)
Conflicts:

configure.in

1  2 
configure.in
src/Makefile.am
src/collectd.conf.pod

diff --cc configure.in
index 9319d5fce11c7ac865b77dbee14434a93f294c95,538bcfe2b5b985ed59a9da163bf9d4c715d444bd..6eb2cc67f0e8a19b4d7e816d15bf45977b44f362
  fi
  AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
  AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
 +# }}}
  
++# --with-oracle {{{
+ with_oracle_cppflags=""
+ with_oracle_libs=""
+ AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
+ [
+       if test "x$withval" = "xyes"
+       then
+               if test "x$ORACLE_HOME" = "x"
+               then
+                       AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
+               fi
+               with_oracle="yes"
+       else if test "x$withval" = "xno"
+       then
+               with_oracle="no"
+       else
+               with_oracle="yes"
+               ORACLE_HOME="$withval"
+       fi; fi
+ ],
+ [
+       if test "x$ORACLE_HOME" = "x"
+       then
+               with_oracle="no (ORACLE_HOME is not set)"
+       else
+               with_oracle="yes"
+       fi
+ ])
+ if test "x$ORACLE_HOME" != "x"
+ then
+       with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
+       if test -e "$ORACLE_HOME/lib/ldflags"
+       then
+               with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
+       fi
+       #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
+       with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
+ fi
+ if test "x$with_oracle" = "xyes"
+ then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
+       AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+ fi
+ if test "x$with_oracle" = "xyes"
+ then
+       SAVE_CPPFLAGS="$CPPFLAGS"
+       SAVE_LDFLAGS="$LDFLAGS"
+       CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
+       LDFLAGS="$LDFLAGS $with_oracle_libs"
+       AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
+       CPPFLAGS="$SAVE_CPPFLAGS"
+       LDFLAGS="$SAVE_LDFLAGS"
+ fi
+ if test "x$with_oracle" = "xyes"
+ then
+       BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
+       BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
+       AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
+       AC_SUBST(BUILD_WITH_ORACLE_LIBS)
+ fi
++# }}}
 +# --with-libowcapi {{{
  with_libowcapi_cppflags=""
  with_libowcapi_libs="-lowcapi"
  AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
diff --cc src/Makefile.am
Simple merge
Simple merge