summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Fernando Muñoz Mejías <Luis.Fernando.Munoz.Mejias@cern.ch>2009-03-25 18:16:25 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-03-25 18:48:36 +0100
commitb8f10ad00853275045180738b91e90a80c7693cc (patch)
tree5e1a50b3f6b1e3b4ad64a4e28dc45837e40c7d11
parent97480eafbc67ec7e84497868a1777ce0d7881e6c (diff)
downloadrsyslog-b8f10ad00853275045180738b91e90a80c7693cc.tar.gz
rsyslog-b8f10ad00853275045180738b91e90a80c7693cc.tar.xz
rsyslog-b8f10ad00853275045180738b91e90a80c7693cc.zip
Include omoracle in the build system.
Add configure option to build the oracle support, named --enable-oracle and fix the Makefile.am accordingly.
-rw-r--r--Makefile.am7
-rw-r--r--configure.ac36
-rw-r--r--plugins/omoracle/Makefile.am2
3 files changed, 42 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 87e378ee..a5c3e267 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -110,15 +110,20 @@ if ENABLE_RFC3195
SUBDIRS += plugins/im3195
endif
+if ENABLE_ORACLE
+SUBDIRS += plugins/omoracle
+endif
+
# tests are added as last element, because tests may need different
# modules that need to be generated first
SUBDIRS += tests
+
# make sure "make distcheck" tries to build all modules. This means that
# a developer must always have an environment where every supporting library
# is available. If that is not the case, the respective configure option may
# temporarily be removed below. The intent behind forcing everthing to compile
# in a make distcheck is so that we detect code that accidently was not updated
# when some global update happened.
-DISTCHECK_CONFIGURE_FLAGS=--enable-gssapi_krb5 --enable-imfile --enable-snmp --enable-pgsql --enable-libdbi --enable-mysql --enable-omtemplate --enable-imtemplate --enable-relp --enable-rsyslogd --enable-mail --enable-klog --enable-diagtools --enable-gnutls
+DISTCHECK_CONFIGURE_FLAGS=--enable-gssapi_krb5 --enable-imfile --enable-snmp --enable-pgsql --enable-libdbi --enable-mysql --enable-omtemplate --enable-imtemplate --enable-relp --enable-rsyslogd --enable-mail --enable-klog --enable-diagtools --enable-gnutls --enable-oracle
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index 0c9483ca..9be3c7ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,7 +452,39 @@ AM_CONDITIONAL(ENABLE_PGSQL, test x$enable_pgsql = xyes)
AC_SUBST(PGSQL_CFLAGS)
AC_SUBST(PGSQL_LIBS)
-
+# oracle (OCI) support
+AC_ARG_ENABLE(oracle,
+ [AS_HELP_STRING([--enable-oracle],[Enable native Oracle database support @<:@default=no@:>@])],
+ [case "${enableval}" in
+ yes) enable_oracle="yes" ;;
+ no) enable_oracle="no" ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-oracle) ;;
+ esac],
+ [enable_oracle=no]
+)
+if test "x$enable_oracle" = "xyes"; then
+ AC_CHECK_PROG(
+ [HAVE_ORACLE_CONFIG],
+ [oracle-instantclient-config],
+ [yes],,,
+ )
+ if test "x${HAVE_ORACLE_CONFIG}" != "xyes"; then
+ AC_MSG_FAILURE([oracle-instantclient-config not found in PATH])
+ fi
+ AC_CHECK_LIB(
+ [occi],
+ [OCIEnvCreate],
+ [ORACLE_CFLAGS="`oracle-instantclient-config --cflags`"
+ ORACLE_LIBS="`oracle-instantclient-config --libs`"
+ ],
+ [AC_MSG_FAILURE([Oracle (OCI) libraray is missing])],
+ [`oracle-instantclient-config --libs --cflags`]
+ )
+fi
+AM_CONDITIONAL(ENABLE_ORACLE, test x$enable_oracle = xyes)
+AC_SUBST(ORACLE_CFLAGS)
+AC_SUBST(ORACLE_LIBS)
+
# libdbi support
AC_ARG_ENABLE(libdbi,
[AS_HELP_STRING([--enable-libdbi],[Enable libdbi database support @<:@default=no@:>@])],
@@ -712,6 +744,7 @@ AC_CONFIG_FILES([Makefile \
plugins/omlibdbi/Makefile \
plugins/ommail/Makefile \
plugins/omsnmp/Makefile \
+ plugins/omoracle/Makefile \
tests/Makefile])
AC_OUTPUT
@@ -725,6 +758,7 @@ echo "Zlib compression support enabled: $enable_zlib"
echo "MySql support enabled: $enable_mysql"
echo "libdbi support enabled: $enable_libdbi"
echo "PostgreSQL support enabled: $enable_pgsql"
+echo "Oracle (OCI) support enabled: $enable_oracle"
echo "SNMP support enabled: $enable_snmp"
echo "Mail support enabled: $enable_mail"
echo "RELP support enabled: $enable_relp"
diff --git a/plugins/omoracle/Makefile.am b/plugins/omoracle/Makefile.am
index 6b75218f..11257fb2 100644
--- a/plugins/omoracle/Makefile.am
+++ b/plugins/omoracle/Makefile.am
@@ -5,4 +5,4 @@ omoracle_la_CPPFLAGS = $(RSRT_CFLAGS) $(PTHREADS_CFLAGS) $(ORACLE_CFLAGS)
omoracle_la_LDFLAGS = -module -avoid-version
omoracle_la_LIBADD = $(ORACLE_LIBS)
-EXTRA_DIST =
+#EXTRA_DIST =