1 |
ulm 15/03/31 16:58:24 |
2 |
|
3 |
Added: wxrc-1.4 wx-config-1.4 wxwin.m4-2.9 wx-config-1.3 |
4 |
wxwin.m4-3.0 wxrc-1.3 |
5 |
Log: |
6 |
Move package from app-admin to app-eselect category. |
7 |
|
8 |
(Portage version: 2.2.18/cvs/Linux x86_64, RepoMan options: --force, signed Manifest commit with key 9433907D693FB5B8!) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 app-eselect/eselect-wxwidgets/files/wxrc-1.4 |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.4?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.4?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: wxrc-1.4 |
17 |
=================================================================== |
18 |
#!/bin/sh - |
19 |
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.4,v 1.1 2015/03/31 16:58:24 ulm Exp $ |
20 |
# |
21 |
# /usr/bin/wxrc |
22 |
# |
23 |
# a lame wxrc wrapper (bugs to wxwidgets@g.o) |
24 |
|
25 |
EPREFIX='' |
26 |
LIBDIR="lib" |
27 |
|
28 |
_wxerror() { |
29 |
cat >&2 <<- EOF |
30 |
An error occurred while calling wxrc: |
31 |
|
32 |
${1} |
33 |
|
34 |
Please use \`eselect wxwidgets\` to select an available profile and try again. |
35 |
EOF |
36 |
exit 1 |
37 |
} |
38 |
|
39 |
if [ -n "${WX_ECLASS_CONFIG}" ]; then |
40 |
$(${WX_ECLASS_CONFIG} --utility=wxrc) "$@" |
41 |
exit 0 |
42 |
else |
43 |
if [ -e "${EPREFIX}"/var/lib/wxwidgets/current ]; then |
44 |
. "${EPREFIX}"/var/lib/wxwidgets/current |
45 |
else |
46 |
_wxerror "Cannot find the wxWidgets profile configuration ( ${EPREFIX}/var/lib/wxwidgets/current )" |
47 |
fi |
48 |
|
49 |
[ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
50 |
|
51 |
if [ -x "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" ]; then |
52 |
$("${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" --utility=wxrc) "$@" |
53 |
else |
54 |
_wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
55 |
fi |
56 |
exit 0 |
57 |
fi |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
1.1 app-eselect/eselect-wxwidgets/files/wx-config-1.4 |
63 |
|
64 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.4?rev=1.1&view=markup |
65 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.4?rev=1.1&content-type=text/plain |
66 |
|
67 |
Index: wx-config-1.4 |
68 |
=================================================================== |
69 |
#!/bin/sh - |
70 |
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.4,v 1.1 2015/03/31 16:58:24 ulm Exp $ |
71 |
# |
72 |
# /usr/bin/wx-config |
73 |
# |
74 |
# a lame wx-config wrapper (bugs to wxwidgets@g.o) |
75 |
|
76 |
EPREFIX='' |
77 |
LIBDIR="lib" |
78 |
|
79 |
_wxerror() { |
80 |
cat >&2 <<- EOF |
81 |
An error occurred while calling wx-config: |
82 |
|
83 |
${1} |
84 |
|
85 |
Please use \`eselect wxwidgets\` to select an available profile and try again. |
86 |
EOF |
87 |
exit 1 |
88 |
} |
89 |
|
90 |
if [ -n "${WX_ECLASS_CONFIG}" ]; then |
91 |
${WX_ECLASS_CONFIG} "$@" |
92 |
exit 0 |
93 |
else |
94 |
if [ -e "${EPREFIX}"/var/lib/wxwidgets/current ]; then |
95 |
. "${EPREFIX}"/var/lib/wxwidgets/current |
96 |
else |
97 |
_wxerror "Cannot find the wxWidgets profile configuration ( ${EPREFIX}/var/lib/wxwidgets/current )" |
98 |
fi |
99 |
|
100 |
[ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
101 |
|
102 |
if [ -x "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" ]; then |
103 |
"${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" "$@" |
104 |
else |
105 |
_wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
106 |
fi |
107 |
exit 0 |
108 |
fi |
109 |
|
110 |
|
111 |
|
112 |
|
113 |
1.1 app-eselect/eselect-wxwidgets/files/wxwin.m4-2.9 |
114 |
|
115 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxwin.m4-2.9?rev=1.1&view=markup |
116 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxwin.m4-2.9?rev=1.1&content-type=text/plain |
117 |
|
118 |
Index: wxwin.m4-2.9 |
119 |
=================================================================== |
120 |
dnl --------------------------------------------------------------------------- |
121 |
dnl Author: wxWidgets development team, |
122 |
dnl Francesco Montorsi, |
123 |
dnl Bob McCown (Mac-testing) |
124 |
dnl Creation date: 24/11/2001 |
125 |
dnl RCS-ID: $Id: wxwin.m4-2.9,v 1.1 2015/03/31 16:58:24 ulm Exp $ |
126 |
dnl --------------------------------------------------------------------------- |
127 |
|
128 |
dnl =========================================================================== |
129 |
dnl Table of Contents of this macro file: |
130 |
dnl ------------------------------------- |
131 |
dnl |
132 |
dnl SECTION A: wxWidgets main macros |
133 |
dnl - WX_CONFIG_OPTIONS |
134 |
dnl - WX_CONFIG_CHECK |
135 |
dnl - WXRC_CHECK |
136 |
dnl - WX_STANDARD_OPTIONS |
137 |
dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
138 |
dnl - WX_DETECT_STANDARD_OPTION_VALUES |
139 |
dnl |
140 |
dnl SECTION B: wxWidgets-related utilities |
141 |
dnl - WX_LIKE_LIBNAME |
142 |
dnl - WX_ARG_ENABLE_YESNOAUTO |
143 |
dnl - WX_ARG_WITH_YESNOAUTO |
144 |
dnl |
145 |
dnl SECTION C: messages to the user |
146 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG |
147 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
148 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
149 |
dnl - WX_BOOLOPT_SUMMARY |
150 |
dnl |
151 |
dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra |
152 |
dnl debug output on stdout from these macros. |
153 |
dnl =========================================================================== |
154 |
|
155 |
|
156 |
dnl --------------------------------------------------------------------------- |
157 |
dnl Macros for wxWidgets detection. Typically used in configure.in as: |
158 |
dnl |
159 |
dnl AC_ARG_ENABLE(...) |
160 |
dnl AC_ARG_WITH(...) |
161 |
dnl ... |
162 |
dnl WX_CONFIG_OPTIONS |
163 |
dnl ... |
164 |
dnl ... |
165 |
dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) |
166 |
dnl if test "$wxWin" != 1; then |
167 |
dnl AC_MSG_ERROR([ |
168 |
dnl wxWidgets must be installed on your system |
169 |
dnl but wx-config script couldn't be found. |
170 |
dnl |
171 |
dnl Please check that wx-config is in path, the directory |
172 |
dnl where wxWidgets libraries are installed (returned by |
173 |
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
174 |
dnl equivalent variable and wxWidgets version is 2.3.4 or above. |
175 |
dnl ]) |
176 |
dnl fi |
177 |
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
178 |
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
179 |
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
180 |
dnl |
181 |
dnl LIBS="$LIBS $WX_LIBS" |
182 |
dnl |
183 |
dnl If you want to support standard --enable-debug/unicode/shared options, you |
184 |
dnl may do the following: |
185 |
dnl |
186 |
dnl ... |
187 |
dnl AC_CANONICAL_SYSTEM |
188 |
dnl |
189 |
dnl # define configure options |
190 |
dnl WX_CONFIG_OPTIONS |
191 |
dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) |
192 |
dnl |
193 |
dnl # basic configure checks |
194 |
dnl ... |
195 |
dnl |
196 |
dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE |
197 |
dnl WX_DEBUG=$DEBUG |
198 |
dnl WX_UNICODE=$UNICODE |
199 |
dnl |
200 |
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
201 |
dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) |
202 |
dnl WX_DETECT_STANDARD_OPTION_VALUES |
203 |
dnl |
204 |
dnl # write the output files |
205 |
dnl AC_CONFIG_FILES([Makefile ...]) |
206 |
dnl AC_OUTPUT |
207 |
dnl |
208 |
dnl # optional: just to show a message to the user |
209 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
210 |
dnl |
211 |
dnl --------------------------------------------------------------------------- |
212 |
|
213 |
|
214 |
dnl --------------------------------------------------------------------------- |
215 |
dnl WX_CONFIG_OPTIONS |
216 |
dnl |
217 |
dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and |
218 |
dnl --wx-config command line options |
219 |
dnl --------------------------------------------------------------------------- |
220 |
|
221 |
AC_DEFUN([WX_CONFIG_OPTIONS], |
222 |
[ |
223 |
AC_ARG_WITH(wxdir, |
224 |
[ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], |
225 |
[ wx_config_name="$withval/wx-config" |
226 |
wx_config_args="--inplace"]) |
227 |
AC_ARG_WITH(wx-config, |
228 |
[ --with-wx-config=CONFIG wx-config script to use (optional)], |
229 |
wx_config_name="$withval" ) |
230 |
AC_ARG_WITH(wx-prefix, |
231 |
[ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], |
232 |
wx_config_prefix="$withval", wx_config_prefix="") |
233 |
AC_ARG_WITH(wx-exec-prefix, |
234 |
[ --with-wx-exec-prefix=PREFIX |
235 |
Exec prefix where wxWidgets is installed (optional)], |
236 |
wx_config_exec_prefix="$withval", wx_config_exec_prefix="") |
237 |
]) |
238 |
|
239 |
dnl Helper macro for checking if wx version is at least $1.$2.$3, set's |
240 |
dnl wx_ver_ok=yes if it is: |
241 |
AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], |
242 |
[ |
243 |
wx_ver_ok="" |
244 |
if test "x$WX_VERSION" != x ; then |
245 |
if test $wx_config_major_version -gt $1; then |
246 |
wx_ver_ok=yes |
247 |
else |
248 |
if test $wx_config_major_version -eq $1; then |
249 |
if test $wx_config_minor_version -gt $2; then |
250 |
wx_ver_ok=yes |
251 |
else |
252 |
if test $wx_config_minor_version -eq $2; then |
253 |
if test $wx_config_micro_version -ge $3; then |
254 |
wx_ver_ok=yes |
255 |
fi |
256 |
fi |
257 |
fi |
258 |
fi |
259 |
fi |
260 |
fi |
261 |
]) |
262 |
|
263 |
dnl --------------------------------------------------------------------------- |
264 |
dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND |
265 |
dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) |
266 |
dnl |
267 |
dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC |
268 |
dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME |
269 |
dnl environment variable to override the default name of the wx-config script |
270 |
dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this |
271 |
dnl case the macro won't even waste time on tests for its existence. |
272 |
dnl |
273 |
dnl Optional WX-LIBS argument contains comma- or space-separated list of |
274 |
dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS |
275 |
dnl and WX_LIBS_STATIC will contain flags to link with all of the core |
276 |
dnl wxWidgets libraries. |
277 |
dnl |
278 |
dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config |
279 |
dnl invocation command in present. It can be used to fine-tune lookup of |
280 |
dnl best wxWidgets build available. |
281 |
dnl |
282 |
dnl Example use: |
283 |
dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] |
284 |
dnl [--unicode --debug]) |
285 |
dnl --------------------------------------------------------------------------- |
286 |
|
287 |
dnl |
288 |
dnl Get the cflags and libraries from the wx-config script |
289 |
dnl |
290 |
AC_DEFUN([WX_CONFIG_CHECK], |
291 |
[ |
292 |
dnl do we have wx-config name: it can be wx-config or wxd-config or ... |
293 |
if test x${WX_CONFIG_NAME+set} != xset ; then |
294 |
WX_CONFIG_NAME=wx-config |
295 |
fi |
296 |
|
297 |
if test "x$wx_config_name" != x ; then |
298 |
WX_CONFIG_NAME="$wx_config_name" |
299 |
fi |
300 |
|
301 |
dnl deal with optional prefixes |
302 |
if test x$wx_config_exec_prefix != x ; then |
303 |
wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" |
304 |
WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" |
305 |
fi |
306 |
if test x$wx_config_prefix != x ; then |
307 |
wx_config_args="$wx_config_args --prefix=$wx_config_prefix" |
308 |
WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" |
309 |
fi |
310 |
if test "$cross_compiling" = "yes"; then |
311 |
wx_config_args="$wx_config_args --host=$host_alias" |
312 |
fi |
313 |
|
314 |
dnl don't search the PATH if WX_CONFIG_NAME is absolute filename |
315 |
if test -x "$WX_CONFIG_NAME" ; then |
316 |
AC_MSG_CHECKING(for wx-config) |
317 |
WX_CONFIG_PATH="$WX_CONFIG_NAME" |
318 |
AC_MSG_RESULT($WX_CONFIG_PATH) |
319 |
else |
320 |
AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") |
321 |
fi |
322 |
|
323 |
if test "$WX_CONFIG_PATH" != "no" ; then |
324 |
WX_VERSION="" |
325 |
|
326 |
min_wx_version=ifelse([$1], ,2.2.1,$1) |
327 |
if test -z "$5" ; then |
328 |
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) |
329 |
else |
330 |
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) |
331 |
fi |
332 |
|
333 |
dnl don't add the libraries ($4) to this variable as this would result in |
334 |
dnl an error when it's used with --version below |
335 |
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" |
336 |
|
337 |
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` |
338 |
wx_config_major_version=`echo $WX_VERSION | \ |
339 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
340 |
wx_config_minor_version=`echo $WX_VERSION | \ |
341 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
342 |
wx_config_micro_version=`echo $WX_VERSION | \ |
343 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
344 |
|
345 |
wx_requested_major_version=`echo $min_wx_version | \ |
346 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
347 |
wx_requested_minor_version=`echo $min_wx_version | \ |
348 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
349 |
wx_requested_micro_version=`echo $min_wx_version | \ |
350 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
351 |
|
352 |
_WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], |
353 |
[$wx_requested_minor_version], |
354 |
[$wx_requested_micro_version]) |
355 |
|
356 |
if test -n "$wx_ver_ok"; then |
357 |
AC_MSG_RESULT(yes (version $WX_VERSION)) |
358 |
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` |
359 |
|
360 |
dnl is this even still appropriate? --static is a real option now |
361 |
dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is |
362 |
dnl what the user actually wants, making this redundant at best. |
363 |
dnl For now keep it in case anyone actually used it in the past. |
364 |
AC_MSG_CHECKING([for wxWidgets static library]) |
365 |
WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` |
366 |
if test "x$WX_LIBS_STATIC" = "x"; then |
367 |
AC_MSG_RESULT(no) |
368 |
else |
369 |
AC_MSG_RESULT(yes) |
370 |
fi |
371 |
|
372 |
dnl starting with version 2.2.6 wx-config has --cppflags argument |
373 |
wx_has_cppflags="" |
374 |
if test $wx_config_major_version -gt 2; then |
375 |
wx_has_cppflags=yes |
376 |
else |
377 |
if test $wx_config_major_version -eq 2; then |
378 |
if test $wx_config_minor_version -gt 2; then |
379 |
wx_has_cppflags=yes |
380 |
else |
381 |
if test $wx_config_minor_version -eq 2; then |
382 |
if test $wx_config_micro_version -ge 6; then |
383 |
wx_has_cppflags=yes |
384 |
fi |
385 |
fi |
386 |
fi |
387 |
fi |
388 |
fi |
389 |
|
390 |
dnl starting with version 2.7.0 wx-config has --rescomp option |
391 |
wx_has_rescomp="" |
392 |
if test $wx_config_major_version -gt 2; then |
393 |
wx_has_rescomp=yes |
394 |
else |
395 |
if test $wx_config_major_version -eq 2; then |
396 |
if test $wx_config_minor_version -ge 7; then |
397 |
wx_has_rescomp=yes |
398 |
fi |
399 |
fi |
400 |
fi |
401 |
if test "x$wx_has_rescomp" = x ; then |
402 |
dnl cannot give any useful info for resource compiler |
403 |
WX_RESCOMP= |
404 |
else |
405 |
WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` |
406 |
fi |
407 |
|
408 |
if test "x$wx_has_cppflags" = x ; then |
409 |
dnl no choice but to define all flags like CFLAGS |
410 |
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
411 |
WX_CPPFLAGS=$WX_CFLAGS |
412 |
WX_CXXFLAGS=$WX_CFLAGS |
413 |
|
414 |
WX_CFLAGS_ONLY=$WX_CFLAGS |
415 |
WX_CXXFLAGS_ONLY=$WX_CFLAGS |
416 |
else |
417 |
dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS |
418 |
WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` |
419 |
WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` |
420 |
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
421 |
|
422 |
WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` |
423 |
WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` |
424 |
fi |
425 |
|
426 |
ifelse([$2], , :, [$2]) |
427 |
|
428 |
else |
429 |
|
430 |
if test "x$WX_VERSION" = x; then |
431 |
dnl no wx-config at all |
432 |
AC_MSG_RESULT(no) |
433 |
else |
434 |
AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) |
435 |
fi |
436 |
|
437 |
WX_CFLAGS="" |
438 |
WX_CPPFLAGS="" |
439 |
WX_CXXFLAGS="" |
440 |
WX_LIBS="" |
441 |
WX_LIBS_STATIC="" |
442 |
WX_RESCOMP="" |
443 |
|
444 |
if test ! -z "$5"; then |
445 |
|
446 |
wx_error_message=" |
447 |
The configuration you asked for $PACKAGE_NAME requires a wxWidgets |
448 |
build with the following settings: |
449 |
$5 |
450 |
but such build is not available. |
451 |
|
452 |
To see the wxWidgets builds available on this system, please use |
453 |
'wx-config --list' command. To use the default build, returned by |
454 |
'wx-config --selected-config', use the options with their 'auto' |
455 |
default values." |
456 |
|
457 |
fi |
458 |
|
459 |
wx_error_message=" |
460 |
The requested wxWidgets build couldn't be found. |
461 |
$wx_error_message |
462 |
|
463 |
If you still get this error, then check that 'wx-config' is |
464 |
in path, the directory where wxWidgets libraries are installed |
465 |
(returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH |
466 |
or equivalent variable and wxWidgets version is $1 or above." |
467 |
|
468 |
ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) |
469 |
|
470 |
fi |
471 |
else |
472 |
|
473 |
WX_CFLAGS="" |
474 |
WX_CPPFLAGS="" |
475 |
WX_CXXFLAGS="" |
476 |
WX_LIBS="" |
477 |
WX_LIBS_STATIC="" |
478 |
WX_RESCOMP="" |
479 |
|
480 |
ifelse([$3], , :, [$3]) |
481 |
|
482 |
fi |
483 |
|
484 |
AC_SUBST(WX_CPPFLAGS) |
485 |
AC_SUBST(WX_CFLAGS) |
486 |
AC_SUBST(WX_CXXFLAGS) |
487 |
AC_SUBST(WX_CFLAGS_ONLY) |
488 |
AC_SUBST(WX_CXXFLAGS_ONLY) |
489 |
AC_SUBST(WX_LIBS) |
490 |
AC_SUBST(WX_LIBS_STATIC) |
491 |
AC_SUBST(WX_VERSION) |
492 |
AC_SUBST(WX_RESCOMP) |
493 |
|
494 |
dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols |
495 |
dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): |
496 |
WX_VERSION_MAJOR="$wx_config_major_version" |
497 |
WX_VERSION_MINOR="$wx_config_minor_version" |
498 |
WX_VERSION_MICRO="$wx_config_micro_version" |
499 |
AC_SUBST(WX_VERSION_MAJOR) |
500 |
AC_SUBST(WX_VERSION_MINOR) |
501 |
AC_SUBST(WX_VERSION_MICRO) |
502 |
]) |
503 |
|
504 |
dnl --------------------------------------------------------------------------- |
505 |
dnl Get information on the wxrc program for making C++, Python and xrs |
506 |
dnl resource files. |
507 |
dnl |
508 |
dnl AC_ARG_ENABLE(...) |
509 |
dnl AC_ARG_WITH(...) |
510 |
dnl ... |
511 |
dnl WX_CONFIG_OPTIONS |
512 |
dnl ... |
513 |
dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) |
514 |
dnl if test "$wxWin" != 1; then |
515 |
dnl AC_MSG_ERROR([ |
516 |
dnl wxWidgets must be installed on your system |
517 |
dnl but wx-config script couldn't be found. |
518 |
dnl |
519 |
dnl Please check that wx-config is in path, the directory |
520 |
dnl where wxWidgets libraries are installed (returned by |
521 |
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
522 |
dnl equivalent variable and wxWidgets version is 2.6.0 or above. |
523 |
dnl ]) |
524 |
dnl fi |
525 |
dnl |
526 |
dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) |
527 |
dnl if test "x$HAVE_WXRC" != x1; then |
528 |
dnl AC_MSG_ERROR([ |
529 |
dnl The wxrc program was not installed or not found. |
530 |
dnl |
531 |
dnl Please check the wxWidgets installation. |
532 |
dnl ]) |
533 |
dnl fi |
534 |
dnl |
535 |
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
536 |
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
537 |
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
538 |
dnl |
539 |
dnl LDFLAGS="$LDFLAGS $WX_LIBS" |
540 |
dnl --------------------------------------------------------------------------- |
541 |
|
542 |
dnl --------------------------------------------------------------------------- |
543 |
dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
544 |
dnl |
545 |
dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS |
546 |
dnl resources. The variable WXRC will be set and substituted in the configure |
547 |
dnl script and Makefiles. |
548 |
dnl |
549 |
dnl Example use: |
550 |
dnl WXRC_CHECK([wxrc=1], [wxrc=0]) |
551 |
dnl --------------------------------------------------------------------------- |
552 |
|
553 |
dnl |
554 |
dnl wxrc program from the wx-config script |
555 |
dnl |
556 |
AC_DEFUN([WXRC_CHECK], |
557 |
[ |
558 |
AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) |
559 |
|
560 |
if test "x$WX_CONFIG_NAME" = x; then |
561 |
AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) |
562 |
else |
563 |
|
564 |
AC_MSG_CHECKING([for wxrc]) |
565 |
|
566 |
if test "x$WXRC" = x ; then |
567 |
dnl wx-config --utility is a new addition to wxWidgets: |
568 |
_WX_PRIVATE_CHECK_VERSION(2,5,3) |
569 |
if test -n "$wx_ver_ok"; then |
570 |
WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` |
571 |
fi |
572 |
fi |
573 |
|
574 |
if test "x$WXRC" = x ; then |
575 |
AC_MSG_RESULT([not found]) |
576 |
ifelse([$2], , :, [$2]) |
577 |
else |
578 |
AC_MSG_RESULT([$WXRC]) |
579 |
ifelse([$1], , :, [$1]) |
580 |
fi |
581 |
|
582 |
AC_SUBST(WXRC) |
583 |
fi |
584 |
]) |
585 |
|
586 |
dnl --------------------------------------------------------------------------- |
587 |
dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) |
588 |
dnl |
589 |
dnl Sets the "output-var" variable to the name of a library named with same |
590 |
dnl wxWidgets rule. |
591 |
dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets |
592 |
dnl the $lib variable to: |
593 |
dnl 'mine_gtk2ud_test-2.8' |
594 |
dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 |
595 |
dnl --------------------------------------------------------------------------- |
596 |
AC_DEFUN([WX_LIKE_LIBNAME], |
597 |
[ |
598 |
wx_temp="$2""_""$WX_PORT" |
599 |
|
600 |
dnl add the [u][d] string |
601 |
if test "$WX_UNICODE" = "1"; then |
602 |
wx_temp="$wx_temp""u" |
603 |
fi |
604 |
if test "$WX_DEBUG" = "1"; then |
605 |
wx_temp="$wx_temp""d" |
606 |
fi |
607 |
|
608 |
dnl complete the name of the lib |
609 |
wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" |
610 |
|
611 |
dnl save it in the user's variable |
612 |
$1=$wx_temp |
613 |
]) |
614 |
|
615 |
dnl --------------------------------------------------------------------------- |
616 |
dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO |
617 |
dnl |
618 |
dnl Two little custom macros which define the ENABLE/WITH configure arguments. |
619 |
dnl Macro arguments: |
620 |
dnl $1 = the name of the --enable / --with feature |
621 |
dnl $2 = the name of the variable associated |
622 |
dnl $3 = the description of that feature |
623 |
dnl $4 = the default value for that feature |
624 |
dnl $5 = additional action to do in case option is given with "yes" value |
625 |
dnl --------------------------------------------------------------------------- |
626 |
AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], |
627 |
[AC_ARG_ENABLE($1, |
628 |
AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), |
629 |
[], [enableval="$4"]) |
630 |
|
631 |
dnl Show a message to the user about this option |
632 |
AC_MSG_CHECKING([for the --enable-$1 option]) |
633 |
if test "$enableval" = "yes" ; then |
634 |
AC_MSG_RESULT([yes]) |
635 |
$2=1 |
636 |
$5 |
637 |
elif test "$enableval" = "no" ; then |
638 |
AC_MSG_RESULT([no]) |
639 |
$2=0 |
640 |
elif test "$enableval" = "auto" ; then |
641 |
AC_MSG_RESULT([will be automatically detected]) |
642 |
$2="auto" |
643 |
else |
644 |
AC_MSG_ERROR([ |
645 |
Unrecognized option value (allowed values: yes, no, auto) |
646 |
]) |
647 |
fi |
648 |
]) |
649 |
|
650 |
AC_DEFUN([WX_ARG_WITH_YESNOAUTO], |
651 |
[AC_ARG_WITH($1, |
652 |
AC_HELP_STRING([--with-$1], [$3 (default is $4)]), |
653 |
[], [withval="$4"]) |
654 |
|
655 |
dnl Show a message to the user about this option |
656 |
AC_MSG_CHECKING([for the --with-$1 option]) |
657 |
if test "$withval" = "yes" ; then |
658 |
AC_MSG_RESULT([yes]) |
659 |
$2=1 |
660 |
$5 |
661 |
dnl NB: by default we don't allow --with-$1=no option |
662 |
dnl since it does not make much sense ! |
663 |
elif test "$6" = "1" -a "$withval" = "no" ; then |
664 |
AC_MSG_RESULT([no]) |
665 |
$2=0 |
666 |
elif test "$withval" = "auto" ; then |
667 |
AC_MSG_RESULT([will be automatically detected]) |
668 |
$2="auto" |
669 |
else |
670 |
AC_MSG_ERROR([ |
671 |
Unrecognized option value (allowed values: yes, auto) |
672 |
]) |
673 |
fi |
674 |
]) |
675 |
|
676 |
|
677 |
dnl --------------------------------------------------------------------------- |
678 |
dnl WX_STANDARD_OPTIONS([options-to-add]) |
679 |
dnl |
680 |
dnl Adds to the configure script one or more of the following options: |
681 |
dnl --enable-[debug|unicode|shared|wxshared|wxdebug] |
682 |
dnl --with-[gtk|msw|motif|x11|mac|mgl|dfb] |
683 |
dnl --with-wxversion |
684 |
dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, |
685 |
dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. |
686 |
dnl |
687 |
dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the |
688 |
dnl --enable-unicode option (in boolean format) while the second indicates |
689 |
dnl if wxWidgets was built in Unicode mode (and still is in boolean format). |
690 |
dnl --------------------------------------------------------------------------- |
691 |
AC_DEFUN([WX_STANDARD_OPTIONS], |
692 |
[ |
693 |
|
694 |
dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if |
695 |
dnl the $1 argument contains respectively the debug,unicode or shared options. |
696 |
|
697 |
dnl be careful here not to set debug flag if only "wxdebug" was specified |
698 |
ifelse(regexp([$1], [\bdebug]), [-1],, |
699 |
[WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) |
700 |
|
701 |
ifelse(index([$1], [unicode]), [-1],, |
702 |
[WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) |
703 |
|
704 |
ifelse(regexp([$1], [\bshared]), [-1],, |
705 |
[WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) |
706 |
|
707 |
dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option |
708 |
dnl which must be able to accept the auto|gtk1|gtk2|msw|... values |
709 |
ifelse(index([$1], [toolkit]), [-1],, |
710 |
[ |
711 |
AC_ARG_WITH([toolkit], |
712 |
AC_HELP_STRING([--with-toolkit], |
713 |
[Build against a specific wxWidgets toolkit (default is auto)]), |
714 |
[], [withval="auto"]) |
715 |
|
716 |
dnl Show a message to the user about this option |
717 |
AC_MSG_CHECKING([for the --with-toolkit option]) |
718 |
if test "$withval" = "auto" ; then |
719 |
AC_MSG_RESULT([will be automatically detected]) |
720 |
TOOLKIT="auto" |
721 |
else |
722 |
TOOLKIT="$withval" |
723 |
|
724 |
dnl PORT must be one of the allowed values |
725 |
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ |
726 |
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ |
727 |
"$TOOLKIT" != "x11" -a "$TOOLKIT" != "mac" -a \ |
728 |
"$TOOLKIT" != "mgl" -a "$TOOLKIT" != "dfb" ; then |
729 |
AC_MSG_ERROR([ |
730 |
Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, x11, mac, mgl, dfb) |
731 |
]) |
732 |
fi |
733 |
|
734 |
AC_MSG_RESULT([$TOOLKIT]) |
735 |
fi |
736 |
]) |
737 |
|
738 |
dnl ****** IMPORTANT ******* |
739 |
dnl Unlike for the UNICODE setting, you can build your program in |
740 |
dnl shared mode against a static build of wxWidgets. Thus we have the |
741 |
dnl following option which allows these mixtures. E.g. |
742 |
dnl |
743 |
dnl ./configure --disable-shared --with-wxshared |
744 |
dnl |
745 |
dnl will build your library in static mode against the first available |
746 |
dnl shared build of wxWidgets. |
747 |
dnl |
748 |
dnl Note that's not possible to do the viceversa: |
749 |
dnl |
750 |
dnl ./configure --enable-shared --without-wxshared |
751 |
dnl |
752 |
dnl Doing so you would try to build your library in shared mode against a static |
753 |
dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! |
754 |
dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES |
755 |
dnl (where we know what 'auto' should be expanded to). |
756 |
dnl |
757 |
dnl If you try to build something in ANSI mode against a UNICODE build |
758 |
dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, |
759 |
dnl then at best you'll get ton of linking errors ! |
760 |
dnl ************************ |
761 |
|
762 |
ifelse(index([$1], [wxshared]), [-1],, |
763 |
[ |
764 |
WX_ARG_WITH_YESNOAUTO( |
765 |
[wxshared], [WX_SHARED], |
766 |
[Force building against a shared build of wxWidgets, even if --disable-shared is given], |
767 |
[auto], [], [1]) |
768 |
]) |
769 |
|
770 |
dnl Just like for SHARED and WX_SHARED it may happen that some adventurous |
771 |
dnl peoples will want to mix a wxWidgets release build with a debug build of |
772 |
dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. |
773 |
ifelse(index([$1], [wxdebug]), [-1],, |
774 |
[ |
775 |
WX_ARG_WITH_YESNOAUTO( |
776 |
[wxdebug], [WX_DEBUG], |
777 |
[Force building against a debug build of wxWidgets, even if --disable-debug is given], |
778 |
[auto], [], [1]) |
779 |
]) |
780 |
|
781 |
dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option |
782 |
dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values |
783 |
ifelse(index([$1], [wxversion]), [-1],, |
784 |
[ |
785 |
AC_ARG_WITH([wxversion], |
786 |
AC_HELP_STRING([--with-wxversion], |
787 |
[Build against a specific version of wxWidgets (default is auto)]), |
788 |
[], [withval="auto"]) |
789 |
|
790 |
dnl Show a message to the user about this option |
791 |
AC_MSG_CHECKING([for the --with-wxversion option]) |
792 |
if test "$withval" = "auto" ; then |
793 |
AC_MSG_RESULT([will be automatically detected]) |
794 |
WX_RELEASE="auto" |
795 |
else |
796 |
|
797 |
wx_requested_major_version=`echo $withval | \ |
798 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` |
799 |
wx_requested_minor_version=`echo $withval | \ |
800 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` |
801 |
|
802 |
dnl both vars above must be exactly 1 digit |
803 |
if test "${#wx_requested_major_version}" != "1" -o \ |
804 |
"${#wx_requested_minor_version}" != "1" ; then |
805 |
AC_MSG_ERROR([ |
806 |
Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) |
807 |
]) |
808 |
fi |
809 |
|
810 |
WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" |
811 |
AC_MSG_RESULT([$WX_RELEASE]) |
812 |
fi |
813 |
]) |
814 |
|
815 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
816 |
echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" |
817 |
echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" |
818 |
echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" |
819 |
echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" |
820 |
echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" |
821 |
fi |
822 |
]) |
823 |
|
824 |
|
825 |
dnl --------------------------------------------------------------------------- |
826 |
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
827 |
dnl |
828 |
dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values |
829 |
dnl which are different from "auto". |
830 |
dnl Thus this macro needs to be called only once all options have been set. |
831 |
dnl --------------------------------------------------------------------------- |
832 |
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], |
833 |
[ |
834 |
if test "$WX_SHARED" = "1" ; then |
835 |
WXCONFIG_FLAGS="--static=no " |
836 |
elif test "$WX_SHARED" = "0" ; then |
837 |
WXCONFIG_FLAGS="--static=yes " |
838 |
fi |
839 |
|
840 |
if test "$WX_DEBUG" = "1" ; then |
841 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " |
842 |
elif test "$WX_DEBUG" = "0" ; then |
843 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " |
844 |
fi |
845 |
|
846 |
dnl The user should have set WX_UNICODE=UNICODE |
847 |
if test "$WX_UNICODE" = "1" ; then |
848 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " |
849 |
elif test "$WX_UNICODE" = "0" ; then |
850 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " |
851 |
fi |
852 |
|
853 |
if test "$TOOLKIT" != "auto" ; then |
854 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " |
855 |
fi |
856 |
|
857 |
if test "$WX_RELEASE" != "auto" ; then |
858 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " |
859 |
fi |
860 |
|
861 |
dnl strip out the last space of the string |
862 |
WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } |
863 |
|
864 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
865 |
echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" |
866 |
fi |
867 |
]) |
868 |
|
869 |
|
870 |
dnl --------------------------------------------------------------------------- |
871 |
dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] |
872 |
dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
873 |
dnl |
874 |
dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets |
875 |
dnl additional CPP flags and put the result of the search in WX_$RESULTVAR |
876 |
dnl also adding the "yes" or "no" message result to MSG. |
877 |
dnl --------------------------------------------------------------------------- |
878 |
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], |
879 |
[ |
880 |
if test "$$1" = "auto" ; then |
881 |
|
882 |
dnl The user does not have particular preferences for this option; |
883 |
dnl so we will detect the wxWidgets relative build setting and use it |
884 |
AC_MSG_CHECKING([$3]) |
885 |
|
886 |
dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 |
887 |
dnl string or to 0 otherwise. |
888 |
dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it |
889 |
dnl doesn't work; we use 'expr STRING : REGEXP' instead |
890 |
WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") |
891 |
|
892 |
if test "$WX_$1" != "0"; then |
893 |
WX_$1=1 |
894 |
AC_MSG_RESULT([yes]) |
895 |
ifelse([$4], , :, [$4]) |
896 |
else |
897 |
WX_$1=0 |
898 |
AC_MSG_RESULT([no]) |
899 |
ifelse([$5], , :, [$5]) |
900 |
fi |
901 |
else |
902 |
|
903 |
dnl Use the setting given by the user |
904 |
WX_$1=$$1 |
905 |
fi |
906 |
]) |
907 |
|
908 |
dnl --------------------------------------------------------------------------- |
909 |
dnl WX_DETECT_STANDARD_OPTION_VALUES |
910 |
dnl |
911 |
dnl Detects the values of the following variables: |
912 |
dnl 1) WX_RELEASE |
913 |
dnl 2) WX_UNICODE |
914 |
dnl 3) WX_DEBUG |
915 |
dnl 4) WX_SHARED (and also WX_STATIC) |
916 |
dnl 5) WX_PORT |
917 |
dnl from the previously selected wxWidgets build; this macro in fact must be |
918 |
dnl called *after* calling the WX_CONFIG_CHECK macro. |
919 |
dnl |
920 |
dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set |
921 |
dnl by WX_CONFIG_CHECK macro |
922 |
dnl --------------------------------------------------------------------------- |
923 |
AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], |
924 |
[ |
925 |
dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, |
926 |
dnl while WX_RELEASE only the major.minor ones. |
927 |
WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" |
928 |
if test $WX_RELEASE -lt 26 ; then |
929 |
|
930 |
AC_MSG_ERROR([ |
931 |
Cannot detect the wxWidgets configuration for the selected wxWidgets build |
932 |
since its version is $WX_VERSION < 2.6.0; please install a newer |
933 |
version of wxWidgets. |
934 |
]) |
935 |
fi |
936 |
|
937 |
dnl The wx-config we are using understands the "--selected_config" |
938 |
dnl option which returns an easy-parseable string ! |
939 |
WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) |
940 |
|
941 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
942 |
echo "[[dbg]] Using wx-config --selected-config" |
943 |
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" |
944 |
fi |
945 |
|
946 |
|
947 |
dnl we could test directly for WX_SHARED with a line like: |
948 |
dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], |
949 |
dnl [if wxWidgets was built in SHARED mode]) |
950 |
dnl but wx-config --selected-config DOES NOT outputs the 'shared' |
951 |
dnl word when wx was built in shared mode; it rather outputs the |
952 |
dnl 'static' word when built in static mode. |
953 |
if test $WX_SHARED = "1"; then |
954 |
STATIC=0 |
955 |
elif test $WX_SHARED = "0"; then |
956 |
STATIC=1 |
957 |
elif test $WX_SHARED = "auto"; then |
958 |
STATIC="auto" |
959 |
fi |
960 |
|
961 |
dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables |
962 |
_WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], |
963 |
[if wxWidgets was built with UNICODE enabled]) |
964 |
_WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], |
965 |
[if wxWidgets was built in DEBUG mode]) |
966 |
_WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], |
967 |
[if wxWidgets was built in STATIC mode]) |
968 |
|
969 |
dnl init WX_SHARED from WX_STATIC |
970 |
if test "$WX_STATIC" != "0"; then |
971 |
WX_SHARED=0 |
972 |
else |
973 |
WX_SHARED=1 |
974 |
fi |
975 |
|
976 |
AC_SUBST(WX_UNICODE) |
977 |
AC_SUBST(WX_DEBUG) |
978 |
AC_SUBST(WX_SHARED) |
979 |
|
980 |
dnl detect the WX_PORT to use |
981 |
if test "$TOOLKIT" = "auto" ; then |
982 |
|
983 |
dnl The user does not have particular preferences for this option; |
984 |
dnl so we will detect the wxWidgets relative build setting and use it |
985 |
AC_MSG_CHECKING([which wxWidgets toolkit was selected]) |
986 |
|
987 |
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") |
988 |
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") |
989 |
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") |
990 |
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") |
991 |
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") |
992 |
WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") |
993 |
WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") |
994 |
WX_MGLPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mgl.*") |
995 |
WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") |
996 |
|
997 |
WX_PORT="unknown" |
998 |
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi |
999 |
if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi |
1000 |
if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi |
1001 |
if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi |
1002 |
if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi |
1003 |
if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi |
1004 |
if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi |
1005 |
if test "$WX_MGLPORT" != "0"; then WX_PORT="mgl"; fi |
1006 |
if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi |
1007 |
|
1008 |
dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac |
1009 |
dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) |
1010 |
WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") |
1011 |
if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi |
1012 |
|
1013 |
dnl check at least one of the WX_*PORT has been set ! |
1014 |
|
1015 |
if test "$WX_PORT" = "unknown" ; then |
1016 |
AC_MSG_ERROR([ |
1017 |
Cannot detect the currently installed wxWidgets port ! |
1018 |
Please check your 'wx-config --cxxflags'... |
1019 |
]) |
1020 |
fi |
1021 |
|
1022 |
AC_MSG_RESULT([$WX_PORT]) |
1023 |
else |
1024 |
|
1025 |
dnl Use the setting given by the user |
1026 |
if test -z "$TOOLKIT" ; then |
1027 |
WX_PORT=$TOOLKIT |
1028 |
else |
1029 |
dnl try with PORT |
1030 |
WX_PORT=$PORT |
1031 |
fi |
1032 |
fi |
1033 |
|
1034 |
AC_SUBST(WX_PORT) |
1035 |
|
1036 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
1037 |
echo "[[dbg]] Values of all WX_* options after final detection:" |
1038 |
echo "[[dbg]] WX_DEBUG: $WX_DEBUG" |
1039 |
echo "[[dbg]] WX_UNICODE: $WX_UNICODE" |
1040 |
echo "[[dbg]] WX_SHARED: $WX_SHARED" |
1041 |
echo "[[dbg]] WX_RELEASE: $WX_RELEASE" |
1042 |
echo "[[dbg]] WX_PORT: $WX_PORT" |
1043 |
fi |
1044 |
|
1045 |
dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when |
1046 |
dnl the user gives the options: |
1047 |
dnl ./configure --enable-shared --without-wxshared |
1048 |
dnl or just do |
1049 |
dnl ./configure --enable-shared |
1050 |
dnl but there is only a static build of wxWidgets available. |
1051 |
if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then |
1052 |
AC_MSG_ERROR([ |
1053 |
Cannot build shared library against a static build of wxWidgets ! |
1054 |
This error happens because the wxWidgets build which was selected |
1055 |
has been detected as static while you asked to build $PACKAGE_NAME |
1056 |
as shared library and this is not possible. |
1057 |
Use the '--disable-shared' option to build $PACKAGE_NAME |
1058 |
as static library or '--with-wxshared' to use wxWidgets as shared library. |
1059 |
]) |
1060 |
fi |
1061 |
|
1062 |
dnl now we can finally update the DEBUG,UNICODE,SHARED options |
1063 |
dnl to their final values if they were set to 'auto' |
1064 |
if test "$DEBUG" = "auto"; then |
1065 |
DEBUG=$WX_DEBUG |
1066 |
fi |
1067 |
if test "$UNICODE" = "auto"; then |
1068 |
UNICODE=$WX_UNICODE |
1069 |
fi |
1070 |
if test "$SHARED" = "auto"; then |
1071 |
SHARED=$WX_SHARED |
1072 |
fi |
1073 |
if test "$TOOLKIT" = "auto"; then |
1074 |
TOOLKIT=$WX_PORT |
1075 |
fi |
1076 |
|
1077 |
dnl in case the user needs a BUILD=debug/release var... |
1078 |
if test "$DEBUG" = "1"; then |
1079 |
BUILD="debug" |
1080 |
elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then |
1081 |
BUILD="release" |
1082 |
fi |
1083 |
|
1084 |
dnl respect the DEBUG variable adding the optimize/debug flags |
1085 |
dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we |
1086 |
dnl don't need to set them, too |
1087 |
if test "$DEBUG" = "1"; then |
1088 |
CXXFLAGS="$CXXFLAGS -g -O0" |
1089 |
CFLAGS="$CFLAGS -g -O0" |
1090 |
else |
1091 |
CXXFLAGS="$CXXFLAGS -O2" |
1092 |
CFLAGS="$CFLAGS -O2" |
1093 |
fi |
1094 |
]) |
1095 |
|
1096 |
dnl --------------------------------------------------------------------------- |
1097 |
dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], |
1098 |
dnl [what to print when var is 1], |
1099 |
dnl [what to print when var is 0]) |
1100 |
dnl |
1101 |
dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. |
1102 |
dnl This macro mainly exists just to make configure.ac scripts more readable. |
1103 |
dnl |
1104 |
dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments |
1105 |
dnl if you want that m4 avoid to throw away the spaces prefixed to the |
1106 |
dnl argument value. |
1107 |
dnl --------------------------------------------------------------------------- |
1108 |
AC_DEFUN([WX_BOOLOPT_SUMMARY], |
1109 |
[ |
1110 |
if test "x$$1" = "x1" ; then |
1111 |
echo $2 |
1112 |
elif test "x$$1" = "x0" ; then |
1113 |
echo $3 |
1114 |
else |
1115 |
echo "$1 is $$1" |
1116 |
fi |
1117 |
]) |
1118 |
|
1119 |
dnl --------------------------------------------------------------------------- |
1120 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
1121 |
dnl |
1122 |
dnl Shows a summary message to the user about the WX_* variable contents. |
1123 |
dnl This macro is used typically at the end of the configure script. |
1124 |
dnl --------------------------------------------------------------------------- |
1125 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], |
1126 |
[ |
1127 |
echo |
1128 |
echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" |
1129 |
echo " has the following settings:" |
1130 |
WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
1131 |
WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
1132 |
WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
1133 |
echo " - VERSION: $WX_VERSION" |
1134 |
echo " - PORT: $WX_PORT" |
1135 |
]) |
1136 |
|
1137 |
|
1138 |
dnl --------------------------------------------------------------------------- |
1139 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
1140 |
dnl |
1141 |
dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info |
1142 |
dnl about the configuration of the package which used the wxpresets. |
1143 |
dnl |
1144 |
dnl Typical usage: |
1145 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
1146 |
dnl echo " - Package setting 1: $SETTING1" |
1147 |
dnl echo " - Package setting 2: $SETTING1" |
1148 |
dnl ... |
1149 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
1150 |
dnl |
1151 |
dnl --------------------------------------------------------------------------- |
1152 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], |
1153 |
[ |
1154 |
echo |
1155 |
echo " ----------------------------------------------------------------" |
1156 |
echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." |
1157 |
echo " Summary of main configuration settings for $PACKAGE_NAME:" |
1158 |
WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
1159 |
WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
1160 |
WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
1161 |
]) |
1162 |
|
1163 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], |
1164 |
[ |
1165 |
WX_STANDARD_OPTIONS_SUMMARY_MSG |
1166 |
echo |
1167 |
echo " Now, just run make." |
1168 |
echo " ----------------------------------------------------------------" |
1169 |
echo |
1170 |
]) |
1171 |
|
1172 |
|
1173 |
dnl --------------------------------------------------------------------------- |
1174 |
dnl Deprecated macro wrappers |
1175 |
dnl --------------------------------------------------------------------------- |
1176 |
|
1177 |
AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) |
1178 |
AC_DEFUN([AM_PATH_WXCONFIG], [ |
1179 |
WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) |
1180 |
]) |
1181 |
|
1182 |
|
1183 |
|
1184 |
|
1185 |
|
1186 |
1.1 app-eselect/eselect-wxwidgets/files/wx-config-1.3 |
1187 |
|
1188 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.3?rev=1.1&view=markup |
1189 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.3?rev=1.1&content-type=text/plain |
1190 |
|
1191 |
Index: wx-config-1.3 |
1192 |
=================================================================== |
1193 |
#!/bin/sh - |
1194 |
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-wxwidgets/files/wx-config-1.3,v 1.1 2015/03/31 16:58:24 ulm Exp $ |
1195 |
# |
1196 |
# /usr/bin/wx-config |
1197 |
# |
1198 |
# a lame wx-config wrapper (bugs to wxwidgets@g.o) |
1199 |
|
1200 |
_wxerror() { |
1201 |
cat >&2 <<- EOF |
1202 |
An error occurred while calling wx-config: |
1203 |
|
1204 |
${1} |
1205 |
|
1206 |
Please use \`eselect wxwidgets\` to select an available profile and try again. |
1207 |
EOF |
1208 |
exit 1 |
1209 |
} |
1210 |
|
1211 |
if [ -n "${WX_ECLASS_CONFIG}" ]; then |
1212 |
${WX_ECLASS_CONFIG} "$@" |
1213 |
exit 0 |
1214 |
else |
1215 |
if [ -e /var/lib/wxwidgets/current ]; then |
1216 |
. /var/lib/wxwidgets/current |
1217 |
else |
1218 |
_wxerror "Cannot find the wxWidgets profile configuration ( /var/lib/wxwidgets/current )" |
1219 |
fi |
1220 |
|
1221 |
[ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
1222 |
|
1223 |
if [ -x /usr/lib/wx/config/${WXCONFIG} ]; then |
1224 |
/usr/lib/wx/config/${WXCONFIG} "$@" |
1225 |
else |
1226 |
_wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
1227 |
fi |
1228 |
exit 0 |
1229 |
fi |
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
1.1 app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0 |
1235 |
|
1236 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0?rev=1.1&view=markup |
1237 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0?rev=1.1&content-type=text/plain |
1238 |
|
1239 |
Index: wxwin.m4-3.0 |
1240 |
=================================================================== |
1241 |
dnl --------------------------------------------------------------------------- |
1242 |
dnl Author: wxWidgets development team, |
1243 |
dnl Francesco Montorsi, |
1244 |
dnl Bob McCown (Mac-testing) |
1245 |
dnl Creation date: 24/11/2001 |
1246 |
dnl --------------------------------------------------------------------------- |
1247 |
|
1248 |
dnl =========================================================================== |
1249 |
dnl Table of Contents of this macro file: |
1250 |
dnl ------------------------------------- |
1251 |
dnl |
1252 |
dnl SECTION A: wxWidgets main macros |
1253 |
dnl - WX_CONFIG_OPTIONS |
1254 |
dnl - WX_CONFIG_CHECK |
1255 |
dnl - WXRC_CHECK |
1256 |
dnl - WX_STANDARD_OPTIONS |
1257 |
dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
1258 |
dnl - WX_DETECT_STANDARD_OPTION_VALUES |
1259 |
dnl |
1260 |
dnl SECTION B: wxWidgets-related utilities |
1261 |
dnl - WX_LIKE_LIBNAME |
1262 |
dnl - WX_ARG_ENABLE_YESNOAUTO |
1263 |
dnl - WX_ARG_WITH_YESNOAUTO |
1264 |
dnl |
1265 |
dnl SECTION C: messages to the user |
1266 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG |
1267 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
1268 |
dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
1269 |
dnl - WX_BOOLOPT_SUMMARY |
1270 |
dnl |
1271 |
dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra |
1272 |
dnl debug output on stdout from these macros. |
1273 |
dnl =========================================================================== |
1274 |
|
1275 |
|
1276 |
dnl --------------------------------------------------------------------------- |
1277 |
dnl Macros for wxWidgets detection. Typically used in configure.in as: |
1278 |
dnl |
1279 |
dnl AC_ARG_ENABLE(...) |
1280 |
dnl AC_ARG_WITH(...) |
1281 |
dnl ... |
1282 |
dnl WX_CONFIG_OPTIONS |
1283 |
dnl ... |
1284 |
dnl ... |
1285 |
dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) |
1286 |
dnl if test "$wxWin" != 1; then |
1287 |
dnl AC_MSG_ERROR([ |
1288 |
dnl wxWidgets must be installed on your system |
1289 |
dnl but wx-config script couldn't be found. |
1290 |
dnl |
1291 |
dnl Please check that wx-config is in path, the directory |
1292 |
dnl where wxWidgets libraries are installed (returned by |
1293 |
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
1294 |
dnl equivalent variable and wxWidgets version is 2.3.4 or above. |
1295 |
dnl ]) |
1296 |
dnl fi |
1297 |
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
1298 |
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
1299 |
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
1300 |
dnl |
1301 |
dnl LIBS="$LIBS $WX_LIBS" |
1302 |
dnl |
1303 |
dnl If you want to support standard --enable-debug/unicode/shared options, you |
1304 |
dnl may do the following: |
1305 |
dnl |
1306 |
dnl ... |
1307 |
dnl AC_CANONICAL_SYSTEM |
1308 |
dnl |
1309 |
dnl # define configure options |
1310 |
dnl WX_CONFIG_OPTIONS |
1311 |
dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) |
1312 |
dnl |
1313 |
dnl # basic configure checks |
1314 |
dnl ... |
1315 |
dnl |
1316 |
dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE |
1317 |
dnl WX_DEBUG=$DEBUG |
1318 |
dnl WX_UNICODE=$UNICODE |
1319 |
dnl |
1320 |
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
1321 |
dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) |
1322 |
dnl WX_DETECT_STANDARD_OPTION_VALUES |
1323 |
dnl |
1324 |
dnl # write the output files |
1325 |
dnl AC_CONFIG_FILES([Makefile ...]) |
1326 |
dnl AC_OUTPUT |
1327 |
dnl |
1328 |
dnl # optional: just to show a message to the user |
1329 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
1330 |
dnl |
1331 |
dnl --------------------------------------------------------------------------- |
1332 |
|
1333 |
|
1334 |
dnl --------------------------------------------------------------------------- |
1335 |
dnl WX_CONFIG_OPTIONS |
1336 |
dnl |
1337 |
dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and |
1338 |
dnl --wx-config command line options |
1339 |
dnl --------------------------------------------------------------------------- |
1340 |
|
1341 |
AC_DEFUN([WX_CONFIG_OPTIONS], |
1342 |
[ |
1343 |
AC_ARG_WITH(wxdir, |
1344 |
[ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], |
1345 |
[ wx_config_name="$withval/wx-config" |
1346 |
wx_config_args="--inplace"]) |
1347 |
AC_ARG_WITH(wx-config, |
1348 |
[ --with-wx-config=CONFIG wx-config script to use (optional)], |
1349 |
wx_config_name="$withval" ) |
1350 |
AC_ARG_WITH(wx-prefix, |
1351 |
[ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], |
1352 |
wx_config_prefix="$withval", wx_config_prefix="") |
1353 |
AC_ARG_WITH(wx-exec-prefix, |
1354 |
[ --with-wx-exec-prefix=PREFIX |
1355 |
Exec prefix where wxWidgets is installed (optional)], |
1356 |
wx_config_exec_prefix="$withval", wx_config_exec_prefix="") |
1357 |
]) |
1358 |
|
1359 |
dnl Helper macro for checking if wx version is at least $1.$2.$3, set's |
1360 |
dnl wx_ver_ok=yes if it is: |
1361 |
AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], |
1362 |
[ |
1363 |
wx_ver_ok="" |
1364 |
if test "x$WX_VERSION" != x ; then |
1365 |
if test $wx_config_major_version -gt $1; then |
1366 |
wx_ver_ok=yes |
1367 |
else |
1368 |
if test $wx_config_major_version -eq $1; then |
1369 |
if test $wx_config_minor_version -gt $2; then |
1370 |
wx_ver_ok=yes |
1371 |
else |
1372 |
if test $wx_config_minor_version -eq $2; then |
1373 |
if test $wx_config_micro_version -ge $3; then |
1374 |
wx_ver_ok=yes |
1375 |
fi |
1376 |
fi |
1377 |
fi |
1378 |
fi |
1379 |
fi |
1380 |
fi |
1381 |
]) |
1382 |
|
1383 |
dnl --------------------------------------------------------------------------- |
1384 |
dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND |
1385 |
dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) |
1386 |
dnl |
1387 |
dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC |
1388 |
dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME |
1389 |
dnl environment variable to override the default name of the wx-config script |
1390 |
dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this |
1391 |
dnl case the macro won't even waste time on tests for its existence. |
1392 |
dnl |
1393 |
dnl Optional WX-LIBS argument contains comma- or space-separated list of |
1394 |
dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS |
1395 |
dnl and WX_LIBS_STATIC will contain flags to link with all of the core |
1396 |
dnl wxWidgets libraries. |
1397 |
dnl |
1398 |
dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config |
1399 |
dnl invocation command in present. It can be used to fine-tune lookup of |
1400 |
dnl best wxWidgets build available. |
1401 |
dnl |
1402 |
dnl Example use: |
1403 |
dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] |
1404 |
dnl [--unicode --debug]) |
1405 |
dnl --------------------------------------------------------------------------- |
1406 |
|
1407 |
dnl |
1408 |
dnl Get the cflags and libraries from the wx-config script |
1409 |
dnl |
1410 |
AC_DEFUN([WX_CONFIG_CHECK], |
1411 |
[ |
1412 |
dnl do we have wx-config name: it can be wx-config or wxd-config or ... |
1413 |
if test x${WX_CONFIG_NAME+set} != xset ; then |
1414 |
WX_CONFIG_NAME=wx-config |
1415 |
fi |
1416 |
|
1417 |
if test "x$wx_config_name" != x ; then |
1418 |
WX_CONFIG_NAME="$wx_config_name" |
1419 |
fi |
1420 |
|
1421 |
dnl deal with optional prefixes |
1422 |
if test x$wx_config_exec_prefix != x ; then |
1423 |
wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" |
1424 |
WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" |
1425 |
fi |
1426 |
if test x$wx_config_prefix != x ; then |
1427 |
wx_config_args="$wx_config_args --prefix=$wx_config_prefix" |
1428 |
WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" |
1429 |
fi |
1430 |
if test "$cross_compiling" = "yes"; then |
1431 |
wx_config_args="$wx_config_args --host=$host_alias" |
1432 |
fi |
1433 |
|
1434 |
dnl don't search the PATH if WX_CONFIG_NAME is absolute filename |
1435 |
if test -x "$WX_CONFIG_NAME" ; then |
1436 |
AC_MSG_CHECKING(for wx-config) |
1437 |
WX_CONFIG_PATH="$WX_CONFIG_NAME" |
1438 |
AC_MSG_RESULT($WX_CONFIG_PATH) |
1439 |
else |
1440 |
AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") |
1441 |
fi |
1442 |
|
1443 |
if test "$WX_CONFIG_PATH" != "no" ; then |
1444 |
WX_VERSION="" |
1445 |
|
1446 |
min_wx_version=ifelse([$1], ,2.2.1,$1) |
1447 |
if test -z "$5" ; then |
1448 |
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) |
1449 |
else |
1450 |
AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) |
1451 |
fi |
1452 |
|
1453 |
dnl don't add the libraries ($4) to this variable as this would result in |
1454 |
dnl an error when it's used with --version below |
1455 |
WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" |
1456 |
|
1457 |
WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` |
1458 |
wx_config_major_version=`echo $WX_VERSION | \ |
1459 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
1460 |
wx_config_minor_version=`echo $WX_VERSION | \ |
1461 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
1462 |
wx_config_micro_version=`echo $WX_VERSION | \ |
1463 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
1464 |
|
1465 |
wx_requested_major_version=`echo $min_wx_version | \ |
1466 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
1467 |
wx_requested_minor_version=`echo $min_wx_version | \ |
1468 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
1469 |
wx_requested_micro_version=`echo $min_wx_version | \ |
1470 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
1471 |
|
1472 |
_WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], |
1473 |
[$wx_requested_minor_version], |
1474 |
[$wx_requested_micro_version]) |
1475 |
|
1476 |
if test -n "$wx_ver_ok"; then |
1477 |
AC_MSG_RESULT(yes (version $WX_VERSION)) |
1478 |
WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` |
1479 |
|
1480 |
dnl is this even still appropriate? --static is a real option now |
1481 |
dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is |
1482 |
dnl what the user actually wants, making this redundant at best. |
1483 |
dnl For now keep it in case anyone actually used it in the past. |
1484 |
AC_MSG_CHECKING([for wxWidgets static library]) |
1485 |
WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` |
1486 |
if test "x$WX_LIBS_STATIC" = "x"; then |
1487 |
AC_MSG_RESULT(no) |
1488 |
else |
1489 |
AC_MSG_RESULT(yes) |
1490 |
fi |
1491 |
|
1492 |
dnl starting with version 2.2.6 wx-config has --cppflags argument |
1493 |
wx_has_cppflags="" |
1494 |
if test $wx_config_major_version -gt 2; then |
1495 |
wx_has_cppflags=yes |
1496 |
else |
1497 |
if test $wx_config_major_version -eq 2; then |
1498 |
if test $wx_config_minor_version -gt 2; then |
1499 |
wx_has_cppflags=yes |
1500 |
else |
1501 |
if test $wx_config_minor_version -eq 2; then |
1502 |
if test $wx_config_micro_version -ge 6; then |
1503 |
wx_has_cppflags=yes |
1504 |
fi |
1505 |
fi |
1506 |
fi |
1507 |
fi |
1508 |
fi |
1509 |
|
1510 |
dnl starting with version 2.7.0 wx-config has --rescomp option |
1511 |
wx_has_rescomp="" |
1512 |
if test $wx_config_major_version -gt 2; then |
1513 |
wx_has_rescomp=yes |
1514 |
else |
1515 |
if test $wx_config_major_version -eq 2; then |
1516 |
if test $wx_config_minor_version -ge 7; then |
1517 |
wx_has_rescomp=yes |
1518 |
fi |
1519 |
fi |
1520 |
fi |
1521 |
if test "x$wx_has_rescomp" = x ; then |
1522 |
dnl cannot give any useful info for resource compiler |
1523 |
WX_RESCOMP= |
1524 |
else |
1525 |
WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` |
1526 |
fi |
1527 |
|
1528 |
if test "x$wx_has_cppflags" = x ; then |
1529 |
dnl no choice but to define all flags like CFLAGS |
1530 |
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
1531 |
WX_CPPFLAGS=$WX_CFLAGS |
1532 |
WX_CXXFLAGS=$WX_CFLAGS |
1533 |
|
1534 |
WX_CFLAGS_ONLY=$WX_CFLAGS |
1535 |
WX_CXXFLAGS_ONLY=$WX_CFLAGS |
1536 |
else |
1537 |
dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS |
1538 |
WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` |
1539 |
WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` |
1540 |
WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
1541 |
|
1542 |
WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` |
1543 |
WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` |
1544 |
fi |
1545 |
|
1546 |
ifelse([$2], , :, [$2]) |
1547 |
|
1548 |
else |
1549 |
|
1550 |
if test "x$WX_VERSION" = x; then |
1551 |
dnl no wx-config at all |
1552 |
AC_MSG_RESULT(no) |
1553 |
else |
1554 |
AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) |
1555 |
fi |
1556 |
|
1557 |
WX_CFLAGS="" |
1558 |
WX_CPPFLAGS="" |
1559 |
WX_CXXFLAGS="" |
1560 |
WX_LIBS="" |
1561 |
WX_LIBS_STATIC="" |
1562 |
WX_RESCOMP="" |
1563 |
|
1564 |
if test ! -z "$5"; then |
1565 |
|
1566 |
wx_error_message=" |
1567 |
The configuration you asked for $PACKAGE_NAME requires a wxWidgets |
1568 |
build with the following settings: |
1569 |
$5 |
1570 |
but such build is not available. |
1571 |
|
1572 |
To see the wxWidgets builds available on this system, please use |
1573 |
'wx-config --list' command. To use the default build, returned by |
1574 |
'wx-config --selected-config', use the options with their 'auto' |
1575 |
default values." |
1576 |
|
1577 |
fi |
1578 |
|
1579 |
wx_error_message=" |
1580 |
The requested wxWidgets build couldn't be found. |
1581 |
$wx_error_message |
1582 |
|
1583 |
If you still get this error, then check that 'wx-config' is |
1584 |
in path, the directory where wxWidgets libraries are installed |
1585 |
(returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH |
1586 |
or equivalent variable and wxWidgets version is $1 or above." |
1587 |
|
1588 |
ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) |
1589 |
|
1590 |
fi |
1591 |
else |
1592 |
|
1593 |
WX_CFLAGS="" |
1594 |
WX_CPPFLAGS="" |
1595 |
WX_CXXFLAGS="" |
1596 |
WX_LIBS="" |
1597 |
WX_LIBS_STATIC="" |
1598 |
WX_RESCOMP="" |
1599 |
|
1600 |
ifelse([$3], , :, [$3]) |
1601 |
|
1602 |
fi |
1603 |
|
1604 |
AC_SUBST(WX_CPPFLAGS) |
1605 |
AC_SUBST(WX_CFLAGS) |
1606 |
AC_SUBST(WX_CXXFLAGS) |
1607 |
AC_SUBST(WX_CFLAGS_ONLY) |
1608 |
AC_SUBST(WX_CXXFLAGS_ONLY) |
1609 |
AC_SUBST(WX_LIBS) |
1610 |
AC_SUBST(WX_LIBS_STATIC) |
1611 |
AC_SUBST(WX_VERSION) |
1612 |
AC_SUBST(WX_RESCOMP) |
1613 |
|
1614 |
dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols |
1615 |
dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): |
1616 |
WX_VERSION_MAJOR="$wx_config_major_version" |
1617 |
WX_VERSION_MINOR="$wx_config_minor_version" |
1618 |
WX_VERSION_MICRO="$wx_config_micro_version" |
1619 |
AC_SUBST(WX_VERSION_MAJOR) |
1620 |
AC_SUBST(WX_VERSION_MINOR) |
1621 |
AC_SUBST(WX_VERSION_MICRO) |
1622 |
]) |
1623 |
|
1624 |
dnl --------------------------------------------------------------------------- |
1625 |
dnl Get information on the wxrc program for making C++, Python and xrs |
1626 |
dnl resource files. |
1627 |
dnl |
1628 |
dnl AC_ARG_ENABLE(...) |
1629 |
dnl AC_ARG_WITH(...) |
1630 |
dnl ... |
1631 |
dnl WX_CONFIG_OPTIONS |
1632 |
dnl ... |
1633 |
dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) |
1634 |
dnl if test "$wxWin" != 1; then |
1635 |
dnl AC_MSG_ERROR([ |
1636 |
dnl wxWidgets must be installed on your system |
1637 |
dnl but wx-config script couldn't be found. |
1638 |
dnl |
1639 |
dnl Please check that wx-config is in path, the directory |
1640 |
dnl where wxWidgets libraries are installed (returned by |
1641 |
dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
1642 |
dnl equivalent variable and wxWidgets version is 2.6.0 or above. |
1643 |
dnl ]) |
1644 |
dnl fi |
1645 |
dnl |
1646 |
dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) |
1647 |
dnl if test "x$HAVE_WXRC" != x1; then |
1648 |
dnl AC_MSG_ERROR([ |
1649 |
dnl The wxrc program was not installed or not found. |
1650 |
dnl |
1651 |
dnl Please check the wxWidgets installation. |
1652 |
dnl ]) |
1653 |
dnl fi |
1654 |
dnl |
1655 |
dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
1656 |
dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
1657 |
dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
1658 |
dnl |
1659 |
dnl LDFLAGS="$LDFLAGS $WX_LIBS" |
1660 |
dnl --------------------------------------------------------------------------- |
1661 |
|
1662 |
dnl --------------------------------------------------------------------------- |
1663 |
dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
1664 |
dnl |
1665 |
dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS |
1666 |
dnl resources. The variable WXRC will be set and substituted in the configure |
1667 |
dnl script and Makefiles. |
1668 |
dnl |
1669 |
dnl Example use: |
1670 |
dnl WXRC_CHECK([wxrc=1], [wxrc=0]) |
1671 |
dnl --------------------------------------------------------------------------- |
1672 |
|
1673 |
dnl |
1674 |
dnl wxrc program from the wx-config script |
1675 |
dnl |
1676 |
AC_DEFUN([WXRC_CHECK], |
1677 |
[ |
1678 |
AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) |
1679 |
|
1680 |
if test "x$WX_CONFIG_NAME" = x; then |
1681 |
AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) |
1682 |
else |
1683 |
|
1684 |
AC_MSG_CHECKING([for wxrc]) |
1685 |
|
1686 |
if test "x$WXRC" = x ; then |
1687 |
dnl wx-config --utility is a new addition to wxWidgets: |
1688 |
_WX_PRIVATE_CHECK_VERSION(2,5,3) |
1689 |
if test -n "$wx_ver_ok"; then |
1690 |
WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` |
1691 |
fi |
1692 |
fi |
1693 |
|
1694 |
if test "x$WXRC" = x ; then |
1695 |
AC_MSG_RESULT([not found]) |
1696 |
ifelse([$2], , :, [$2]) |
1697 |
else |
1698 |
AC_MSG_RESULT([$WXRC]) |
1699 |
ifelse([$1], , :, [$1]) |
1700 |
fi |
1701 |
|
1702 |
AC_SUBST(WXRC) |
1703 |
fi |
1704 |
]) |
1705 |
|
1706 |
dnl --------------------------------------------------------------------------- |
1707 |
dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) |
1708 |
dnl |
1709 |
dnl Sets the "output-var" variable to the name of a library named with same |
1710 |
dnl wxWidgets rule. |
1711 |
dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets |
1712 |
dnl the $lib variable to: |
1713 |
dnl 'mine_gtk2ud_test-2.8' |
1714 |
dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 |
1715 |
dnl --------------------------------------------------------------------------- |
1716 |
AC_DEFUN([WX_LIKE_LIBNAME], |
1717 |
[ |
1718 |
wx_temp="$2""_""$WX_PORT" |
1719 |
|
1720 |
dnl add the [u][d] string |
1721 |
if test "$WX_UNICODE" = "1"; then |
1722 |
wx_temp="$wx_temp""u" |
1723 |
fi |
1724 |
if test "$WX_DEBUG" = "1"; then |
1725 |
wx_temp="$wx_temp""d" |
1726 |
fi |
1727 |
|
1728 |
dnl complete the name of the lib |
1729 |
wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" |
1730 |
|
1731 |
dnl save it in the user's variable |
1732 |
$1=$wx_temp |
1733 |
]) |
1734 |
|
1735 |
dnl --------------------------------------------------------------------------- |
1736 |
dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO |
1737 |
dnl |
1738 |
dnl Two little custom macros which define the ENABLE/WITH configure arguments. |
1739 |
dnl Macro arguments: |
1740 |
dnl $1 = the name of the --enable / --with feature |
1741 |
dnl $2 = the name of the variable associated |
1742 |
dnl $3 = the description of that feature |
1743 |
dnl $4 = the default value for that feature |
1744 |
dnl $5 = additional action to do in case option is given with "yes" value |
1745 |
dnl --------------------------------------------------------------------------- |
1746 |
AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], |
1747 |
[AC_ARG_ENABLE($1, |
1748 |
AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), |
1749 |
[], [enableval="$4"]) |
1750 |
|
1751 |
dnl Show a message to the user about this option |
1752 |
AC_MSG_CHECKING([for the --enable-$1 option]) |
1753 |
if test "$enableval" = "yes" ; then |
1754 |
AC_MSG_RESULT([yes]) |
1755 |
$2=1 |
1756 |
$5 |
1757 |
elif test "$enableval" = "no" ; then |
1758 |
AC_MSG_RESULT([no]) |
1759 |
$2=0 |
1760 |
elif test "$enableval" = "auto" ; then |
1761 |
AC_MSG_RESULT([will be automatically detected]) |
1762 |
$2="auto" |
1763 |
else |
1764 |
AC_MSG_ERROR([ |
1765 |
Unrecognized option value (allowed values: yes, no, auto) |
1766 |
]) |
1767 |
fi |
1768 |
]) |
1769 |
|
1770 |
AC_DEFUN([WX_ARG_WITH_YESNOAUTO], |
1771 |
[AC_ARG_WITH($1, |
1772 |
AC_HELP_STRING([--with-$1], [$3 (default is $4)]), |
1773 |
[], [withval="$4"]) |
1774 |
|
1775 |
dnl Show a message to the user about this option |
1776 |
AC_MSG_CHECKING([for the --with-$1 option]) |
1777 |
if test "$withval" = "yes" ; then |
1778 |
AC_MSG_RESULT([yes]) |
1779 |
$2=1 |
1780 |
$5 |
1781 |
dnl NB: by default we don't allow --with-$1=no option |
1782 |
dnl since it does not make much sense ! |
1783 |
elif test "$6" = "1" -a "$withval" = "no" ; then |
1784 |
AC_MSG_RESULT([no]) |
1785 |
$2=0 |
1786 |
elif test "$withval" = "auto" ; then |
1787 |
AC_MSG_RESULT([will be automatically detected]) |
1788 |
$2="auto" |
1789 |
else |
1790 |
AC_MSG_ERROR([ |
1791 |
Unrecognized option value (allowed values: yes, auto) |
1792 |
]) |
1793 |
fi |
1794 |
]) |
1795 |
|
1796 |
|
1797 |
dnl --------------------------------------------------------------------------- |
1798 |
dnl WX_STANDARD_OPTIONS([options-to-add]) |
1799 |
dnl |
1800 |
dnl Adds to the configure script one or more of the following options: |
1801 |
dnl --enable-[debug|unicode|shared|wxshared|wxdebug] |
1802 |
dnl --with-[gtk|msw|motif|x11|mac|dfb] |
1803 |
dnl --with-wxversion |
1804 |
dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, |
1805 |
dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. |
1806 |
dnl |
1807 |
dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the |
1808 |
dnl --enable-unicode option (in boolean format) while the second indicates |
1809 |
dnl if wxWidgets was built in Unicode mode (and still is in boolean format). |
1810 |
dnl --------------------------------------------------------------------------- |
1811 |
AC_DEFUN([WX_STANDARD_OPTIONS], |
1812 |
[ |
1813 |
|
1814 |
dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if |
1815 |
dnl the $1 argument contains respectively the debug,unicode or shared options. |
1816 |
|
1817 |
dnl be careful here not to set debug flag if only "wxdebug" was specified |
1818 |
ifelse(regexp([$1], [\bdebug]), [-1],, |
1819 |
[WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) |
1820 |
|
1821 |
ifelse(index([$1], [unicode]), [-1],, |
1822 |
[WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) |
1823 |
|
1824 |
ifelse(regexp([$1], [\bshared]), [-1],, |
1825 |
[WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) |
1826 |
|
1827 |
dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option |
1828 |
dnl which must be able to accept the auto|gtk1|gtk2|msw|... values |
1829 |
ifelse(index([$1], [toolkit]), [-1],, |
1830 |
[ |
1831 |
AC_ARG_WITH([toolkit], |
1832 |
AC_HELP_STRING([--with-toolkit], |
1833 |
[Build against a specific wxWidgets toolkit (default is auto)]), |
1834 |
[], [withval="auto"]) |
1835 |
|
1836 |
dnl Show a message to the user about this option |
1837 |
AC_MSG_CHECKING([for the --with-toolkit option]) |
1838 |
if test "$withval" = "auto" ; then |
1839 |
AC_MSG_RESULT([will be automatically detected]) |
1840 |
TOOLKIT="auto" |
1841 |
else |
1842 |
TOOLKIT="$withval" |
1843 |
|
1844 |
dnl PORT must be one of the allowed values |
1845 |
if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ |
1846 |
"$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ |
1847 |
"$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ |
1848 |
"$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then |
1849 |
AC_MSG_ERROR([ |
1850 |
Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) |
1851 |
]) |
1852 |
fi |
1853 |
|
1854 |
AC_MSG_RESULT([$TOOLKIT]) |
1855 |
fi |
1856 |
]) |
1857 |
|
1858 |
dnl ****** IMPORTANT ******* |
1859 |
dnl Unlike for the UNICODE setting, you can build your program in |
1860 |
dnl shared mode against a static build of wxWidgets. Thus we have the |
1861 |
dnl following option which allows these mixtures. E.g. |
1862 |
dnl |
1863 |
dnl ./configure --disable-shared --with-wxshared |
1864 |
dnl |
1865 |
dnl will build your library in static mode against the first available |
1866 |
dnl shared build of wxWidgets. |
1867 |
dnl |
1868 |
dnl Note that's not possible to do the viceversa: |
1869 |
dnl |
1870 |
dnl ./configure --enable-shared --without-wxshared |
1871 |
dnl |
1872 |
dnl Doing so you would try to build your library in shared mode against a static |
1873 |
dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! |
1874 |
dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES |
1875 |
dnl (where we know what 'auto' should be expanded to). |
1876 |
dnl |
1877 |
dnl If you try to build something in ANSI mode against a UNICODE build |
1878 |
dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, |
1879 |
dnl then at best you'll get ton of linking errors ! |
1880 |
dnl ************************ |
1881 |
|
1882 |
ifelse(index([$1], [wxshared]), [-1],, |
1883 |
[ |
1884 |
WX_ARG_WITH_YESNOAUTO( |
1885 |
[wxshared], [WX_SHARED], |
1886 |
[Force building against a shared build of wxWidgets, even if --disable-shared is given], |
1887 |
[auto], [], [1]) |
1888 |
]) |
1889 |
|
1890 |
dnl Just like for SHARED and WX_SHARED it may happen that some adventurous |
1891 |
dnl peoples will want to mix a wxWidgets release build with a debug build of |
1892 |
dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. |
1893 |
ifelse(index([$1], [wxdebug]), [-1],, |
1894 |
[ |
1895 |
WX_ARG_WITH_YESNOAUTO( |
1896 |
[wxdebug], [WX_DEBUG], |
1897 |
[Force building against a debug build of wxWidgets, even if --disable-debug is given], |
1898 |
[auto], [], [1]) |
1899 |
]) |
1900 |
|
1901 |
dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option |
1902 |
dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values |
1903 |
ifelse(index([$1], [wxversion]), [-1],, |
1904 |
[ |
1905 |
AC_ARG_WITH([wxversion], |
1906 |
AC_HELP_STRING([--with-wxversion], |
1907 |
[Build against a specific version of wxWidgets (default is auto)]), |
1908 |
[], [withval="auto"]) |
1909 |
|
1910 |
dnl Show a message to the user about this option |
1911 |
AC_MSG_CHECKING([for the --with-wxversion option]) |
1912 |
if test "$withval" = "auto" ; then |
1913 |
AC_MSG_RESULT([will be automatically detected]) |
1914 |
WX_RELEASE="auto" |
1915 |
else |
1916 |
|
1917 |
wx_requested_major_version=`echo $withval | \ |
1918 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` |
1919 |
wx_requested_minor_version=`echo $withval | \ |
1920 |
sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` |
1921 |
|
1922 |
dnl both vars above must be exactly 1 digit |
1923 |
if test "${#wx_requested_major_version}" != "1" -o \ |
1924 |
"${#wx_requested_minor_version}" != "1" ; then |
1925 |
AC_MSG_ERROR([ |
1926 |
Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) |
1927 |
]) |
1928 |
fi |
1929 |
|
1930 |
WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" |
1931 |
AC_MSG_RESULT([$WX_RELEASE]) |
1932 |
fi |
1933 |
]) |
1934 |
|
1935 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
1936 |
echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" |
1937 |
echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" |
1938 |
echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" |
1939 |
echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" |
1940 |
echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" |
1941 |
fi |
1942 |
]) |
1943 |
|
1944 |
|
1945 |
dnl --------------------------------------------------------------------------- |
1946 |
dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
1947 |
dnl |
1948 |
dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values |
1949 |
dnl which are different from "auto". |
1950 |
dnl Thus this macro needs to be called only once all options have been set. |
1951 |
dnl --------------------------------------------------------------------------- |
1952 |
AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], |
1953 |
[ |
1954 |
if test "$WX_SHARED" = "1" ; then |
1955 |
WXCONFIG_FLAGS="--static=no " |
1956 |
elif test "$WX_SHARED" = "0" ; then |
1957 |
WXCONFIG_FLAGS="--static=yes " |
1958 |
fi |
1959 |
|
1960 |
if test "$WX_DEBUG" = "1" ; then |
1961 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " |
1962 |
elif test "$WX_DEBUG" = "0" ; then |
1963 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " |
1964 |
fi |
1965 |
|
1966 |
dnl The user should have set WX_UNICODE=UNICODE |
1967 |
if test "$WX_UNICODE" = "1" ; then |
1968 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " |
1969 |
elif test "$WX_UNICODE" = "0" ; then |
1970 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " |
1971 |
fi |
1972 |
|
1973 |
if test "$TOOLKIT" != "auto" ; then |
1974 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " |
1975 |
fi |
1976 |
|
1977 |
if test "$WX_RELEASE" != "auto" ; then |
1978 |
WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " |
1979 |
fi |
1980 |
|
1981 |
dnl strip out the last space of the string |
1982 |
WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } |
1983 |
|
1984 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
1985 |
echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" |
1986 |
fi |
1987 |
]) |
1988 |
|
1989 |
|
1990 |
dnl --------------------------------------------------------------------------- |
1991 |
dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] |
1992 |
dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
1993 |
dnl |
1994 |
dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets |
1995 |
dnl additional CPP flags and put the result of the search in WX_$RESULTVAR |
1996 |
dnl also adding the "yes" or "no" message result to MSG. |
1997 |
dnl --------------------------------------------------------------------------- |
1998 |
AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], |
1999 |
[ |
2000 |
if test "$$1" = "auto" ; then |
2001 |
|
2002 |
dnl The user does not have particular preferences for this option; |
2003 |
dnl so we will detect the wxWidgets relative build setting and use it |
2004 |
AC_MSG_CHECKING([$3]) |
2005 |
|
2006 |
dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 |
2007 |
dnl string or to 0 otherwise. |
2008 |
dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it |
2009 |
dnl doesn't work; we use 'expr STRING : REGEXP' instead |
2010 |
WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") |
2011 |
|
2012 |
if test "$WX_$1" != "0"; then |
2013 |
WX_$1=1 |
2014 |
AC_MSG_RESULT([yes]) |
2015 |
ifelse([$4], , :, [$4]) |
2016 |
else |
2017 |
WX_$1=0 |
2018 |
AC_MSG_RESULT([no]) |
2019 |
ifelse([$5], , :, [$5]) |
2020 |
fi |
2021 |
else |
2022 |
|
2023 |
dnl Use the setting given by the user |
2024 |
WX_$1=$$1 |
2025 |
fi |
2026 |
]) |
2027 |
|
2028 |
dnl --------------------------------------------------------------------------- |
2029 |
dnl WX_DETECT_STANDARD_OPTION_VALUES |
2030 |
dnl |
2031 |
dnl Detects the values of the following variables: |
2032 |
dnl 1) WX_RELEASE |
2033 |
dnl 2) WX_UNICODE |
2034 |
dnl 3) WX_DEBUG |
2035 |
dnl 4) WX_SHARED (and also WX_STATIC) |
2036 |
dnl 5) WX_PORT |
2037 |
dnl from the previously selected wxWidgets build; this macro in fact must be |
2038 |
dnl called *after* calling the WX_CONFIG_CHECK macro. |
2039 |
dnl |
2040 |
dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set |
2041 |
dnl by WX_CONFIG_CHECK macro |
2042 |
dnl --------------------------------------------------------------------------- |
2043 |
AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], |
2044 |
[ |
2045 |
dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, |
2046 |
dnl while WX_RELEASE only the major.minor ones. |
2047 |
WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" |
2048 |
if test $WX_RELEASE -lt 26 ; then |
2049 |
|
2050 |
AC_MSG_ERROR([ |
2051 |
Cannot detect the wxWidgets configuration for the selected wxWidgets build |
2052 |
since its version is $WX_VERSION < 2.6.0; please install a newer |
2053 |
version of wxWidgets. |
2054 |
]) |
2055 |
fi |
2056 |
|
2057 |
dnl The wx-config we are using understands the "--selected_config" |
2058 |
dnl option which returns an easy-parseable string ! |
2059 |
WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) |
2060 |
|
2061 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
2062 |
echo "[[dbg]] Using wx-config --selected-config" |
2063 |
echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" |
2064 |
fi |
2065 |
|
2066 |
|
2067 |
dnl we could test directly for WX_SHARED with a line like: |
2068 |
dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], |
2069 |
dnl [if wxWidgets was built in SHARED mode]) |
2070 |
dnl but wx-config --selected-config DOES NOT outputs the 'shared' |
2071 |
dnl word when wx was built in shared mode; it rather outputs the |
2072 |
dnl 'static' word when built in static mode. |
2073 |
if test $WX_SHARED = "1"; then |
2074 |
STATIC=0 |
2075 |
elif test $WX_SHARED = "0"; then |
2076 |
STATIC=1 |
2077 |
elif test $WX_SHARED = "auto"; then |
2078 |
STATIC="auto" |
2079 |
fi |
2080 |
|
2081 |
dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables |
2082 |
_WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], |
2083 |
[if wxWidgets was built with UNICODE enabled]) |
2084 |
_WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], |
2085 |
[if wxWidgets was built in DEBUG mode]) |
2086 |
_WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], |
2087 |
[if wxWidgets was built in STATIC mode]) |
2088 |
|
2089 |
dnl init WX_SHARED from WX_STATIC |
2090 |
if test "$WX_STATIC" != "0"; then |
2091 |
WX_SHARED=0 |
2092 |
else |
2093 |
WX_SHARED=1 |
2094 |
fi |
2095 |
|
2096 |
AC_SUBST(WX_UNICODE) |
2097 |
AC_SUBST(WX_DEBUG) |
2098 |
AC_SUBST(WX_SHARED) |
2099 |
|
2100 |
dnl detect the WX_PORT to use |
2101 |
if test "$TOOLKIT" = "auto" ; then |
2102 |
|
2103 |
dnl The user does not have particular preferences for this option; |
2104 |
dnl so we will detect the wxWidgets relative build setting and use it |
2105 |
AC_MSG_CHECKING([which wxWidgets toolkit was selected]) |
2106 |
|
2107 |
WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") |
2108 |
WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") |
2109 |
WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") |
2110 |
WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") |
2111 |
WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") |
2112 |
WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") |
2113 |
WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") |
2114 |
WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") |
2115 |
|
2116 |
WX_PORT="unknown" |
2117 |
if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi |
2118 |
if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi |
2119 |
if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi |
2120 |
if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi |
2121 |
if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi |
2122 |
if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi |
2123 |
if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi |
2124 |
if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi |
2125 |
|
2126 |
dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac |
2127 |
dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) |
2128 |
WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") |
2129 |
if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi |
2130 |
|
2131 |
dnl check at least one of the WX_*PORT has been set ! |
2132 |
|
2133 |
if test "$WX_PORT" = "unknown" ; then |
2134 |
AC_MSG_ERROR([ |
2135 |
Cannot detect the currently installed wxWidgets port ! |
2136 |
Please check your 'wx-config --cxxflags'... |
2137 |
]) |
2138 |
fi |
2139 |
|
2140 |
AC_MSG_RESULT([$WX_PORT]) |
2141 |
else |
2142 |
|
2143 |
dnl Use the setting given by the user |
2144 |
if test -z "$TOOLKIT" ; then |
2145 |
WX_PORT=$TOOLKIT |
2146 |
else |
2147 |
dnl try with PORT |
2148 |
WX_PORT=$PORT |
2149 |
fi |
2150 |
fi |
2151 |
|
2152 |
AC_SUBST(WX_PORT) |
2153 |
|
2154 |
if test "$WX_DEBUG_CONFIGURE" = "1"; then |
2155 |
echo "[[dbg]] Values of all WX_* options after final detection:" |
2156 |
echo "[[dbg]] WX_DEBUG: $WX_DEBUG" |
2157 |
echo "[[dbg]] WX_UNICODE: $WX_UNICODE" |
2158 |
echo "[[dbg]] WX_SHARED: $WX_SHARED" |
2159 |
echo "[[dbg]] WX_RELEASE: $WX_RELEASE" |
2160 |
echo "[[dbg]] WX_PORT: $WX_PORT" |
2161 |
fi |
2162 |
|
2163 |
dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when |
2164 |
dnl the user gives the options: |
2165 |
dnl ./configure --enable-shared --without-wxshared |
2166 |
dnl or just do |
2167 |
dnl ./configure --enable-shared |
2168 |
dnl but there is only a static build of wxWidgets available. |
2169 |
if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then |
2170 |
AC_MSG_ERROR([ |
2171 |
Cannot build shared library against a static build of wxWidgets ! |
2172 |
This error happens because the wxWidgets build which was selected |
2173 |
has been detected as static while you asked to build $PACKAGE_NAME |
2174 |
as shared library and this is not possible. |
2175 |
Use the '--disable-shared' option to build $PACKAGE_NAME |
2176 |
as static library or '--with-wxshared' to use wxWidgets as shared library. |
2177 |
]) |
2178 |
fi |
2179 |
|
2180 |
dnl now we can finally update the DEBUG,UNICODE,SHARED options |
2181 |
dnl to their final values if they were set to 'auto' |
2182 |
if test "$DEBUG" = "auto"; then |
2183 |
DEBUG=$WX_DEBUG |
2184 |
fi |
2185 |
if test "$UNICODE" = "auto"; then |
2186 |
UNICODE=$WX_UNICODE |
2187 |
fi |
2188 |
if test "$SHARED" = "auto"; then |
2189 |
SHARED=$WX_SHARED |
2190 |
fi |
2191 |
if test "$TOOLKIT" = "auto"; then |
2192 |
TOOLKIT=$WX_PORT |
2193 |
fi |
2194 |
|
2195 |
dnl in case the user needs a BUILD=debug/release var... |
2196 |
if test "$DEBUG" = "1"; then |
2197 |
BUILD="debug" |
2198 |
elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then |
2199 |
BUILD="release" |
2200 |
fi |
2201 |
|
2202 |
dnl respect the DEBUG variable adding the optimize/debug flags |
2203 |
dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we |
2204 |
dnl don't need to set them, too |
2205 |
if test "$DEBUG" = "1"; then |
2206 |
CXXFLAGS="$CXXFLAGS -g -O0" |
2207 |
CFLAGS="$CFLAGS -g -O0" |
2208 |
else |
2209 |
CXXFLAGS="$CXXFLAGS -O2" |
2210 |
CFLAGS="$CFLAGS -O2" |
2211 |
fi |
2212 |
]) |
2213 |
|
2214 |
dnl --------------------------------------------------------------------------- |
2215 |
dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], |
2216 |
dnl [what to print when var is 1], |
2217 |
dnl [what to print when var is 0]) |
2218 |
dnl |
2219 |
dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. |
2220 |
dnl This macro mainly exists just to make configure.ac scripts more readable. |
2221 |
dnl |
2222 |
dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments |
2223 |
dnl if you want that m4 avoid to throw away the spaces prefixed to the |
2224 |
dnl argument value. |
2225 |
dnl --------------------------------------------------------------------------- |
2226 |
AC_DEFUN([WX_BOOLOPT_SUMMARY], |
2227 |
[ |
2228 |
if test "x$$1" = "x1" ; then |
2229 |
echo $2 |
2230 |
elif test "x$$1" = "x0" ; then |
2231 |
echo $3 |
2232 |
else |
2233 |
echo "$1 is $$1" |
2234 |
fi |
2235 |
]) |
2236 |
|
2237 |
dnl --------------------------------------------------------------------------- |
2238 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
2239 |
dnl |
2240 |
dnl Shows a summary message to the user about the WX_* variable contents. |
2241 |
dnl This macro is used typically at the end of the configure script. |
2242 |
dnl --------------------------------------------------------------------------- |
2243 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], |
2244 |
[ |
2245 |
echo |
2246 |
echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" |
2247 |
echo " has the following settings:" |
2248 |
WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
2249 |
WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
2250 |
WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
2251 |
echo " - VERSION: $WX_VERSION" |
2252 |
echo " - PORT: $WX_PORT" |
2253 |
]) |
2254 |
|
2255 |
|
2256 |
dnl --------------------------------------------------------------------------- |
2257 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
2258 |
dnl |
2259 |
dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info |
2260 |
dnl about the configuration of the package which used the wxpresets. |
2261 |
dnl |
2262 |
dnl Typical usage: |
2263 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
2264 |
dnl echo " - Package setting 1: $SETTING1" |
2265 |
dnl echo " - Package setting 2: $SETTING1" |
2266 |
dnl ... |
2267 |
dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
2268 |
dnl |
2269 |
dnl --------------------------------------------------------------------------- |
2270 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], |
2271 |
[ |
2272 |
echo |
2273 |
echo " ----------------------------------------------------------------" |
2274 |
echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." |
2275 |
echo " Summary of main configuration settings for $PACKAGE_NAME:" |
2276 |
WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
2277 |
WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
2278 |
WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
2279 |
]) |
2280 |
|
2281 |
AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], |
2282 |
[ |
2283 |
WX_STANDARD_OPTIONS_SUMMARY_MSG |
2284 |
echo |
2285 |
echo " Now, just run make." |
2286 |
echo " ----------------------------------------------------------------" |
2287 |
echo |
2288 |
]) |
2289 |
|
2290 |
|
2291 |
dnl --------------------------------------------------------------------------- |
2292 |
dnl Deprecated macro wrappers |
2293 |
dnl --------------------------------------------------------------------------- |
2294 |
|
2295 |
AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) |
2296 |
AC_DEFUN([AM_PATH_WXCONFIG], [ |
2297 |
WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) |
2298 |
]) |
2299 |
AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) |
2300 |
|
2301 |
|
2302 |
|
2303 |
1.1 app-eselect/eselect-wxwidgets/files/wxrc-1.3 |
2304 |
|
2305 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.3?rev=1.1&view=markup |
2306 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.3?rev=1.1&content-type=text/plain |
2307 |
|
2308 |
Index: wxrc-1.3 |
2309 |
=================================================================== |
2310 |
#!/bin/sh - |
2311 |
# $Header: /var/cvsroot/gentoo-x86/app-eselect/eselect-wxwidgets/files/wxrc-1.3,v 1.1 2015/03/31 16:58:24 ulm Exp $ |
2312 |
# |
2313 |
# /usr/bin/wxrc |
2314 |
# |
2315 |
# a lame wxrc wrapper (bugs to wxwidgets@g.o) |
2316 |
|
2317 |
_wxerror() { |
2318 |
cat >&2 <<- EOF |
2319 |
An error occurred while calling wxrc: |
2320 |
|
2321 |
${1} |
2322 |
|
2323 |
Please use \`eselect wxwidgets\` to select an available profile and try again. |
2324 |
EOF |
2325 |
exit 1 |
2326 |
} |
2327 |
|
2328 |
if [ -n "${WX_ECLASS_CONFIG}" ]; then |
2329 |
$(${WX_ECLASS_CONFIG} --utility=wxrc) "$@" |
2330 |
exit 0 |
2331 |
else |
2332 |
if [ -e /var/lib/wxwidgets/current ]; then |
2333 |
. /var/lib/wxwidgets/current |
2334 |
else |
2335 |
_wxerror "Cannot find the wxWidgets profile configuration ( /var/lib/wxwidgets/current )" |
2336 |
fi |
2337 |
|
2338 |
[ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
2339 |
|
2340 |
if [ -x /usr/lib/wx/config/${WXCONFIG} ]; then |
2341 |
$(/usr/lib/wx/config/${WXCONFIG} --utility=wxrc) "$@" |
2342 |
else |
2343 |
_wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
2344 |
fi |
2345 |
exit 0 |
2346 |
fi |