1# $NetBSD: options.mk,v 1.1.1.2 2025/03/09 23:17:11 mrg Exp $
2
3PKG_OPTIONS_VAR=		PKG_OPTIONS.xterm
4PKG_SUPPORTED_OPTIONS=		debug pcre freetype luit xpm xterm-toolbar
5PKG_SUGGESTED_OPTIONS=		freetype luit xpm
6
7.include "../../mk/bsd.options.mk"
8
9.if !empty(PKG_OPTIONS:Mdebug)
10CONFIGURE_ARGS+=	--enable-trace
11CONFIGURE_ARGS+=	--enable-warnings
12.elif defined(PKG_DEVELOPER) && !empty(PKG_DEVELOPER:M[Yy][Ee][Ss])
13CONFIGURE_ARGS+=	--enable-warnings
14.endif
15
16.if !empty(PKG_OPTIONS:Mfreetype)
17CONFIGURE_ARGS+=	--enable-freetype
18.  include "../../x11/libXft/buildlink3.mk"
19.else
20CONFIGURE_ARGS+= --disable-freetype
21.endif
22###
23### XXX The configure test checks for pcreposix_regcomp in libpcreposix.
24###	However, there is no such function [insofar as I can tell].
25###	Moreover, libc's regex(3) functions are weak-aliased to those
26###     within libc's namespace, so we should have no problems.
27###
28.if !empty(PKG_OPTIONS:Mpcre)
29CONFIGURE_ARGS+=	--with-pcre
30CONFIGURE_ENV+=		ac_cv_lib_pcreposix_pcreposix_regcomp=yes
31.  include "../../devel/pcre/buildlink3.mk"
32.endif
33
34.if !empty(PKG_OPTIONS:Mluit)
35DEPENDS+=		luit-[0-9]*:../../x11/luit
36CONFIGURE_ARGS+=	--enable-luit --enable-mini-luit
37.else
38CONFIGURE_ARGS+=	--disable-luit --disable-mini-luit
39.endif
40
41.if !empty(PKG_OPTIONS:Mxpm)
42### nothing
43.else
44CONFIGURE_ARGS+=	--without-xpm
45.endif
46
47.if !empty(PKG_OPTIONS:Mxterm-toolbar)
48CONFIGURE_ARGS+=	--enable-toolbar
49.else
50CONFIGURE_ARGS+=	--disable-toolbar
51.endif
52