Allow definition of USE_OPENSSL_096 force a minimum dependency of

openssl>=0.9.6.
This commit is contained in:
jlam 2001-07-18 18:03:16 +00:00
parent a2719a456c
commit 8559bffd4c

View file

@ -1,14 +1,14 @@
# $NetBSD: buildlink.mk,v 1.5 2001/07/12 14:25:53 fredb Exp $
# $NetBSD: buildlink.mk,v 1.6 2001/07/18 18:03:16 jlam Exp $
#
# This Makefile fragment is included by packages that use OpenSSL.
#
# To use this Makefile fragment, simply:
#
# (1) Optionally define USE_OPENSSL_095A.
# (1) Include this Makefile fragment in the package Makefile,
# (2) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
# (1) Optionally define USE_OPENSSL_096 to require openssl>=0.9.6.
# (2) Include this Makefile fragment in the package Makefile,
# (3) Add ${BUILDLINK_DIR}/include to the front of the C preprocessor's header
# search path, and
# (3) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
# (4) Add ${BUILDLINK_DIR}/lib to the front of the linker's library search
# path.
.if !defined(OPENSSL_BUILDLINK_MK)
@ -16,8 +16,6 @@ OPENSSL_BUILDLINK_MK= # defined
.include "../../mk/bsd.buildlink.mk"
BUILDLINK_DEPENDS.openssl?= openssl-0.9.[56]*
# Check for a usable installed version of OpenSSL. Version must be greater
# than 0.9.5a. If a usable version isn't present, then use the pkgsrc
# OpenSSL package.
@ -28,10 +26,17 @@ _NEED_OPENSSL= YES
_OPENSSLV_H= /usr/include/openssl/opensslv.h
_OPENSSL_VERSION!= ${AWK} '/.*OPENSSL_VERSION_NUMBER.*/ { print $$3 }' \
${_OPENSSLV_H}
_VALID_SSL_VERSIONS= 0x0090581fL
_VALID_SSL_VERSIONS+= 0x0090600fL
_VALID_SSL_VERSIONS+= 0x0090601fL
_VALID_SSL_VERSIONS+= 0x0090602fL
BUILDLINK_DEPENDS.openssl= {openssl-0.9.5a,openssl>=0.9.6}
_VALID_SSL_VERSIONS= 0x0090581fL
.if defined(USE_OPENSSL_096)
BUILDLINK_DEPENDS.openssl= openssl>=0.9.6
_VALID_SSL_VERSIONS= 0x0090600fL
.else
_VALID_SSL_VERSIONS+= 0x0090600fL
.endif
_VALID_SSL_VERSIONS+= 0x0090601fL
_VALID_SSL_VERSIONS+= 0x0090602fL
.for PATTERN in ${_VALID_SSL_VERSIONS}
.if ${_OPENSSL_VERSION:M${PATTERN}} != ""
_NEED_OPENSSL= NO