Cope with a <db.h> that isn't related to DB
Jarkko Hietaniemi [Thu, 24 Apr 1997 17:28:39 +0000 (20:28 +0300)]
private-msgid: 199704241728.UAA09951@alpha.hut.fi

Configure

index 64dd01c..0dbe17c 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -8256,13 +8256,17 @@ $define)
 #include <db.h>
 main()
 {
-#ifdef DB_VERSION_MAJOR
+#ifdef DB_VERSION_MAJOR        /* DB version >= 2: not yet. */
     printf("You have Berkeley DB Version %d.%d\n",
                DB_VERSION_MAJOR, DB_VERSION_MINOR);
     printf("Perl currently only supports up to version 1.86.\n");
-    exit(1);
+    exit(2);
 #else
-    exit(0);
+#if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC)
+    exit(0);   /* DB version < 2: the coast is clear. */
+#else
+    exit(1);   /* <db.h> not Berkeley DB? */
+#endif
 #endif
 }
 EOCP