jdk/make/common/shared/Sanity.gmk

Print this page

        

@@ -891,10 +891,47 @@
             "" >> $(ERROR_FILE) ; \
         fi
 endif
 
 ######################################################
+#  BDB_HEADERS_PATH must be valid
+######################################################
+BDB_IMPORT_CHECK=true
+sane-libdb:
+ifdef USE_SYSTEM_BDB
+  ifneq ($(PLATFORM), windows)
+        @if [ ! -r $(BDB_HEADERS_PATH)/db.h ]; then \
+         $(ECHO) "ERROR: You do not have access to valid Berkeley DB header files. \n" \
+          "      Please check your access to \n" \
+          "          $(BDB_HEADERS_PATH)/db.h \n" \
+          "      and/or check your value of ALT_BDB_HEADERS_PATH, \n" \
+          "      libdb<major>.<minor>-dev is frequently pre-installed on many systems, \n" \
+          "      or may be downloaded from your distributions repository or \n" \
+          "      http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html \n" \
+          "" >> $(ERROR_FILE) ; \
+        fi
+  endif
+else # We must have a valid libdb-rds and db.h
+    ifeq ($(BDB_IMPORT_CHECK),true)
+        @if [ ! -r $(BDB_IMPORT_PATH)/lib/$(LIBARCH)/$(LIB_PREFIX)db-rds.$(LIBRARY_SUFFIX) ]; then \
+          $(ECHO) "ERROR: BDB_IMPORT_PATH does not point to a valid libdb-rds. \n" \
+            "      Please check your access to \n" \
+            "          $(BDB_IMPORT_PATH)/lib/$(LIBARCH)/$(LIB_PREFIX)db-rds.$(LIBRARY_SUFFIX) \n" \
+            "      and/or check your value of ALT_BDB_IMPORT_PATH. \n" \
+            "" >> $(ERROR_FILE) ; \
+        fi
+        @if [ ! -r $(BDB_IMPORT_PATH)/header/db.h ]; then \
+          $(ECHO) "ERROR: BDB_IMPORT_PATH does not point to a valid db.h. \n" \
+            "      Please check your access to \n" \
+            "          $(BDB_IMPORT_PATH)/header/db.h \n" \
+            "      and/or check your value of ALT_BDB_IMPORT_PATH. \n" \
+            "" >> $(ERROR_FILE) ; \
+        fi
+    endif
+endif
+
+######################################################
 # Check for existence of DEVTOOLS_PATH
 # All needed tools come with base system on Apple
 ######################################################
 sane-devtools_path:
 ifneq ($(OS_VENDOR), Apple)