Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / lang / gcc46 / options.mk
blob5311e4ffd19e1621b971a84fd3c82b50d5282d39
1 # $NetBSD: options.mk,v 1.7 2012/04/13 10:38:26 hans Exp $
3 PKG_OPTIONS_VAR= PKG_OPTIONS.gcc46
4 PKG_SUPPORTED_OPTIONS= nls gcc-inplace-math gcc-c++ gcc-fortran gcc-java gcc-objc #gcc-ada
5 PKG_SUGGESTED_OPTIONS= gcc-c++ gcc-fortran gcc-objc
6 .if ${OPSYS} == "NetBSD"
7 PKG_SUGGESTED_OPTIONS+= nls
8 .elif ${OPSYS} == "SunOS"
9 PKG_SUGGESTED_OPTIONS+= gcc-inplace-math
10 .endif
12 PKG_OPTIONS_LEGACY_VARS+= BUILD_CXX:gcc-c++
13 PKG_OPTIONS_LEGACY_VARS+= BUILD_FORTRAN:gcc-fortran
14 PKG_OPTIONS_LEGACY_VARS+= BUILD_JAVA:gcc-java
15 PKG_OPTIONS_LEGACY_VARS+= BUILD_OBJC:gcc-objc
17 .include "../../mk/bsd.options.mk"
19 ###
20 ### Build math libraries in place
21 ###
22 .if !empty(PKG_OPTIONS:Mgcc-inplace-math)
23 .include "../../devel/gmp/inplace.mk"
24 .include "../../math/mpcomplex/inplace.mk"
25 .include "../../math/mpfr/inplace.mk"
26 .else
27 CONFIGURE_ARGS+= --with-gmp=${BUILDLINK_PREFIX.gmp}
28 CONFIGURE_ARGS+= --with-mpc=${BUILDLINK_PREFIX.mpcomplex}
29 CONFIGURE_ARGS+= --with-mpfr=${BUILDLINK_PREFIX.mpfr}
30 LIBS.SunOS+= -lgmp
31 .include "../../devel/gmp/buildlink3.mk"
32 .include "../../math/mpcomplex/buildlink3.mk"
33 .include "../../math/mpfr/buildlink3.mk"
34 .endif
36 ###
37 ### Native Language Support
38 ###
39 .if !empty(PKG_OPTIONS:Mnls)
40 USE_TOOLS+= msgfmt
41 CONFIGURE_ARGS+= --enable-nls
42 CONFIGURE_ARGS+= --with-libiconv-prefix=${BUILDLINK_PREFIX.libiconv}
43 MAKE_ENV+= ICONVPREFIX=${BUILDLINK_PREFIX.iconv}
44 .include "../../converters/libiconv/buildlink3.mk"
45 .include "../../devel/gettext-lib/buildlink3.mk"
46 .else
47 CONFIGURE_ARGS+= --disable-nls
48 .endif
50 ###
51 ### Optional languages
52 ### Ada could be added although there is a bootstrapping issue. See
53 ### ../gcc34-ada for guidance
54 ###
56 LANGS= c
58 .if !empty(PKG_OPTIONS:Mgcc-java)
59 . if empty(PKG_OPTIONS:Mgcc-c++)
60 PKG_OPTIONS+= gcc-c++
61 . endif
63 LANGS+= java
64 REPLACE_PYTHON= libjava/contrib/aot-compile.in
66 USE_TOOLS+= unzip zip:run
67 CONFIGURE_ARGS+= --with-system-zlib
69 # ${WRKSRC}/gcc-4.6.1/libjava/contrib/aotcompile.py.in stores the path to
70 # a 'make' program so we need to make sure we give it the installed # 'make' and not
71 # the tool wrapped one.
72 CONFIGURE_ENV+= PKGSRC_MAKE=${TOOLS_PATH.gmake}
73 MAKE_ENV+= PKGSRC_MAKE=${TOOLS_PATH.gmake}
75 # fastjar-0.93 from pkgsrc/archivers/fastjar seems to trigger a build
76 # failure (seen on NetBSD-5.0/i386) when building java. So in case
77 # the fastjar package is installed, make sure the configure script
78 # doesn't pick it up.
79 CONFIGURE_ENV+= JAR=no
80 MAKE_ENV+= JAR=no
81 MAKE_ENV+= ac_cv_prog_JAR=no
83 .include "../../devel/zlib/buildlink3.mk"
84 .include "../../lang/python/application.mk"
85 .endif
87 .if !empty(PKG_OPTIONS:Mgcc-c++)
88 LANGS+= c++
89 USE_TOOLS+= perl
90 CONFIGURE_ARGS+= --enable-__cxa_atexit
91 CONFIGURE_ARGS+= --with-gxx-include-dir=${GCC_PREFIX}/include/c++/
92 .endif
94 .if !empty(PKG_OPTIONS:Mgcc-fortran)
95 LANGS+= fortran
96 .endif
98 .if !empty(PKG_OPTIONS:Mgcc-objc)
99 LANGS+= objc
100 .endif
102 #.if !empty(PKG_OPTIONS:Mgcc-ada)
103 #LANGS+= ada
104 #.endif