summaryrefslogtreecommitdiff
path: root/devel/libgetopt/builtin.mk
blob: 74615cdb8be3bef46633ee5b9501c079d50e1516 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $NetBSD: builtin.mk,v 1.1 2004/03/10 17:57:14 jlam Exp $

.if !defined(IS_BUILTIN.getopt)
IS_BUILTIN.getopt=	no
.  if exists(/usr/include/getopt.h)
IS_BUILTIN.getopt=	yes
.  endif
.endif

CHECK_BUILTIN.getopt?=	no
.if !empty(CHECK_BUILTIN.getopt:M[yY][eE][sS])
USE_BUILTIN.getopt=	yes
.endif

USE_BUILTIN.getopt?=	${IS_BUILTIN.getopt}

.if !empty(USE_BUILTIN.getopt:M[nN][oO])
LIBGETOPT=	-lgetopt
.else
LIBGETOPT=	# empty
.endif

BUILDLINK_LDADD.getopt?=	${LIBGETOPT}

CONFIGURE_ENV+=		LIBGETOPT="${LIBGETOPT}"
MAKE_ENV+=		LIBGETOPT="${LIBGETOPT}"