[BACK]Return to resolv.buildlink3.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / mk

File: [cvs.NetBSD.org] / pkgsrc / mk / resolv.buildlink3.mk (download)

Revision 1.5, Sun Feb 13 16:17:54 2011 UTC (8 years, 1 month ago) by taca
Branch: MAIN
CVS Tags: pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-, HEAD
Changes since 1.4: +2 -2 lines

Use net/libbind/buildlink3.mk instead of removed net/bind95/buildlink3.mk.

# $NetBSD: resolv.buildlink3.mk,v 1.5 2011/02/13 16:17:54 taca Exp $
#
# This Makefile fragment is included by package Makefiles and
# buildlink3.mk files for the packages that need a thread-safe
# DNS resolver.
#
# It defines the variables RESOLV_LDFLAGS and RESOLV_LIBS,
# which are also exported into the CONFIGURE_ENV and MAKE_ENV environments.
#
# Package-settable variables:
#
# RESOLV_AUTO_VARS
#	When set to "yes", the necessary flags are added automatically
#	to LDFLAGS and friends.
#
#	Default: no
#
# Keywords: resolv
#

RESOLV_BUILDLINK3_MK:=	${RESOLV_BUILDLINK3_MK}+

.include "../../mk/bsd.fast.prefs.mk"

RESOLV_AUTO_VARS?=	no
CHECK_BUILTIN.resolv=	no

.if ${OPSYS} == "DragonFly" || ${OPSYS} == "FreeBSD"
USE_BUILTIN.resolv?=	yes

BUILDLINK_LDFLAGS.resolv=	# empty, in libc
.elif (${OPSYS} == "NetBSD" && empty(OS_VERSION:M[012].*)) || \
    (${OPSYS} == "Darwin" && empty(OS_VERSION:M[0123467].*))
USE_BUILTIN.resolv?=	yes

# BIND 9 resolver
BUILDLINK_LDFLAGS.resolv=	-lresolv
.else
USE_BUILTIN.resolv?=	no
.endif

.if !empty(USE_BUILTIN.resolv:M[yY][eE][sS])
BUILDLINK_TREE+=		resolv -resolv
BUILDLINK_AUTO_VARS.resolv=	${RESOLV_AUTO_VARS}
.else
.  include "../../net/libbind/buildlink3.mk"

BUILDLINK_AUTO_VARS.bind=	${RESOLV_AUTO_VARS}
BUILDLINK_LDFLAGS.resolv=	${BUILDLINK_LDFLAGS.bind}
BUILDLINK_LIBS.resolv=		${BUILDLINK_LIBS.bind}
.endif

.if !empty(RESOLV_BUILDLINK3_MK:M+)
#
# Define user-visible RESOLV_{LDFLAGS,LIBS} as compiler options used
# to link code that needs a thread-safe DNS resolver.
#
RESOLV_LDFLAGS=	${BUILDLINK_LDFLAGS.resolv}
RESOLV_LIBS=	${BUILDLINK_LIBS.resolv}
CONFIGURE_ENV+=	RESOLV_LDFLAGS=${RESOLV_LDFLAGS:Q}
CONFIGURE_ENV+=	RESOLV_LIBS=${RESOLV_LIBS:Q}
MAKE_ENV+=	RESOLV_LDFLAGS=${RESOLV_LDFLAGS:Q}
MAKE_ENV+=	RESOLV_LIBS=${RESOLV_LIBS:Q}
.endif	# RESOLV_BUILDLINK3_MK