summaryrefslogtreecommitdiff
path: root/textproc/groff
diff options
context:
space:
mode:
authorhans <hans>2012-03-31 20:17:13 +0000
committerhans <hans>2012-03-31 20:17:13 +0000
commit862b1fb7b1baa5ecfd311ac38f91d43337d26f25 (patch)
treee8c4557024a0618b1ac48d737bee5eb448948451 /textproc/groff
parent22c65a827eaca13312520e5ae41a57e244fe058e (diff)
downloadpkgsrc-862b1fb7b1baa5ecfd311ac38f91d43337d26f25.tar.gz
Make CFLAGS.SunOS specific to gcc>=4.6
On SunOS, gcc 4.6 and later enable c99 and XPG6 features for c++, but the configure check for iconv uses plain c and gets a pre-XPG6 prototype for iconv(). This inconsistency then leads to failure when building preconv.
Diffstat (limited to 'textproc/groff')
-rw-r--r--textproc/groff/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/textproc/groff/Makefile b/textproc/groff/Makefile
index a0030f771f9..9f5094ff9f7 100644
--- a/textproc/groff/Makefile
+++ b/textproc/groff/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.62 2012/02/29 13:34:24 hans Exp $
+# $NetBSD: Makefile,v 1.63 2012/03/31 20:17:13 hans Exp $
#
DISTNAME= groff-1.20.1
@@ -22,8 +22,6 @@ CONFIGURE_ENV+= PERLPATH=${PERL5:Q}
USE_TOOLS+= perl:run sed:run awk:run
USE_FEATURES= getopt_long
-CFLAGS.SunOS+= -std=c99 -D_XOPEN_SOURCE=600
-
INFO_FILES= YES
REPLACE_AWK+= font/devlj4/generate/special.awk
@@ -58,6 +56,11 @@ BUILD_DEFS+= PAPERSIZE
CONFIGURE_ENV+= PAGE=${PAPERSIZE:Q}
.endif
+.include "../../mk/compiler.mk"
+.if !empty(CC_VERSION:Mgcc-4.[6-9].*)
+CFLAGS.SunOS+= -std=c99 -D_XOPEN_SOURCE=600
+.endif
+
# Usually the mdoc.local "volume-operating-system" definition is for
# the operating system name often displayed on top of man pages. And
# "operating-system" is for the default .Os value (operating system