summaryrefslogtreecommitdiff
path: root/databases/db
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2004-01-01 21:10:05 +0000
committerwiz <wiz@pkgsrc.org>2004-01-01 21:10:05 +0000
commit319d87d01b3f72d64871b63587b44439ea88a77e (patch)
tree3a8383ed8fa3e2f89423e2c0cf3e03e3776e0e5a /databases/db
parent89869e41923209c846311c2d1cbc16af3e273811 (diff)
downloadpkgsrc-319d87d01b3f72d64871b63587b44439ea88a77e.tar.gz
Look inside db.h if it belongs to db3 or db4 (as it does on some
Linux distributions). Based on a patch by Min Sik Kim in PR 23944.
Diffstat (limited to 'databases/db')
-rw-r--r--databases/db/buildlink2.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/databases/db/buildlink2.mk b/databases/db/buildlink2.mk
index c713b369a4d..de5ec684459 100644
--- a/databases/db/buildlink2.mk
+++ b/databases/db/buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink2.mk,v 1.8 2003/12/04 04:14:05 grant Exp $
+# $NetBSD: buildlink2.mk,v 1.9 2004/01/01 21:10:05 wiz Exp $
.if !defined(DB_BUILDLINK2_MK)
DB_BUILDLINK2_MK= # defined
@@ -8,8 +8,13 @@ BUILDLINK_PKGSRCDIR.db?= ../../databases/db
_NEED_DB2= YES
+.include "../../mk/bsd.prefs.mk"
+
.if defined(USE_DB185)
. if exists(/usr/include/db.h) # NetBSD, Darwin
+# See if /usr/include/db.h belongs to db3 or db4
+_IS_DB34!= ${GREP} -c 'DB_VERSION_MAJOR.*[34]$$' /usr/include/db.h || ${TRUE}
+. if ${_IS_DB34} == "0"
BUILDLINK_PREFIX.db= /usr
BUILDLINK_FILES.db= include/db.h
BUILDLINK_FILES.db+= include/mpool.h
@@ -17,6 +22,7 @@ BUILDLINK_CPPFLAGS.db= # empty
BUILDLINK_LDFLAGS.db= # empty
BUILDLINK_LIBS.db= # empty
_NEED_DB2= NO
+. endif
. elif exists(/usr/include/db1/db.h)
# Linux
BUILDLINK_PREFIX.db= /usr