Sync Mk with ports
[dports.git] / Mk / bsd.wx.mk
1 # $FreeBSD$
2 #
3 # bsd.wx.mk - Support for wxWidgets based ports.
4 #
5 # Created by: Alejandro Pulver <alepulver@FreeBSD.org>
6 #
7 # The following variables can be defined in a port that uses the wxWidgets
8 # library, contributed libraries, WxPython and/or more wxWidgets related
9 # components (with run and/or build dependencies). It can be used after and/or
10 # before bsd.port.pre.mk, but Python components will only work if Python
11 # variables (e.g. USE_PYTHON) are defined before it (this is a bsd.python.mk
12 # limitation), at least it is manually included.
13 # USE_WX        - Set to the list of wxWidgets versions that can be used by
14 #                 the port. The syntax allows the following elements:
15 #                 - Single version (e.g. "3.0").
16 #                 - Range of versions (e.g. "2.8-3.0"). Must be ascending.
17 #                 - Partial range: single version and upper (e.g. "2.8+").
18 #                 - Partial range: single version and lower (e.g. "-2.8").
19 #                 Multiple elements can be specified separated by spaces.
20 # USE_WX_NOT    - Set to the list of wxWidgets versions that can't be used by
21 #                 the port. In other words, it removes some versions from
22 #                 USE_WX. If the latter is not defined, it will have the value
23 #                 of all the possible versions. The syntax is like USE_WX.
24 # WX_COMPS      - Set to the list of wxWidgets components the port uses.
25 #                 Several components can be specified separated by spaces. By
26 #                 default it will have the value of "wx". Suffixes in the form
27 #                 ":xxx" may be added to the components to determine the
28 #                 dependency type.
29 #                 The available components are:
30 #                 wx            - The wxWidgets library.
31 #                 contrib       - The wxWidgets contributed libraries.
32 #                 python        - The wxWidgets API for Python.
33 #                 The available dependency types are:
34 #                 build         - Requires component for building.
35 #                 lib           - Requires component for building and running.
36 #                 run           - Requires component for running.
37 #                 If no suffix is present then "run" will be used for "python"
38 #                 and "lib" for others.
39 # WX_CONF_ARGS  - Set to "absolute" or "relative" if the port needs configure
40 #                 arguments in addition to the WX_CONFIG environment variable.
41 #                 It determines the type of parameters that have to be passed
42 #                 to the configure script. In the first case it adds
43 #                 "--with-wx-config=${WX_CONFIG}" (absolute path of
44 #                 WX_CONFIG), and in second one "--with-wx=${LOCALBASE}" plus
45 #                 "--with-wx-config=${WX_CONFIG:T} (prefix and name).
46 # WX_PREMK      - Define to determine version and define WX_CONFIG/WX_VERSION
47 #                 after <bsd.port.pre.mk> (in case the port needs to manually run
48 #                 the script).
49 # WX_UNICODE    - Define if the port needs the Unicode version of the
50 #                 wxWidgets library and/or contributed libraries.
51 #                 NOTE: this should NOT be used for ports that can be compiled
52 #                 with Unicode or not, but for the ones that require it.
53 # WANT_UNICODE  - Define if the port prefers Unicode, but doesn't require it.
54 # WANT_WX       - Set to "yes" or a valid single version (no ranges, etc).
55 #                 In both cases it will detect the installed wxWidgets
56 #                 components and add them to the variable HAVE_WX. If a
57 #                 version is selected, HAVE_WX will contain a list of
58 #                 components in the other case it will contain a list of
59 #                 "component-version" pairs (e.g. wx-2.8, contrib-2.8, etc).
60 #                 It has to be used before bsd.port.pre.mk.
61 # WANT_WX_VER   - Set to the prefered wxWidgets version for the port. It must
62 #                 be present in USE_WX or missing in USE_WX_NOT. This is
63 #                 overriden by the user variable WITH_WX_VER if set. It can
64 #                 contain multiple versions in order of preference (last ones
65 #                 are tried first).
66 #
67 # The following variables are intended for the user and can be defined in
68 # make.conf.
69 # WITH_UNICODE  - Define if you prefer the Unicode version when available.
70 # WITHOUT_UNICODE
71 #               - Define if you prefer the non Unicode version (this
72 #                 variable disables WITH_UNICODE and WANT_UNICODE).
73 # WITH_WX_VER   - Define to the list of prefered versions in reverse order.
74 #
75 # The following variables are defined by this file, to be read from the port.
76 # WX_CONFIG     - The path to the wx-config program (with different name).
77 # WXRC_CMD      - The path to the wxrc program (with different name).
78 # WX_VERSION    - The wxWidgets version that is going to be used.
79 # WX_UNICODE    - If this variable is not defined by the port (which means it
80 #                 requires the Unicode version of wxWidgets), it will be
81 #                 defined in the case the Unicode version is used (enabled by
82 #                 WITH_UNICODE or WANT_UNICODE).
83 # HAVE_WX       - The list of wxWidgets components installed, if WANT_WX was
84 #                 defined. The components will have version suffix if it was
85 #                 set to "yes".
86 #
87 # Examples:
88 # - A port that needs wxWidgets 2.8 and contributed libraries with Unicode.
89 #       USE_WX=         2.8
90 #       WX_COMPS=       wx contrib
91 #       WX_UNICODE=     yes
92 # - A port that needs WxPython 2.8 for running.
93 #       USE_PYTHON=     yes
94 #       USE_WX=         2.8
95 #       WX_COMPS=       python:run
96 # - A port that needs WxPython 2.8 or 3.0 for building.
97 #       USE_PYTHON=     yes
98 #       USE_WX=         2.8 3.0
99 #       WX_COMPS=       python:build
100 # - A port that needs wxWidgets version 2.8 or higher and contributed
101 #       libraries.
102 #       USE_WX=         2.8+
103 #       WX_COMPS=       wx contrib
104 # - A port that needs wxWidgets of any version other than 2.8.
105 #       USE_WX_NOT=     2.8
106 #
107
108 WX_Include_MAINTAINER=  alepulver@FreeBSD.org
109
110 #
111 # Global definitions.
112 #
113
114 .if !defined(_WX_Definitions_Done)
115 _WX_Definitions_Done=   yes
116
117 #
118 # Common variables:
119 # _WX_COMPS_ALL         - List of valid components.
120 # _WX_DEP_TYPES_ALL     - List of valid dependency types.
121 # _WX_VERS_ALL          - List of supported versions.
122 # _WX_VERS_UC_ALL       - List of Unicode capable versions.
123 # _WX_VERS_LISTS        - Reverse lists preference order.
124 #
125
126 _WX_COMPS_ALL=          wx contrib python
127 _WX_DEP_TYPES_ALL=      build lib run
128 _WX_VERS_ALL=           2.8 3.0
129 _WX_VERS_UC_ALL=        2.8 3.0
130 _WX_VERS_SKIP=          3.0
131 _WX_VERS_LISTS=         WANT_WX_VER WITH_WX_VER _WX_VER_INSTALLED
132
133 #
134 # Variables used to determine what is needed:
135 # _WX_PORT_comp_ver     - Port directory.
136 # _WX_LIB_comp_ver      - Name of the shared library (optional).
137 # _WX_SHVER_comp_ver    - Shared library version (optional).
138 # _WX_FILE_comp_ver     - File installed by that component.
139 # _WX_DEPTYPE_comp_ver  - Default dependency type (optional).
140 #
141
142 # wxgtk 2.8
143 _WX_PORT_wx_2.8=        x11-toolkits/wxgtk28${_WX_UCL}
144 _WX_LIB_wx_2.8=         wx_base${_WX_UC}-2.8
145
146 _WX_PORT_contrib_2.8=   x11-toolkits/wxgtk28${_WX_UCL}-contrib
147 _WX_LIB_contrib_2.8=    wx_gtk2${_WX_UC}_fl-2.8
148
149 _WX_PORT_python_2.8=    x11-toolkits/py-wxPython28${_WX_UCL}
150 _WX_FILE_python_2.8=    ${PYTHON_SITELIBDIR}/wx-2.8-gtk2${_WX_PYSUFX}/wx/__init__.py
151
152 # wxgtk 3.0
153 _WX_PORT_wx_3.0=        x11-toolkits/wxgtk30
154 _WX_LIB_wx_3.0=         wx_baseu-3.0
155
156 _WX_PORT_python_3.0=    x11-toolkits/py-wxPython30
157 _WX_FILE_python_3.0=    ${PYTHON_SITELIBDIR}/wx-3.0-gtk2/wx/__init__.py
158
159 # Set _WX_SHVER_comp_ver to 0 and _WX_FILE_comp_ver for libs appropiately.
160 # Set _WX_DEPTYPE_comp_ver for "python" to "run", and others to "lib".
161
162 .       for comp in ${_WX_COMPS_ALL}
163 _WX_COMP=               ${comp}
164 .               for ver in ${_WX_VERS_ALL}
165 .                       if defined(_WX_LIB_${comp}_${ver})
166 _WX_SHVER_${comp}_${ver}=       0
167 _WX_FILE_${comp}_${ver}=        ${LOCALBASE}/lib/lib${_WX_LIB_${comp}_${ver}}.so.${_WX_SHVER_${comp}_${ver}}
168 .                       endif
169 .                       if ${_WX_COMP} == "python"
170 _WX_DEPTYPE_${comp}_${ver}=     run
171 .                       else
172 _WX_DEPTYPE_${comp}_${ver}=     lib
173 .                       endif
174 .               endfor
175 .       endfor
176 .endif          # !_WX_Defined_Done
177
178 #
179 # Check if the user/port wants Unicode.
180 #
181
182 .if (!defined(WITHOUT_UNICODE) && \
183     (defined(WITH_UNICODE) || defined(WANT_UNICODE)))
184 _WX_UC_AVAILABLE=       yes
185 .else
186 .       undef _WX_UC_AVAILABLE
187 .endif
188
189 #
190 # Check if we are going to determine the version.
191 #
192
193 .if !defined(_WX_Version_Done) && (defined(_POSTMKINCLUDED) || \
194     (defined(WX_PREMK) && defined(BEFOREPORTMK) && \
195     (defined(USE_WX) || defined(USE_WX_NOT))))
196 _WX_Need_Version=       yes
197 .endif
198
199 #
200 # Check for present components.
201 #
202
203 # Requested by the user.
204
205 .if defined(WANT_WX) && defined(BEFOREPORTMK)
206 _WANT_WX=               ${WANT_WX}
207 .endif
208
209 # Used for autodetection of installed versions.
210
211 .if defined(_WX_Need_Version)
212 _WANT_WX=               yes
213 .endif
214
215 .if defined(_WANT_WX)
216
217 # Check if Unicode will be used.
218
219 .       for __WANT_WX in ${_WANT_WX}
220 .               if defined(_WX_UC_AVAILABLE) && \
221                    (${_WX_VERS_UC_ALL:M${__WANT_WX}} != "" || ${_WANT_WX:tl} == "yes")
222 _WX_WANT_UNICODE=               yes
223 .               endif
224 .       endfor
225
226 # These variables are reprocessed later so they won't affect other parts.
227
228 .       if defined(WX_UNICODE) || defined(_WX_WANT_UNICODE)
229 _WX_VER_FINAL=          ${_WX_VERS_UC_ALL}
230 _WX_UC=                 u
231 _WX_UCL=                -unicode
232 _WX_PYSUFX=             -unicode
233 .       else
234 _WX_VER_FINAL=          ${_WX_VERS_ALL}
235 _WX_UC=                 #
236 _WX_UCL=                #
237 _WX_PYSUFX=             -ansi
238 .       endif
239
240 # Fill _HAVE_WX with the installed components.
241
242 .       undef _HAVE_WX
243 .       for __WANT_WX in ${_WANT_WX}
244 # Check if _WANT_WX contains more than one word.
245 .               if defined(_HAVE_WX)
246 IGNORE?=                selected multiple values for WANT_WX: ${_WANT_WX}
247 .               endif
248 _HAVE_WX=               #
249 # Check for all versions.
250 .               if ${_WANT_WX:tl} == "yes"
251 .                       for comp in ${_WX_COMPS_ALL}
252 .                               for ver in ${_WX_VER_FINAL}
253 _WX_COMP=               _WX_FILE_${comp}_${ver}
254 .                                       if defined(${_WX_COMP}) && exists(${${_WX_COMP}})
255 _HAVE_WX+=              ${comp}-${ver}
256 .                                       endif
257 .                               endfor
258 .                       endfor
259 # Check for a specific version.
260 .               elif ${_WX_VERS_ALL:M${__WANT_WX}}
261 .                       for comp in ${_WX_COMPS_ALL}
262 .                               if exists(${_WX_FILE_${comp}_${__WANT_WX}})
263 _HAVE_WX+=              ${comp}
264 .                               endif
265 .                       endfor
266 .               else
267 IGNORE?=                selected an invalid value for WANT_WX: ${__WANT_WX}
268 .               endif
269 .       endfor
270 .endif          # _WANT_WX
271
272 # Requested by the user.
273
274 .if defined(WANT_WX) && defined(BEFOREPORTMK)
275 HAVE_WX:=               ${_HAVE_WX}
276 .endif
277
278 # Used for autodetection of installed versions.
279
280 .if defined(_WX_Need_Version)
281 _WX_VER_INSTALLED:=     ${_HAVE_WX:Mwx-*:S/wx-//}
282 .endif
283
284 #
285 # Select wxWidgets version.
286 #
287
288 .if defined(_WX_Need_Version)
289 _WX_Version_Done=       yes
290
291 #
292 # Basic component parsing (ignores dependency types).
293 #
294 # The variables used are:
295 # _WX_COMP              - Component part.
296 # _WX_COMPS_FINAL       - Final list of components.
297 #
298
299 # Detect duplicated components.
300
301 _WX_COMPS_FINAL=        #
302 .for comp in ${WX_COMPS}
303 _WX_COMP=               ${comp:C/:([[:alpha:]]+)$//}
304 .       for __WX_COMP in ${_WX_COMP}
305 .               if ${_WX_COMPS_ALL:M${__WX_COMP}} == ""
306 IGNORE?=                selected an invalid wxWidgets component: ${__WX_COMP}
307 .               endif
308 .       endfor
309 .       for newcomp in ${_WX_COMP}
310 .               if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
311 _WX_COMPS_FINAL+=       ${newcomp}
312 .               endif
313 .       endfor
314 .endfor
315
316 # Set defaults (if one isn't present).
317
318 USE_WX?=                ${_WX_VERS_ALL}
319 USE_WX_NOT?=            #
320
321 #
322 # Make lists of valid and invalid versions.
323 #
324 # The following variables are used:
325 # _WX_VER_CHECK         - If the version is a single one, express in a range.
326 # _WX_VER_MIN           - Lower version of the range.
327 # _WX_VER_MAX           - Higher version of the range.
328 # _WX_VER_LIST          - List of requested versions.
329 # _WX_VER_NOT_LIST      - List of disallowed versions.
330 # _WX_VER_MERGED        - List of requested version without disallowed ones.
331 #
332
333 .for list in VER VER_NOT
334 _WX_${list}_LIST=       #
335 .       for ver in ${USE_WX${list:C/VER//}}
336 _WX_VER_CHECK:=         ${ver:C/^([[:digit:]]+(\.[[:digit:]]+)*)$/\1-\1/}
337 _WX_VER_MIN:=           ${_WX_VER_CHECK:C/([[:digit:]]+(\.[[:digit:]]+)*)[-+].*/\1/}
338 _WX_VER_MAX:=           ${_WX_VER_CHECK:C/.*-([[:digit:]]+(\.[[:digit:]]+)*)/\1/}
339 # Minimum version not specified.
340 .               if ${_WX_VER_MIN} == ${_WX_VER_CHECK}
341 .                       undef _WX_VER_MIN
342 .                       for v in ${_WX_VERS_ALL}
343 .                               if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == ""
344 _WX_VER_MIN?=           ${v}
345 .                               endif
346 .                       endfor
347 .               endif
348 # Maximum version not specified.
349 .               if ${_WX_VER_MAX} == ${_WX_VER_CHECK}
350 .                       for v in ${_WX_VERS_ALL}
351 .                               if ${_WX_VER_CHECK:C/[-+]//} == ${v} || ${_WX_VERS_SKIP:M${v}} == ""
352 _WX_VER_MAX=            ${v}
353 .                               endif
354 .                       endfor
355 .               endif
356 # Expand versions and add valid ones to each list.
357 .               for v in ${_WX_VERS_ALL}
358 .                       if ${_WX_VER_MIN} <= ${v} && ${_WX_VER_MAX} >= ${v} && \
359                            ${_WX_${list}_LIST:M${v}} == ""
360 _WX_${list}_LIST+=      ${v}
361 .                       endif
362 .               endfor
363 .       endfor
364 .endfor
365
366 # Merge the lists into a single list of valid versions.
367
368 _WX_VER_MERGED=         #
369 .for ver in ${_WX_VER_LIST}
370 .       if ${_WX_VER_NOT_LIST:M${ver}} == ""
371 _WX_VER_MERGED+=        ${ver}
372 .       endif
373 .endfor
374
375 # Check for a null version.
376
377 .if empty(_WX_VER_MERGED)
378 IGNORE?=                selected a null or invalid wxWidgets version
379 .endif
380
381 # Avoid versions which have unavailable components.
382
383 .for ver in ${_WX_VER_MERGED}
384 .       for comp in ${_WX_COMPS_FINAL}
385 .               if !defined(_WX_PORT_${comp}_${ver})
386 _WX_WRONG_COMPS+=       ${comp}
387 _WX_WRONG_VERS+=        ${ver}
388 _WX_VER_MERGED:=        ${_WX_VER_MERGED:N${ver}}
389 .               endif
390 .       endfor
391 .endfor
392
393 .if empty(_WX_VER_MERGED)
394 IGNORE?=                selected wxWidgets versions (${_WX_WRONG_VERS}) which do not have the selected components (${_WX_WRONG_COMPS})
395 .endif
396
397 #
398 # Unicode support.
399 #
400
401 # Create a list of capable versions.
402
403 _WX_VER_UC=             #
404 .for ver in ${_WX_VER_MERGED}
405 .       if ${_WX_VERS_UC_ALL:M${ver}} != ""
406 _WX_VER_UC+=            ${ver}
407 .       endif
408 .endfor
409
410 # Requested by the user or port (optional).
411
412 .if defined(_WX_UC_AVAILABLE)
413 .       for ver in ${_WX_VER_UC}
414 .               if ${_WX_VERS_UC_ALL:M${ver}} != ""
415 WX_UNICODE=             yes
416 .               endif
417 .       endfor
418 .endif
419
420 # Requested by the port (mandatory).
421
422 .if defined(WX_UNICODE)
423 .       if empty(_WX_VER_UC)
424 IGNORE?=                selected a wxWidgets version which does not support Unicode: ${_WX_VER_MERGED}
425 .       endif
426 .endif
427
428 # Set Unicode variables.
429
430 .if defined(WX_UNICODE)
431 _WX_VER_FINAL=          ${_WX_VER_UC}
432 _WX_UC=                 u
433 _WX_UCL=                -unicode
434 _WX_PYSUFX=             -unicode
435 .else
436 _WX_VER_FINAL=          ${_WX_VER_MERGED}
437 _WX_UC=                 #
438 _WX_UCL=                #
439 _WX_PYSUFX=             -ansi
440 .endif
441
442 # Remove unusable installed versions.
443
444 .for ver in ${_WX_VER_INSTALLED}
445 .       if ${_WX_VER_FINAL:M${ver}} == ""
446 _WX_VER_INSTALLED:=     ${_WX_VER_INSTALLED:N${ver}}
447 .       endif
448 .endfor
449
450 #
451 # Choose final version.
452 #
453
454 #
455 # Check for the following (in order):
456 # 1) WITH_WX_VER        - User preference.
457 # 2) WANT_WX_VER        - Port preference.
458 # 3) _WX_VER_INSTALLED  - Installed versions.
459 # 4) _WX_VER_FINAL      - Available versions.
460
461
462 .for list in _WX_VER_FINAL ${_WX_VERS_LISTS}
463 .       if defined(${list})
464 .               for ver in ${${list}}
465 .                       if ${_WX_VER_FINAL:M${ver}} != ""
466 _WX_VER=                ${ver}
467 .                       endif
468 .               endfor
469 .       endif
470 .endfor
471
472 #
473 # Set variables.
474 #
475
476 WX_CONFIG?=             ${LOCALBASE}/bin/wxgtk2${_WX_UC}-${_WX_VER}-config
477 WXRC_CMD?=              ${LOCALBASE}/bin/wxrc-gtk2${_WX_UC}-${_WX_VER}
478 WX_VERSION?=            ${_WX_VER}
479
480 .endif          # _WX_Need_Version
481
482 #
483 # Process components list and add dependencies, variables, etc.
484 #
485
486 .if defined(_POSTMKINCLUDED)
487
488 #
489 # Component parsing.
490 #
491 # The variables used are:
492 # _WX_COMP              - Component part.
493 # _WX_DEP_TYPE          - Dependency type part.
494 # _WX_COMP_NEW          - Component + dependency type.
495 # _WX_COMPS_FINAL       - Final list of components with dependency types.
496 #
497
498 # Default components.
499
500 WX_COMPS?=              wx
501
502 # Detect invalid and duplicated components.
503
504 _WX_COMPS_FINAL=        #
505 .for comp in ${WX_COMPS}
506 _WX_COMP=               ${comp:C/:([[:alpha:]]+)$//}
507 .       if ${_WX_COMP} == ${comp}
508 _WX_DEP_TYPE=           ${_WX_DEPTYPE_${comp}_${_WX_VER}}
509 .       else
510 _WX_DEP_TYPE=           ${comp:C/.+:([[:alpha:]]+)$/\1/}
511 .       endif
512 _WX_COMP_NEW=           ${_WX_COMP}_${_WX_DEP_TYPE}
513 .       for __WX_COMP in ${_WX_COMP}
514 .               if ${_WX_COMPS_ALL:M${__WX_COMP}} == ""
515 IGNORE?=                selected an invalid wxWidgets component: ${__WX_COMP}
516 .               endif
517 .       endfor
518 .       for __WX_DEP_TYPE in ${_WX_DEP_TYPE}
519 .               if ${_WX_DEP_TYPES_ALL:M${__WX_DEP_TYPE}} == ""
520 IGNORE?=                selected an invalid wxWidgets dependency type: ${__WX_DEP_TYPE}
521 .               endif
522 .       endfor
523 .       if !defined(_WX_PORT_${_WX_COMP}_${_WX_VER})
524 IGNORE?=                selected a wxWidgets component (${_WX_COMP}) which is not available for the selected version (${_WX_VER})
525 .       endif
526 .       for newcomp in ${_WX_COMP_NEW}
527 .               if ${_WX_COMPS_FINAL:M${newcomp}} == "" && !defined(IGNORE)
528 _WX_COMPS_FINAL+=       ${newcomp}
529 .               endif
530 .       endfor
531 .endfor
532
533 # Add dependencies.
534 #
535 # The variable used are:
536 # _WX_COMP              - Component part.
537 # _WX_DEP_TYPE          - Dependency type part.
538
539 .for comp in ${_WX_COMPS_FINAL}
540 _WX_COMP=               ${comp:C/_([[:alpha:]]+)$//}
541 _WX_DEP_TYPE=           ${comp:C/.+_([[:alpha:]]+)$/\1/}
542 # XXX Need a .for loop here so the variable is expanded before the assignment.
543 .       for comp_part in ${_WX_COMP}
544 .               if ${_WX_DEP_TYPE} == "lib"
545 .                       if defined(_WX_LIB_${_WX_COMP}_${_WX_VER})
546 LIB_DEPENDS+=           lib${_WX_LIB_${comp_part}_${_WX_VER}}.so:${PORTSDIR}/${_WX_PORT_${comp_part}_${_WX_VER}}
547 .                       else
548 BUILD_DEPENDS+=         ${_WX_FILE_${comp_part}_${_WX_VER}}:${PORTSDIR}/${_WX_PORT_${comp_part}_${_WX_VER}}
549 RUN_DEPENDS+=           ${_WX_FILE_${comp_part}_${_WX_VER}}:${PORTSDIR}/${_WX_PORT_${comp_part}_${_WX_VER}}
550 .                       endif
551 .               else
552 ${_WX_DEP_TYPE:tu}_DEPENDS+=    ${_WX_FILE_${comp_part}_${_WX_VER}}:${PORTSDIR}/${_WX_PORT_${comp_part}_${_WX_VER}}
553 .               endif
554 .       endfor
555 .endfor
556
557 #
558 # Set build related variables.
559 #
560
561 MAKE_ENV+=              WX_CONFIG=${WX_CONFIG}
562 CONFIGURE_ENV+=         WX_CONFIG=${WX_CONFIG}
563
564 .if defined(WX_CONF_ARGS)
565 .       if ${WX_CONF_ARGS:tl} == "absolute"
566 CONFIGURE_ARGS+=        --with-wx-config=${WX_CONFIG}
567 .       elif ${WX_CONF_ARGS:tl} == "relative"
568 CONFIGURE_ARGS+=        --with-wx=${LOCALBASE} \
569                         --with-wx-config=${WX_CONFIG:T}
570 .       else
571 IGNORE?=                selected an invalid wxWidgets configure argument type: ${WX_CONF_ARGS}
572 .       endif
573 .endif
574
575 .endif          # _POSTMKINCLUDED