summaryrefslogtreecommitdiff
path: root/mk/bdb.buildlink3.mk
diff options
context:
space:
mode:
authorminskim <minskim@pkgsrc.org>2004-04-25 15:06:10 +0000
committerminskim <minskim@pkgsrc.org>2004-04-25 15:06:10 +0000
commit043cd3c2c690348f1707c9349463adb50907b9fe (patch)
treed50076d92e5c25a7e9abddbbd2c151b12526a472 /mk/bdb.buildlink3.mk
parent5e52fae621d22f18099fd2443bae2e9a6f3494e6 (diff)
downloadpkgsrc-043cd3c2c690348f1707c9349463adb50907b9fe.tar.gz
Accept /usr/include/db.h as a valid db-1.85 header file only when
"^\#define.*HASHVERSION.*2$" is found.
Diffstat (limited to 'mk/bdb.buildlink3.mk')
-rw-r--r--mk/bdb.buildlink3.mk14
1 files changed, 11 insertions, 3 deletions
diff --git a/mk/bdb.buildlink3.mk b/mk/bdb.buildlink3.mk
index 6279ec12aa2..5de21798a56 100644
--- a/mk/bdb.buildlink3.mk
+++ b/mk/bdb.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bdb.buildlink3.mk,v 1.6 2004/04/15 11:11:57 wiz Exp $
+# $NetBSD: bdb.buildlink3.mk,v 1.7 2004/04/25 15:06:10 minskim Exp $
#
# This Makefile fragment is meant to be included by packages that
# require a Berkeley DB implementation. db.buildlink3.mk will:
@@ -56,11 +56,19 @@ USE_DB185?= yes
_BDB_OK.native?= no
_BDB_INSTALLED.native?= no
. if exists(/usr/include/db.h)
-_BDB_OK.native= yes
+_BDB_OK.native!= \
+ if ${GREP} -q "^\#define.*HASHVERSION.*2$$" /usr/include/db.h; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. if !empty(_BDB_OK.native:M[yY][eE][sS])
_BDB_INSTALLED.native= yes
_BDB_INCDIRS= include
_BDB_TRANSFORM= # empty
-. elif exists(/usr/include/db1/db.h)
+. endif
+. endif
+. if !empty(_BDB_OK.native:M[nN][oO]) && exists(/usr/include/db1/db.h)
_BDB_OK.native= yes
_BDB_INSTALLED.native= yes
_BDB_INCDIRS= include/db1