summaryrefslogtreecommitdiff
path: root/features/mkc_imp.f_warn.mk
blob: c494d50d4580b220846423c3a72043edc62f652b (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
27
28
29
# Copyright (c) 2014 by Aleksey Cheusov
#
# See LICENSE file in the distribution.
############################################################
.ifndef _MKC_IMP_F_WARN_MK
_MKC_IMP_F_WARN_MK := 1

.include <mkc_imp.f_progname.mk>

.include <mkc_imp.conf-cleanup.mk>

MKC_CHECK_HEADERS       +=	err.h
MKC_CHECK_FUNCLIBS      +=	warn warnx vwarn vwarnx
MKC_CHECK_FUNCS2        +=	warn:err.h warnx:err.h vwarn:err.h vwarnx:err.h

.include <mkc_imp.conf-cleanup.mk>

.if ${HAVE_FUNCLIB.warn:U0} && ${HAVE_FUNCLIB.warnx:U0} && \
    ${HAVE_FUNCLIB.vwarn:U0} && ${HAVE_FUNCLIB.vwarnx:U0} && \
    ${HAVE_FUNC2.warn.err_h:U0} && ${HAVE_FUNC2.warnx.err_h:U0} && \
    ${HAVE_FUNC2.vwarn.err_h:U0} && ${HAVE_FUNC2.vwarnx.err_h:U0}
CFLAGS +=	-DMKC_WARN_IS_FINE
.else
MKC_SRCS +=	${FEATURESDIR}/warn/warn.c
.endif

.include <mkc_imp.conf-final.mk>

.endif # _MKC_IMP_F_WARN_MK