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
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"
20 ### Build math libraries in place
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"
27 CONFIGURE_ARGS
+= --with-gmp
=${BUILDLINK_PREFIX.gmp
}
28 CONFIGURE_ARGS
+= --with-mpc
=${BUILDLINK_PREFIX.mpcomplex
}
29 CONFIGURE_ARGS
+= --with-mpfr
=${BUILDLINK_PREFIX.mpfr
}
31 .
include "../../devel/gmp/buildlink3.mk"
32 .
include "../../math/mpcomplex/buildlink3.mk"
33 .
include "../../math/mpfr/buildlink3.mk"
37 ### Native Language Support
39 .if
!empty
(PKG_OPTIONS
:Mnls
)
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"
47 CONFIGURE_ARGS
+= --disable-nls
51 ### Optional languages
52 ### Ada could be added although there is a bootstrapping issue. See
53 ### ../gcc34-ada for guidance
58 .if
!empty
(PKG_OPTIONS
:Mgcc-java
)
59 . if empty
(PKG_OPTIONS
:Mgcc-c
++)
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
79 CONFIGURE_ENV
+= JAR
=no
81 MAKE_ENV
+= ac_cv_prog_JAR
=no
83 .
include "../../devel/zlib/buildlink3.mk"
84 .
include "../../lang/python/application.mk"
87 .if
!empty
(PKG_OPTIONS
:Mgcc-c
++)
90 CONFIGURE_ARGS
+= --enable-__cxa_atexit
91 CONFIGURE_ARGS
+= --with-gxx-include-dir
=${GCC_PREFIX}/include/c
++/
94 .if
!empty
(PKG_OPTIONS
:Mgcc-fortran
)
98 .if
!empty
(PKG_OPTIONS
:Mgcc-objc
)
102 #.if !empty(PKG_OPTIONS:Mgcc-ada)