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