diff --git a/src/modules/Oracle/configure.in b/src/modules/Oracle/configure.in
index 69699047a66f4941bc79c8d74b882dde288cdaf1..c37d547ad584e24c44142c373be17cfe1a324ed4 100755
--- a/src/modules/Oracle/configure.in
+++ b/src/modules/Oracle/configure.in
@@ -1,5 +1,5 @@
 #
-# $Id: configure.in,v 1.17 2000/03/30 08:40:31 hubbe Exp $
+# $Id: configure.in,v 1.18 2000/03/30 09:52:53 hubbe Exp $
 #
 # Configure script for the oracle module
 #
@@ -255,13 +255,22 @@ EOF
 
     OLDLIBS=LIBS
     LIBS="$LIBS $ORACLE_LIBS"
-    AC_CHECK_LIB(client, oopen, [
-      LDFLAGS="$EXTRALDFLAGS $LDFLAGS"
+
+    AC_MSG_CHECKING(for working Oracle libs)
+    AC_CACHE_VAL(pike_cv_working_oracle,[
+      AC_TRY_COMPILE([
+#include <oci.h>
+],[
+  OCIInitialize(OCI_DEFAULT,0,0,0,0);
+],pike_cv_working_oracle=yes,pike_cv_working_oracle=no)
+    ])
+    AC_MSG_RESULT($pike_cv_working_oracle)
+    if test x$pike_cv_working_oracle = xyes ; then
       AC_DEFINE(HAVE_ORACLE)
-    ], [
+      LDFLAGS="$EXTRALDFLAGS $LDFLAGS"
+    else
       ORACLE_LIBS=""
-    ])
-    LIBS="$OLDLIBS"
+    fi
   fi
 
 else
diff --git a/src/modules/Oracle/module.pmod.in b/src/modules/Oracle/module.pmod.in
index 62cab62420088449050a0164b98c8824888d4ef9..bdb85569fc2b83aad4489550585624a9a7dd1848 100644
--- a/src/modules/Oracle/module.pmod.in
+++ b/src/modules/Oracle/module.pmod.in
@@ -1,3 +1,5 @@
+#if consant(@module@.oracle)
+
 inherit @module@ : M;
 
 class oracle
@@ -31,3 +33,5 @@ class oracle
       }
     }
 }
+
+#endif
\ No newline at end of file