1 |
commit: bb953f2f3a29a533b68ae7181eaf22f09696eb7d |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 8 18:17:29 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 8 18:47:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bb953f2f |
7 |
|
8 |
app-eselect/eselect-wxwidgets: [QA] Move files/ to a distfile |
9 |
|
10 |
Closes: https://bugs.gentoo.org/620542 |
11 |
|
12 |
app-eselect/eselect-wxwidgets/Manifest | 1 + |
13 |
.../eselect-wxwidgets-20140423.ebuild | 7 +- |
14 |
app-eselect/eselect-wxwidgets/files/wx-config-1.4 | 40 - |
15 |
app-eselect/eselect-wxwidgets/files/wxrc-1.4 | 40 - |
16 |
app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0 | 1059 -------------------- |
17 |
5 files changed, 5 insertions(+), 1142 deletions(-) |
18 |
|
19 |
diff --git a/app-eselect/eselect-wxwidgets/Manifest b/app-eselect/eselect-wxwidgets/Manifest |
20 |
index 20f5fba1237..34a8fba0d38 100644 |
21 |
--- a/app-eselect/eselect-wxwidgets/Manifest |
22 |
+++ b/app-eselect/eselect-wxwidgets/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST eselect-wxwidgets-20140423.tar.xz 6792 SHA256 e97d5734f4b0e314abdaa1a9ee148cdafed74e1cdc036e01e6ac74599736e1bb SHA512 0d83e0b6979803c8a02c20ac33a42c91fd8d350c095e26704a80c1913309f0e7d741cc466ab22e0a6ce4773deab21ca80756299a12a83d441ded968531003d0e WHIRLPOOL 31108a15a0f3774c7a5959de946c741b758d818f1dbf09f96d633e354c086863684f431a6ac59a63f559f0c65482f790a95c7dc431dc91b7b48ec4e4a2c9c730 |
25 |
+DIST eselect-wxwidgets-files.tar.bz2 9126 BLAKE2B 47ec94aec721d325fc483ece28e84b48c35b103078415447b6e79e68ab44af9356955c960b9464713396f4cbbf663522e5a4493516414641aa5b99e7cdca0ac8 SHA512 c5aba3bf4bbb891534e0c7a444da6cb90a947dab407e436a1eccd13ddb33251816ce95b5fb6826aa9a64ec2b3d9be09c9852859597b0b8ce91cbaf0f6ed6da5e |
26 |
|
27 |
diff --git a/app-eselect/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild b/app-eselect/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild |
28 |
index 5e6c49d7042..1dc14bd7a17 100644 |
29 |
--- a/app-eselect/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild |
30 |
+++ b/app-eselect/eselect-wxwidgets/eselect-wxwidgets-20140423.ebuild |
31 |
@@ -9,7 +9,8 @@ WXWRAP_VER=1.4 |
32 |
|
33 |
DESCRIPTION="Eselect module and wrappers for wxWidgets" |
34 |
HOMEPAGE="https://www.gentoo.org" |
35 |
-SRC_URI="https://dev.gentoo.org/~junghans/dist/${P}.tar.xz" |
36 |
+SRC_URI="https://dev.gentoo.org/~junghans/dist/${P}.tar.xz |
37 |
+ https://dev.gentoo.org/~mgorny/dist/${PN}-files.tar.bz2" |
38 |
|
39 |
LICENSE="GPL-2" |
40 |
SLOT="0" |
41 |
@@ -19,7 +20,7 @@ IUSE="" |
42 |
RDEPEND="app-admin/eselect" |
43 |
|
44 |
src_prepare() { |
45 |
- cp "${FILESDIR}"/{wx-config,wxrc}-${WXWRAP_VER} . || die |
46 |
+ cp "${WORKDIR}"/eselect-wxwidgets-files/{wx-config,wxrc}-${WXWRAP_VER} . || die |
47 |
sed \ |
48 |
-e "/^LIBDIR=/s:lib:$(get_libdir):" \ |
49 |
-e "/^EPREFIX=/s:'':'${EPREFIX}':" \ |
50 |
@@ -31,7 +32,7 @@ src_install() { |
51 |
doins wxwidgets.eselect |
52 |
|
53 |
insinto /usr/share/aclocal |
54 |
- newins "${FILESDIR}"/wxwin.m4-3.0 wxwin.m4 |
55 |
+ newins "${WORKDIR}"/eselect-wxwidgets-files/wxwin.m4-3.0 wxwin.m4 |
56 |
|
57 |
newbin wx-config-${WXWRAP_VER} wx-config |
58 |
newbin wxrc-${WXWRAP_VER} wxrc |
59 |
|
60 |
diff --git a/app-eselect/eselect-wxwidgets/files/wx-config-1.4 b/app-eselect/eselect-wxwidgets/files/wx-config-1.4 |
61 |
deleted file mode 100644 |
62 |
index 7dcb063c751..00000000000 |
63 |
--- a/app-eselect/eselect-wxwidgets/files/wx-config-1.4 |
64 |
+++ /dev/null |
65 |
@@ -1,40 +0,0 @@ |
66 |
-#!/bin/sh - |
67 |
-# |
68 |
-# /usr/bin/wx-config |
69 |
-# |
70 |
-# a lame wx-config wrapper (bugs to wxwidgets@g.o) |
71 |
- |
72 |
-EPREFIX='' |
73 |
-LIBDIR="lib" |
74 |
- |
75 |
-_wxerror() { |
76 |
- cat >&2 <<- EOF |
77 |
- An error occurred while calling wx-config: |
78 |
- |
79 |
- ${1} |
80 |
- |
81 |
- Please use \`eselect wxwidgets\` to select an available profile and try again. |
82 |
- EOF |
83 |
- exit 1 |
84 |
-} |
85 |
- |
86 |
-if [ -n "${WX_ECLASS_CONFIG}" ]; then |
87 |
- ${WX_ECLASS_CONFIG} "$@" |
88 |
- exit 0 |
89 |
-else |
90 |
- if [ -e "${EPREFIX}"/var/lib/wxwidgets/current ]; then |
91 |
- . "${EPREFIX}"/var/lib/wxwidgets/current |
92 |
- else |
93 |
- _wxerror "Cannot find the wxWidgets profile configuration ( ${EPREFIX}/var/lib/wxwidgets/current )" |
94 |
- fi |
95 |
- |
96 |
- [ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
97 |
- |
98 |
- if [ -x "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" ]; then |
99 |
- "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" "$@" |
100 |
- else |
101 |
- _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
102 |
- fi |
103 |
- exit 0 |
104 |
-fi |
105 |
- |
106 |
|
107 |
diff --git a/app-eselect/eselect-wxwidgets/files/wxrc-1.4 b/app-eselect/eselect-wxwidgets/files/wxrc-1.4 |
108 |
deleted file mode 100644 |
109 |
index 8339ee5fc06..00000000000 |
110 |
--- a/app-eselect/eselect-wxwidgets/files/wxrc-1.4 |
111 |
+++ /dev/null |
112 |
@@ -1,40 +0,0 @@ |
113 |
-#!/bin/sh - |
114 |
-# |
115 |
-# /usr/bin/wxrc |
116 |
-# |
117 |
-# a lame wxrc wrapper (bugs to wxwidgets@g.o) |
118 |
- |
119 |
-EPREFIX='' |
120 |
-LIBDIR="lib" |
121 |
- |
122 |
-_wxerror() { |
123 |
- cat >&2 <<- EOF |
124 |
- An error occurred while calling wxrc: |
125 |
- |
126 |
- ${1} |
127 |
- |
128 |
- Please use \`eselect wxwidgets\` to select an available profile and try again. |
129 |
- EOF |
130 |
- exit 1 |
131 |
-} |
132 |
- |
133 |
-if [ -n "${WX_ECLASS_CONFIG}" ]; then |
134 |
- $(${WX_ECLASS_CONFIG} --utility=wxrc) "$@" |
135 |
- exit 0 |
136 |
-else |
137 |
- if [ -e "${EPREFIX}"/var/lib/wxwidgets/current ]; then |
138 |
- . "${EPREFIX}"/var/lib/wxwidgets/current |
139 |
- else |
140 |
- _wxerror "Cannot find the wxWidgets profile configuration ( ${EPREFIX}/var/lib/wxwidgets/current )" |
141 |
- fi |
142 |
- |
143 |
- [ -z "${WXCONFIG}" -o "${WXCONFIG}" = none ] && _wxerror "No profile currently selected" |
144 |
- |
145 |
- if [ -x "${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" ]; then |
146 |
- $("${EPREFIX}/usr/${LIBDIR}/wx/config/${WXCONFIG}" --utility=wxrc) "$@" |
147 |
- else |
148 |
- _wxerror "Cannot find wxWidgets profile ( ${WXCONFIG} )" |
149 |
- fi |
150 |
- exit 0 |
151 |
-fi |
152 |
- |
153 |
|
154 |
diff --git a/app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0 b/app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0 |
155 |
deleted file mode 100644 |
156 |
index f8e5b704a29..00000000000 |
157 |
--- a/app-eselect/eselect-wxwidgets/files/wxwin.m4-3.0 |
158 |
+++ /dev/null |
159 |
@@ -1,1059 +0,0 @@ |
160 |
-dnl --------------------------------------------------------------------------- |
161 |
-dnl Author: wxWidgets development team, |
162 |
-dnl Francesco Montorsi, |
163 |
-dnl Bob McCown (Mac-testing) |
164 |
-dnl Creation date: 24/11/2001 |
165 |
-dnl --------------------------------------------------------------------------- |
166 |
- |
167 |
-dnl =========================================================================== |
168 |
-dnl Table of Contents of this macro file: |
169 |
-dnl ------------------------------------- |
170 |
-dnl |
171 |
-dnl SECTION A: wxWidgets main macros |
172 |
-dnl - WX_CONFIG_OPTIONS |
173 |
-dnl - WX_CONFIG_CHECK |
174 |
-dnl - WXRC_CHECK |
175 |
-dnl - WX_STANDARD_OPTIONS |
176 |
-dnl - WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
177 |
-dnl - WX_DETECT_STANDARD_OPTION_VALUES |
178 |
-dnl |
179 |
-dnl SECTION B: wxWidgets-related utilities |
180 |
-dnl - WX_LIKE_LIBNAME |
181 |
-dnl - WX_ARG_ENABLE_YESNOAUTO |
182 |
-dnl - WX_ARG_WITH_YESNOAUTO |
183 |
-dnl |
184 |
-dnl SECTION C: messages to the user |
185 |
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG |
186 |
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
187 |
-dnl - WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
188 |
-dnl - WX_BOOLOPT_SUMMARY |
189 |
-dnl |
190 |
-dnl The special "WX_DEBUG_CONFIGURE" variable can be set to 1 to enable extra |
191 |
-dnl debug output on stdout from these macros. |
192 |
-dnl =========================================================================== |
193 |
- |
194 |
- |
195 |
-dnl --------------------------------------------------------------------------- |
196 |
-dnl Macros for wxWidgets detection. Typically used in configure.in as: |
197 |
-dnl |
198 |
-dnl AC_ARG_ENABLE(...) |
199 |
-dnl AC_ARG_WITH(...) |
200 |
-dnl ... |
201 |
-dnl WX_CONFIG_OPTIONS |
202 |
-dnl ... |
203 |
-dnl ... |
204 |
-dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1]) |
205 |
-dnl if test "$wxWin" != 1; then |
206 |
-dnl AC_MSG_ERROR([ |
207 |
-dnl wxWidgets must be installed on your system |
208 |
-dnl but wx-config script couldn't be found. |
209 |
-dnl |
210 |
-dnl Please check that wx-config is in path, the directory |
211 |
-dnl where wxWidgets libraries are installed (returned by |
212 |
-dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
213 |
-dnl equivalent variable and wxWidgets version is 2.3.4 or above. |
214 |
-dnl ]) |
215 |
-dnl fi |
216 |
-dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
217 |
-dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
218 |
-dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
219 |
-dnl |
220 |
-dnl LIBS="$LIBS $WX_LIBS" |
221 |
-dnl |
222 |
-dnl If you want to support standard --enable-debug/unicode/shared options, you |
223 |
-dnl may do the following: |
224 |
-dnl |
225 |
-dnl ... |
226 |
-dnl AC_CANONICAL_SYSTEM |
227 |
-dnl |
228 |
-dnl # define configure options |
229 |
-dnl WX_CONFIG_OPTIONS |
230 |
-dnl WX_STANDARD_OPTIONS([debug,unicode,shared,toolkit,wxshared]) |
231 |
-dnl |
232 |
-dnl # basic configure checks |
233 |
-dnl ... |
234 |
-dnl |
235 |
-dnl # we want to always have DEBUG==WX_DEBUG and UNICODE==WX_UNICODE |
236 |
-dnl WX_DEBUG=$DEBUG |
237 |
-dnl WX_UNICODE=$UNICODE |
238 |
-dnl |
239 |
-dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
240 |
-dnl WX_CONFIG_CHECK([2.8.0], [wxWin=1],,[html,core,net,base],[$WXCONFIG_FLAGS]) |
241 |
-dnl WX_DETECT_STANDARD_OPTION_VALUES |
242 |
-dnl |
243 |
-dnl # write the output files |
244 |
-dnl AC_CONFIG_FILES([Makefile ...]) |
245 |
-dnl AC_OUTPUT |
246 |
-dnl |
247 |
-dnl # optional: just to show a message to the user |
248 |
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
249 |
-dnl |
250 |
-dnl --------------------------------------------------------------------------- |
251 |
- |
252 |
- |
253 |
-dnl --------------------------------------------------------------------------- |
254 |
-dnl WX_CONFIG_OPTIONS |
255 |
-dnl |
256 |
-dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and |
257 |
-dnl --wx-config command line options |
258 |
-dnl --------------------------------------------------------------------------- |
259 |
- |
260 |
-AC_DEFUN([WX_CONFIG_OPTIONS], |
261 |
-[ |
262 |
- AC_ARG_WITH(wxdir, |
263 |
- [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], |
264 |
- [ wx_config_name="$withval/wx-config" |
265 |
- wx_config_args="--inplace"]) |
266 |
- AC_ARG_WITH(wx-config, |
267 |
- [ --with-wx-config=CONFIG wx-config script to use (optional)], |
268 |
- wx_config_name="$withval" ) |
269 |
- AC_ARG_WITH(wx-prefix, |
270 |
- [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], |
271 |
- wx_config_prefix="$withval", wx_config_prefix="") |
272 |
- AC_ARG_WITH(wx-exec-prefix, |
273 |
- [ --with-wx-exec-prefix=PREFIX |
274 |
- Exec prefix where wxWidgets is installed (optional)], |
275 |
- wx_config_exec_prefix="$withval", wx_config_exec_prefix="") |
276 |
-]) |
277 |
- |
278 |
-dnl Helper macro for checking if wx version is at least $1.$2.$3, set's |
279 |
-dnl wx_ver_ok=yes if it is: |
280 |
-AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], |
281 |
-[ |
282 |
- wx_ver_ok="" |
283 |
- if test "x$WX_VERSION" != x ; then |
284 |
- if test $wx_config_major_version -gt $1; then |
285 |
- wx_ver_ok=yes |
286 |
- else |
287 |
- if test $wx_config_major_version -eq $1; then |
288 |
- if test $wx_config_minor_version -gt $2; then |
289 |
- wx_ver_ok=yes |
290 |
- else |
291 |
- if test $wx_config_minor_version -eq $2; then |
292 |
- if test $wx_config_micro_version -ge $3; then |
293 |
- wx_ver_ok=yes |
294 |
- fi |
295 |
- fi |
296 |
- fi |
297 |
- fi |
298 |
- fi |
299 |
- fi |
300 |
-]) |
301 |
- |
302 |
-dnl --------------------------------------------------------------------------- |
303 |
-dnl WX_CONFIG_CHECK(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND |
304 |
-dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) |
305 |
-dnl |
306 |
-dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC |
307 |
-dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME |
308 |
-dnl environment variable to override the default name of the wx-config script |
309 |
-dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this |
310 |
-dnl case the macro won't even waste time on tests for its existence. |
311 |
-dnl |
312 |
-dnl Optional WX-LIBS argument contains comma- or space-separated list of |
313 |
-dnl wxWidgets libraries to link against. If it is not specified then WX_LIBS |
314 |
-dnl and WX_LIBS_STATIC will contain flags to link with all of the core |
315 |
-dnl wxWidgets libraries. |
316 |
-dnl |
317 |
-dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config |
318 |
-dnl invocation command in present. It can be used to fine-tune lookup of |
319 |
-dnl best wxWidgets build available. |
320 |
-dnl |
321 |
-dnl Example use: |
322 |
-dnl WX_CONFIG_CHECK([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] |
323 |
-dnl [--unicode --debug]) |
324 |
-dnl --------------------------------------------------------------------------- |
325 |
- |
326 |
-dnl |
327 |
-dnl Get the cflags and libraries from the wx-config script |
328 |
-dnl |
329 |
-AC_DEFUN([WX_CONFIG_CHECK], |
330 |
-[ |
331 |
- dnl do we have wx-config name: it can be wx-config or wxd-config or ... |
332 |
- if test x${WX_CONFIG_NAME+set} != xset ; then |
333 |
- WX_CONFIG_NAME=wx-config |
334 |
- fi |
335 |
- |
336 |
- if test "x$wx_config_name" != x ; then |
337 |
- WX_CONFIG_NAME="$wx_config_name" |
338 |
- fi |
339 |
- |
340 |
- dnl deal with optional prefixes |
341 |
- if test x$wx_config_exec_prefix != x ; then |
342 |
- wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" |
343 |
- WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" |
344 |
- fi |
345 |
- if test x$wx_config_prefix != x ; then |
346 |
- wx_config_args="$wx_config_args --prefix=$wx_config_prefix" |
347 |
- WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" |
348 |
- fi |
349 |
- if test "$cross_compiling" = "yes"; then |
350 |
- wx_config_args="$wx_config_args --host=$host_alias" |
351 |
- fi |
352 |
- |
353 |
- dnl don't search the PATH if WX_CONFIG_NAME is absolute filename |
354 |
- if test -x "$WX_CONFIG_NAME" ; then |
355 |
- AC_MSG_CHECKING(for wx-config) |
356 |
- WX_CONFIG_PATH="$WX_CONFIG_NAME" |
357 |
- AC_MSG_RESULT($WX_CONFIG_PATH) |
358 |
- else |
359 |
- AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") |
360 |
- fi |
361 |
- |
362 |
- if test "$WX_CONFIG_PATH" != "no" ; then |
363 |
- WX_VERSION="" |
364 |
- |
365 |
- min_wx_version=ifelse([$1], ,2.2.1,$1) |
366 |
- if test -z "$5" ; then |
367 |
- AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) |
368 |
- else |
369 |
- AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) |
370 |
- fi |
371 |
- |
372 |
- dnl don't add the libraries ($4) to this variable as this would result in |
373 |
- dnl an error when it's used with --version below |
374 |
- WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5" |
375 |
- |
376 |
- WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` |
377 |
- wx_config_major_version=`echo $WX_VERSION | \ |
378 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
379 |
- wx_config_minor_version=`echo $WX_VERSION | \ |
380 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
381 |
- wx_config_micro_version=`echo $WX_VERSION | \ |
382 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
383 |
- |
384 |
- wx_requested_major_version=`echo $min_wx_version | \ |
385 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` |
386 |
- wx_requested_minor_version=`echo $min_wx_version | \ |
387 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` |
388 |
- wx_requested_micro_version=`echo $min_wx_version | \ |
389 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` |
390 |
- |
391 |
- _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], |
392 |
- [$wx_requested_minor_version], |
393 |
- [$wx_requested_micro_version]) |
394 |
- |
395 |
- if test -n "$wx_ver_ok"; then |
396 |
- AC_MSG_RESULT(yes (version $WX_VERSION)) |
397 |
- WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs $4` |
398 |
- |
399 |
- dnl is this even still appropriate? --static is a real option now |
400 |
- dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is |
401 |
- dnl what the user actually wants, making this redundant at best. |
402 |
- dnl For now keep it in case anyone actually used it in the past. |
403 |
- AC_MSG_CHECKING([for wxWidgets static library]) |
404 |
- WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs $4 2>/dev/null` |
405 |
- if test "x$WX_LIBS_STATIC" = "x"; then |
406 |
- AC_MSG_RESULT(no) |
407 |
- else |
408 |
- AC_MSG_RESULT(yes) |
409 |
- fi |
410 |
- |
411 |
- dnl starting with version 2.2.6 wx-config has --cppflags argument |
412 |
- wx_has_cppflags="" |
413 |
- if test $wx_config_major_version -gt 2; then |
414 |
- wx_has_cppflags=yes |
415 |
- else |
416 |
- if test $wx_config_major_version -eq 2; then |
417 |
- if test $wx_config_minor_version -gt 2; then |
418 |
- wx_has_cppflags=yes |
419 |
- else |
420 |
- if test $wx_config_minor_version -eq 2; then |
421 |
- if test $wx_config_micro_version -ge 6; then |
422 |
- wx_has_cppflags=yes |
423 |
- fi |
424 |
- fi |
425 |
- fi |
426 |
- fi |
427 |
- fi |
428 |
- |
429 |
- dnl starting with version 2.7.0 wx-config has --rescomp option |
430 |
- wx_has_rescomp="" |
431 |
- if test $wx_config_major_version -gt 2; then |
432 |
- wx_has_rescomp=yes |
433 |
- else |
434 |
- if test $wx_config_major_version -eq 2; then |
435 |
- if test $wx_config_minor_version -ge 7; then |
436 |
- wx_has_rescomp=yes |
437 |
- fi |
438 |
- fi |
439 |
- fi |
440 |
- if test "x$wx_has_rescomp" = x ; then |
441 |
- dnl cannot give any useful info for resource compiler |
442 |
- WX_RESCOMP= |
443 |
- else |
444 |
- WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` |
445 |
- fi |
446 |
- |
447 |
- if test "x$wx_has_cppflags" = x ; then |
448 |
- dnl no choice but to define all flags like CFLAGS |
449 |
- WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
450 |
- WX_CPPFLAGS=$WX_CFLAGS |
451 |
- WX_CXXFLAGS=$WX_CFLAGS |
452 |
- |
453 |
- WX_CFLAGS_ONLY=$WX_CFLAGS |
454 |
- WX_CXXFLAGS_ONLY=$WX_CFLAGS |
455 |
- else |
456 |
- dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS |
457 |
- WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags $4` |
458 |
- WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags $4` |
459 |
- WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags $4` |
460 |
- |
461 |
- WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` |
462 |
- WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` |
463 |
- fi |
464 |
- |
465 |
- ifelse([$2], , :, [$2]) |
466 |
- |
467 |
- else |
468 |
- |
469 |
- if test "x$WX_VERSION" = x; then |
470 |
- dnl no wx-config at all |
471 |
- AC_MSG_RESULT(no) |
472 |
- else |
473 |
- AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) |
474 |
- fi |
475 |
- |
476 |
- WX_CFLAGS="" |
477 |
- WX_CPPFLAGS="" |
478 |
- WX_CXXFLAGS="" |
479 |
- WX_LIBS="" |
480 |
- WX_LIBS_STATIC="" |
481 |
- WX_RESCOMP="" |
482 |
- |
483 |
- if test ! -z "$5"; then |
484 |
- |
485 |
- wx_error_message=" |
486 |
- The configuration you asked for $PACKAGE_NAME requires a wxWidgets |
487 |
- build with the following settings: |
488 |
- $5 |
489 |
- but such build is not available. |
490 |
- |
491 |
- To see the wxWidgets builds available on this system, please use |
492 |
- 'wx-config --list' command. To use the default build, returned by |
493 |
- 'wx-config --selected-config', use the options with their 'auto' |
494 |
- default values." |
495 |
- |
496 |
- fi |
497 |
- |
498 |
- wx_error_message=" |
499 |
- The requested wxWidgets build couldn't be found. |
500 |
- $wx_error_message |
501 |
- |
502 |
- If you still get this error, then check that 'wx-config' is |
503 |
- in path, the directory where wxWidgets libraries are installed |
504 |
- (returned by 'wx-config --libs' command) is in LD_LIBRARY_PATH |
505 |
- or equivalent variable and wxWidgets version is $1 or above." |
506 |
- |
507 |
- ifelse([$3], , AC_MSG_ERROR([$wx_error_message]), [$3]) |
508 |
- |
509 |
- fi |
510 |
- else |
511 |
- |
512 |
- WX_CFLAGS="" |
513 |
- WX_CPPFLAGS="" |
514 |
- WX_CXXFLAGS="" |
515 |
- WX_LIBS="" |
516 |
- WX_LIBS_STATIC="" |
517 |
- WX_RESCOMP="" |
518 |
- |
519 |
- ifelse([$3], , :, [$3]) |
520 |
- |
521 |
- fi |
522 |
- |
523 |
- AC_SUBST(WX_CPPFLAGS) |
524 |
- AC_SUBST(WX_CFLAGS) |
525 |
- AC_SUBST(WX_CXXFLAGS) |
526 |
- AC_SUBST(WX_CFLAGS_ONLY) |
527 |
- AC_SUBST(WX_CXXFLAGS_ONLY) |
528 |
- AC_SUBST(WX_LIBS) |
529 |
- AC_SUBST(WX_LIBS_STATIC) |
530 |
- AC_SUBST(WX_VERSION) |
531 |
- AC_SUBST(WX_RESCOMP) |
532 |
- |
533 |
- dnl need to export also WX_VERSION_MINOR and WX_VERSION_MAJOR symbols |
534 |
- dnl to support wxpresets bakefiles (we export also WX_VERSION_MICRO for completeness): |
535 |
- WX_VERSION_MAJOR="$wx_config_major_version" |
536 |
- WX_VERSION_MINOR="$wx_config_minor_version" |
537 |
- WX_VERSION_MICRO="$wx_config_micro_version" |
538 |
- AC_SUBST(WX_VERSION_MAJOR) |
539 |
- AC_SUBST(WX_VERSION_MINOR) |
540 |
- AC_SUBST(WX_VERSION_MICRO) |
541 |
-]) |
542 |
- |
543 |
-dnl --------------------------------------------------------------------------- |
544 |
-dnl Get information on the wxrc program for making C++, Python and xrs |
545 |
-dnl resource files. |
546 |
-dnl |
547 |
-dnl AC_ARG_ENABLE(...) |
548 |
-dnl AC_ARG_WITH(...) |
549 |
-dnl ... |
550 |
-dnl WX_CONFIG_OPTIONS |
551 |
-dnl ... |
552 |
-dnl WX_CONFIG_CHECK(2.6.0, wxWin=1) |
553 |
-dnl if test "$wxWin" != 1; then |
554 |
-dnl AC_MSG_ERROR([ |
555 |
-dnl wxWidgets must be installed on your system |
556 |
-dnl but wx-config script couldn't be found. |
557 |
-dnl |
558 |
-dnl Please check that wx-config is in path, the directory |
559 |
-dnl where wxWidgets libraries are installed (returned by |
560 |
-dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or |
561 |
-dnl equivalent variable and wxWidgets version is 2.6.0 or above. |
562 |
-dnl ]) |
563 |
-dnl fi |
564 |
-dnl |
565 |
-dnl WXRC_CHECK([HAVE_WXRC=1], [HAVE_WXRC=0]) |
566 |
-dnl if test "x$HAVE_WXRC" != x1; then |
567 |
-dnl AC_MSG_ERROR([ |
568 |
-dnl The wxrc program was not installed or not found. |
569 |
-dnl |
570 |
-dnl Please check the wxWidgets installation. |
571 |
-dnl ]) |
572 |
-dnl fi |
573 |
-dnl |
574 |
-dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" |
575 |
-dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" |
576 |
-dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" |
577 |
-dnl |
578 |
-dnl LDFLAGS="$LDFLAGS $WX_LIBS" |
579 |
-dnl --------------------------------------------------------------------------- |
580 |
- |
581 |
-dnl --------------------------------------------------------------------------- |
582 |
-dnl WXRC_CHECK([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
583 |
-dnl |
584 |
-dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS |
585 |
-dnl resources. The variable WXRC will be set and substituted in the configure |
586 |
-dnl script and Makefiles. |
587 |
-dnl |
588 |
-dnl Example use: |
589 |
-dnl WXRC_CHECK([wxrc=1], [wxrc=0]) |
590 |
-dnl --------------------------------------------------------------------------- |
591 |
- |
592 |
-dnl |
593 |
-dnl wxrc program from the wx-config script |
594 |
-dnl |
595 |
-AC_DEFUN([WXRC_CHECK], |
596 |
-[ |
597 |
- AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) |
598 |
- |
599 |
- if test "x$WX_CONFIG_NAME" = x; then |
600 |
- AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) |
601 |
- else |
602 |
- |
603 |
- AC_MSG_CHECKING([for wxrc]) |
604 |
- |
605 |
- if test "x$WXRC" = x ; then |
606 |
- dnl wx-config --utility is a new addition to wxWidgets: |
607 |
- _WX_PRIVATE_CHECK_VERSION(2,5,3) |
608 |
- if test -n "$wx_ver_ok"; then |
609 |
- WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` |
610 |
- fi |
611 |
- fi |
612 |
- |
613 |
- if test "x$WXRC" = x ; then |
614 |
- AC_MSG_RESULT([not found]) |
615 |
- ifelse([$2], , :, [$2]) |
616 |
- else |
617 |
- AC_MSG_RESULT([$WXRC]) |
618 |
- ifelse([$1], , :, [$1]) |
619 |
- fi |
620 |
- |
621 |
- AC_SUBST(WXRC) |
622 |
- fi |
623 |
-]) |
624 |
- |
625 |
-dnl --------------------------------------------------------------------------- |
626 |
-dnl WX_LIKE_LIBNAME([output-var] [prefix], [name]) |
627 |
-dnl |
628 |
-dnl Sets the "output-var" variable to the name of a library named with same |
629 |
-dnl wxWidgets rule. |
630 |
-dnl E.g. for output-var=='lib', name=='test', prefix='mine', sets |
631 |
-dnl the $lib variable to: |
632 |
-dnl 'mine_gtk2ud_test-2.8' |
633 |
-dnl if WX_PORT=gtk2, WX_UNICODE=1, WX_DEBUG=1 and WX_RELEASE=28 |
634 |
-dnl --------------------------------------------------------------------------- |
635 |
-AC_DEFUN([WX_LIKE_LIBNAME], |
636 |
- [ |
637 |
- wx_temp="$2""_""$WX_PORT" |
638 |
- |
639 |
- dnl add the [u][d] string |
640 |
- if test "$WX_UNICODE" = "1"; then |
641 |
- wx_temp="$wx_temp""u" |
642 |
- fi |
643 |
- if test "$WX_DEBUG" = "1"; then |
644 |
- wx_temp="$wx_temp""d" |
645 |
- fi |
646 |
- |
647 |
- dnl complete the name of the lib |
648 |
- wx_temp="$wx_temp""_""$3""-$WX_VERSION_MAJOR.$WX_VERSION_MINOR" |
649 |
- |
650 |
- dnl save it in the user's variable |
651 |
- $1=$wx_temp |
652 |
- ]) |
653 |
- |
654 |
-dnl --------------------------------------------------------------------------- |
655 |
-dnl WX_ARG_ENABLE_YESNOAUTO/WX_ARG_WITH_YESNOAUTO |
656 |
-dnl |
657 |
-dnl Two little custom macros which define the ENABLE/WITH configure arguments. |
658 |
-dnl Macro arguments: |
659 |
-dnl $1 = the name of the --enable / --with feature |
660 |
-dnl $2 = the name of the variable associated |
661 |
-dnl $3 = the description of that feature |
662 |
-dnl $4 = the default value for that feature |
663 |
-dnl $5 = additional action to do in case option is given with "yes" value |
664 |
-dnl --------------------------------------------------------------------------- |
665 |
-AC_DEFUN([WX_ARG_ENABLE_YESNOAUTO], |
666 |
- [AC_ARG_ENABLE($1, |
667 |
- AC_HELP_STRING([--enable-$1], [$3 (default is $4)]), |
668 |
- [], [enableval="$4"]) |
669 |
- |
670 |
- dnl Show a message to the user about this option |
671 |
- AC_MSG_CHECKING([for the --enable-$1 option]) |
672 |
- if test "$enableval" = "yes" ; then |
673 |
- AC_MSG_RESULT([yes]) |
674 |
- $2=1 |
675 |
- $5 |
676 |
- elif test "$enableval" = "no" ; then |
677 |
- AC_MSG_RESULT([no]) |
678 |
- $2=0 |
679 |
- elif test "$enableval" = "auto" ; then |
680 |
- AC_MSG_RESULT([will be automatically detected]) |
681 |
- $2="auto" |
682 |
- else |
683 |
- AC_MSG_ERROR([ |
684 |
- Unrecognized option value (allowed values: yes, no, auto) |
685 |
- ]) |
686 |
- fi |
687 |
- ]) |
688 |
- |
689 |
-AC_DEFUN([WX_ARG_WITH_YESNOAUTO], |
690 |
- [AC_ARG_WITH($1, |
691 |
- AC_HELP_STRING([--with-$1], [$3 (default is $4)]), |
692 |
- [], [withval="$4"]) |
693 |
- |
694 |
- dnl Show a message to the user about this option |
695 |
- AC_MSG_CHECKING([for the --with-$1 option]) |
696 |
- if test "$withval" = "yes" ; then |
697 |
- AC_MSG_RESULT([yes]) |
698 |
- $2=1 |
699 |
- $5 |
700 |
- dnl NB: by default we don't allow --with-$1=no option |
701 |
- dnl since it does not make much sense ! |
702 |
- elif test "$6" = "1" -a "$withval" = "no" ; then |
703 |
- AC_MSG_RESULT([no]) |
704 |
- $2=0 |
705 |
- elif test "$withval" = "auto" ; then |
706 |
- AC_MSG_RESULT([will be automatically detected]) |
707 |
- $2="auto" |
708 |
- else |
709 |
- AC_MSG_ERROR([ |
710 |
- Unrecognized option value (allowed values: yes, auto) |
711 |
- ]) |
712 |
- fi |
713 |
- ]) |
714 |
- |
715 |
- |
716 |
-dnl --------------------------------------------------------------------------- |
717 |
-dnl WX_STANDARD_OPTIONS([options-to-add]) |
718 |
-dnl |
719 |
-dnl Adds to the configure script one or more of the following options: |
720 |
-dnl --enable-[debug|unicode|shared|wxshared|wxdebug] |
721 |
-dnl --with-[gtk|msw|motif|x11|mac|dfb] |
722 |
-dnl --with-wxversion |
723 |
-dnl Then checks for their presence and eventually set the DEBUG, UNICODE, SHARED, |
724 |
-dnl PORT, WX_SHARED, WX_DEBUG, variables to one of the "yes", "no", "auto" values. |
725 |
-dnl |
726 |
-dnl Note that e.g. UNICODE != WX_UNICODE; the first is the value of the |
727 |
-dnl --enable-unicode option (in boolean format) while the second indicates |
728 |
-dnl if wxWidgets was built in Unicode mode (and still is in boolean format). |
729 |
-dnl --------------------------------------------------------------------------- |
730 |
-AC_DEFUN([WX_STANDARD_OPTIONS], |
731 |
- [ |
732 |
- |
733 |
- dnl the following lines will expand to WX_ARG_ENABLE_YESNOAUTO calls if and only if |
734 |
- dnl the $1 argument contains respectively the debug,unicode or shared options. |
735 |
- |
736 |
- dnl be careful here not to set debug flag if only "wxdebug" was specified |
737 |
- ifelse(regexp([$1], [\bdebug]), [-1],, |
738 |
- [WX_ARG_ENABLE_YESNOAUTO([debug], [DEBUG], [Build in debug mode], [auto])]) |
739 |
- |
740 |
- ifelse(index([$1], [unicode]), [-1],, |
741 |
- [WX_ARG_ENABLE_YESNOAUTO([unicode], [UNICODE], [Build in Unicode mode], [auto])]) |
742 |
- |
743 |
- ifelse(regexp([$1], [\bshared]), [-1],, |
744 |
- [WX_ARG_ENABLE_YESNOAUTO([shared], [SHARED], [Build as shared library], [auto])]) |
745 |
- |
746 |
- dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-toolkit since it's an option |
747 |
- dnl which must be able to accept the auto|gtk1|gtk2|msw|... values |
748 |
- ifelse(index([$1], [toolkit]), [-1],, |
749 |
- [ |
750 |
- AC_ARG_WITH([toolkit], |
751 |
- AC_HELP_STRING([--with-toolkit], |
752 |
- [Build against a specific wxWidgets toolkit (default is auto)]), |
753 |
- [], [withval="auto"]) |
754 |
- |
755 |
- dnl Show a message to the user about this option |
756 |
- AC_MSG_CHECKING([for the --with-toolkit option]) |
757 |
- if test "$withval" = "auto" ; then |
758 |
- AC_MSG_RESULT([will be automatically detected]) |
759 |
- TOOLKIT="auto" |
760 |
- else |
761 |
- TOOLKIT="$withval" |
762 |
- |
763 |
- dnl PORT must be one of the allowed values |
764 |
- if test "$TOOLKIT" != "gtk1" -a "$TOOLKIT" != "gtk2" -a \ |
765 |
- "$TOOLKIT" != "msw" -a "$TOOLKIT" != "motif" -a \ |
766 |
- "$TOOLKIT" != "osx_carbon" -a "$TOOLKIT" != "osx_cocoa" -a \ |
767 |
- "$TOOLKIT" != "dfb" -a "$TOOLKIT" != "x11"; then |
768 |
- AC_MSG_ERROR([ |
769 |
- Unrecognized option value (allowed values: auto, gtk1, gtk2, msw, motif, osx_carbon, osx_cocoa, dfb, x11) |
770 |
- ]) |
771 |
- fi |
772 |
- |
773 |
- AC_MSG_RESULT([$TOOLKIT]) |
774 |
- fi |
775 |
- ]) |
776 |
- |
777 |
- dnl ****** IMPORTANT ******* |
778 |
- dnl Unlike for the UNICODE setting, you can build your program in |
779 |
- dnl shared mode against a static build of wxWidgets. Thus we have the |
780 |
- dnl following option which allows these mixtures. E.g. |
781 |
- dnl |
782 |
- dnl ./configure --disable-shared --with-wxshared |
783 |
- dnl |
784 |
- dnl will build your library in static mode against the first available |
785 |
- dnl shared build of wxWidgets. |
786 |
- dnl |
787 |
- dnl Note that's not possible to do the viceversa: |
788 |
- dnl |
789 |
- dnl ./configure --enable-shared --without-wxshared |
790 |
- dnl |
791 |
- dnl Doing so you would try to build your library in shared mode against a static |
792 |
- dnl build of wxWidgets. This is not possible (you would mix PIC and non PIC code) ! |
793 |
- dnl A check for this combination of options is in WX_DETECT_STANDARD_OPTION_VALUES |
794 |
- dnl (where we know what 'auto' should be expanded to). |
795 |
- dnl |
796 |
- dnl If you try to build something in ANSI mode against a UNICODE build |
797 |
- dnl of wxWidgets or in RELEASE mode against a DEBUG build of wxWidgets, |
798 |
- dnl then at best you'll get ton of linking errors ! |
799 |
- dnl ************************ |
800 |
- |
801 |
- ifelse(index([$1], [wxshared]), [-1],, |
802 |
- [ |
803 |
- WX_ARG_WITH_YESNOAUTO( |
804 |
- [wxshared], [WX_SHARED], |
805 |
- [Force building against a shared build of wxWidgets, even if --disable-shared is given], |
806 |
- [auto], [], [1]) |
807 |
- ]) |
808 |
- |
809 |
- dnl Just like for SHARED and WX_SHARED it may happen that some adventurous |
810 |
- dnl peoples will want to mix a wxWidgets release build with a debug build of |
811 |
- dnl his app/lib. So, we have both DEBUG and WX_DEBUG variables. |
812 |
- ifelse(index([$1], [wxdebug]), [-1],, |
813 |
- [ |
814 |
- WX_ARG_WITH_YESNOAUTO( |
815 |
- [wxdebug], [WX_DEBUG], |
816 |
- [Force building against a debug build of wxWidgets, even if --disable-debug is given], |
817 |
- [auto], [], [1]) |
818 |
- ]) |
819 |
- |
820 |
- dnl WX_ARG_WITH_YESNOAUTO cannot be used for --with-wxversion since it's an option |
821 |
- dnl which accepts the "auto|2.6|2.7|2.8|2.9|3.0" etc etc values |
822 |
- ifelse(index([$1], [wxversion]), [-1],, |
823 |
- [ |
824 |
- AC_ARG_WITH([wxversion], |
825 |
- AC_HELP_STRING([--with-wxversion], |
826 |
- [Build against a specific version of wxWidgets (default is auto)]), |
827 |
- [], [withval="auto"]) |
828 |
- |
829 |
- dnl Show a message to the user about this option |
830 |
- AC_MSG_CHECKING([for the --with-wxversion option]) |
831 |
- if test "$withval" = "auto" ; then |
832 |
- AC_MSG_RESULT([will be automatically detected]) |
833 |
- WX_RELEASE="auto" |
834 |
- else |
835 |
- |
836 |
- wx_requested_major_version=`echo $withval | \ |
837 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\1/'` |
838 |
- wx_requested_minor_version=`echo $withval | \ |
839 |
- sed 's/\([[0-9]]*\).\([[0-9]]*\).*/\2/'` |
840 |
- |
841 |
- dnl both vars above must be exactly 1 digit |
842 |
- if test "${#wx_requested_major_version}" != "1" -o \ |
843 |
- "${#wx_requested_minor_version}" != "1" ; then |
844 |
- AC_MSG_ERROR([ |
845 |
- Unrecognized option value (allowed values: auto, 2.6, 2.7, 2.8, 2.9, 3.0) |
846 |
- ]) |
847 |
- fi |
848 |
- |
849 |
- WX_RELEASE="$wx_requested_major_version"".""$wx_requested_minor_version" |
850 |
- AC_MSG_RESULT([$WX_RELEASE]) |
851 |
- fi |
852 |
- ]) |
853 |
- |
854 |
- if test "$WX_DEBUG_CONFIGURE" = "1"; then |
855 |
- echo "[[dbg]] DEBUG: $DEBUG, WX_DEBUG: $WX_DEBUG" |
856 |
- echo "[[dbg]] UNICODE: $UNICODE, WX_UNICODE: $WX_UNICODE" |
857 |
- echo "[[dbg]] SHARED: $SHARED, WX_SHARED: $WX_SHARED" |
858 |
- echo "[[dbg]] TOOLKIT: $TOOLKIT, WX_TOOLKIT: $WX_TOOLKIT" |
859 |
- echo "[[dbg]] VERSION: $VERSION, WX_RELEASE: $WX_RELEASE" |
860 |
- fi |
861 |
- ]) |
862 |
- |
863 |
- |
864 |
-dnl --------------------------------------------------------------------------- |
865 |
-dnl WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS |
866 |
-dnl |
867 |
-dnl Sets the WXCONFIG_FLAGS string using the SHARED,DEBUG,UNICODE variable values |
868 |
-dnl which are different from "auto". |
869 |
-dnl Thus this macro needs to be called only once all options have been set. |
870 |
-dnl --------------------------------------------------------------------------- |
871 |
-AC_DEFUN([WX_CONVERT_STANDARD_OPTIONS_TO_WXCONFIG_FLAGS], |
872 |
- [ |
873 |
- if test "$WX_SHARED" = "1" ; then |
874 |
- WXCONFIG_FLAGS="--static=no " |
875 |
- elif test "$WX_SHARED" = "0" ; then |
876 |
- WXCONFIG_FLAGS="--static=yes " |
877 |
- fi |
878 |
- |
879 |
- if test "$WX_DEBUG" = "1" ; then |
880 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=yes " |
881 |
- elif test "$WX_DEBUG" = "0" ; then |
882 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--debug=no " |
883 |
- fi |
884 |
- |
885 |
- dnl The user should have set WX_UNICODE=UNICODE |
886 |
- if test "$WX_UNICODE" = "1" ; then |
887 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=yes " |
888 |
- elif test "$WX_UNICODE" = "0" ; then |
889 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--unicode=no " |
890 |
- fi |
891 |
- |
892 |
- if test "$TOOLKIT" != "auto" ; then |
893 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--toolkit=$TOOLKIT " |
894 |
- fi |
895 |
- |
896 |
- if test "$WX_RELEASE" != "auto" ; then |
897 |
- WXCONFIG_FLAGS="$WXCONFIG_FLAGS""--version=$WX_RELEASE " |
898 |
- fi |
899 |
- |
900 |
- dnl strip out the last space of the string |
901 |
- WXCONFIG_FLAGS=${WXCONFIG_FLAGS% } |
902 |
- |
903 |
- if test "$WX_DEBUG_CONFIGURE" = "1"; then |
904 |
- echo "[[dbg]] WXCONFIG_FLAGS: $WXCONFIG_FLAGS" |
905 |
- fi |
906 |
- ]) |
907 |
- |
908 |
- |
909 |
-dnl --------------------------------------------------------------------------- |
910 |
-dnl _WX_SELECTEDCONFIG_CHECKFOR([RESULTVAR], [STRING], [MSG] |
911 |
-dnl [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) |
912 |
-dnl |
913 |
-dnl Outputs the given MSG. Then searches the given STRING in the wxWidgets |
914 |
-dnl additional CPP flags and put the result of the search in WX_$RESULTVAR |
915 |
-dnl also adding the "yes" or "no" message result to MSG. |
916 |
-dnl --------------------------------------------------------------------------- |
917 |
-AC_DEFUN([_WX_SELECTEDCONFIG_CHECKFOR], |
918 |
- [ |
919 |
- if test "$$1" = "auto" ; then |
920 |
- |
921 |
- dnl The user does not have particular preferences for this option; |
922 |
- dnl so we will detect the wxWidgets relative build setting and use it |
923 |
- AC_MSG_CHECKING([$3]) |
924 |
- |
925 |
- dnl set WX_$1 variable to 1 if the $WX_SELECTEDCONFIG contains the $2 |
926 |
- dnl string or to 0 otherwise. |
927 |
- dnl NOTE: 'expr match STRING REGEXP' cannot be used since on Mac it |
928 |
- dnl doesn't work; we use 'expr STRING : REGEXP' instead |
929 |
- WX_$1=$(expr "$WX_SELECTEDCONFIG" : ".*$2.*") |
930 |
- |
931 |
- if test "$WX_$1" != "0"; then |
932 |
- WX_$1=1 |
933 |
- AC_MSG_RESULT([yes]) |
934 |
- ifelse([$4], , :, [$4]) |
935 |
- else |
936 |
- WX_$1=0 |
937 |
- AC_MSG_RESULT([no]) |
938 |
- ifelse([$5], , :, [$5]) |
939 |
- fi |
940 |
- else |
941 |
- |
942 |
- dnl Use the setting given by the user |
943 |
- WX_$1=$$1 |
944 |
- fi |
945 |
- ]) |
946 |
- |
947 |
-dnl --------------------------------------------------------------------------- |
948 |
-dnl WX_DETECT_STANDARD_OPTION_VALUES |
949 |
-dnl |
950 |
-dnl Detects the values of the following variables: |
951 |
-dnl 1) WX_RELEASE |
952 |
-dnl 2) WX_UNICODE |
953 |
-dnl 3) WX_DEBUG |
954 |
-dnl 4) WX_SHARED (and also WX_STATIC) |
955 |
-dnl 5) WX_PORT |
956 |
-dnl from the previously selected wxWidgets build; this macro in fact must be |
957 |
-dnl called *after* calling the WX_CONFIG_CHECK macro. |
958 |
-dnl |
959 |
-dnl Note that the WX_VERSION_MAJOR, WX_VERSION_MINOR symbols are already set |
960 |
-dnl by WX_CONFIG_CHECK macro |
961 |
-dnl --------------------------------------------------------------------------- |
962 |
-AC_DEFUN([WX_DETECT_STANDARD_OPTION_VALUES], |
963 |
- [ |
964 |
- dnl IMPORTANT: WX_VERSION contains all three major.minor.micro digits, |
965 |
- dnl while WX_RELEASE only the major.minor ones. |
966 |
- WX_RELEASE="$WX_VERSION_MAJOR""$WX_VERSION_MINOR" |
967 |
- if test $WX_RELEASE -lt 26 ; then |
968 |
- |
969 |
- AC_MSG_ERROR([ |
970 |
- Cannot detect the wxWidgets configuration for the selected wxWidgets build |
971 |
- since its version is $WX_VERSION < 2.6.0; please install a newer |
972 |
- version of wxWidgets. |
973 |
- ]) |
974 |
- fi |
975 |
- |
976 |
- dnl The wx-config we are using understands the "--selected_config" |
977 |
- dnl option which returns an easy-parseable string ! |
978 |
- WX_SELECTEDCONFIG=$($WX_CONFIG_WITH_ARGS --selected_config) |
979 |
- |
980 |
- if test "$WX_DEBUG_CONFIGURE" = "1"; then |
981 |
- echo "[[dbg]] Using wx-config --selected-config" |
982 |
- echo "[[dbg]] WX_SELECTEDCONFIG: $WX_SELECTEDCONFIG" |
983 |
- fi |
984 |
- |
985 |
- |
986 |
- dnl we could test directly for WX_SHARED with a line like: |
987 |
- dnl _WX_SELECTEDCONFIG_CHECKFOR([SHARED], [shared], |
988 |
- dnl [if wxWidgets was built in SHARED mode]) |
989 |
- dnl but wx-config --selected-config DOES NOT outputs the 'shared' |
990 |
- dnl word when wx was built in shared mode; it rather outputs the |
991 |
- dnl 'static' word when built in static mode. |
992 |
- if test $WX_SHARED = "1"; then |
993 |
- STATIC=0 |
994 |
- elif test $WX_SHARED = "0"; then |
995 |
- STATIC=1 |
996 |
- elif test $WX_SHARED = "auto"; then |
997 |
- STATIC="auto" |
998 |
- fi |
999 |
- |
1000 |
- dnl Now set the WX_UNICODE, WX_DEBUG, WX_STATIC variables |
1001 |
- _WX_SELECTEDCONFIG_CHECKFOR([UNICODE], [unicode], |
1002 |
- [if wxWidgets was built with UNICODE enabled]) |
1003 |
- _WX_SELECTEDCONFIG_CHECKFOR([DEBUG], [debug], |
1004 |
- [if wxWidgets was built in DEBUG mode]) |
1005 |
- _WX_SELECTEDCONFIG_CHECKFOR([STATIC], [static], |
1006 |
- [if wxWidgets was built in STATIC mode]) |
1007 |
- |
1008 |
- dnl init WX_SHARED from WX_STATIC |
1009 |
- if test "$WX_STATIC" != "0"; then |
1010 |
- WX_SHARED=0 |
1011 |
- else |
1012 |
- WX_SHARED=1 |
1013 |
- fi |
1014 |
- |
1015 |
- AC_SUBST(WX_UNICODE) |
1016 |
- AC_SUBST(WX_DEBUG) |
1017 |
- AC_SUBST(WX_SHARED) |
1018 |
- |
1019 |
- dnl detect the WX_PORT to use |
1020 |
- if test "$TOOLKIT" = "auto" ; then |
1021 |
- |
1022 |
- dnl The user does not have particular preferences for this option; |
1023 |
- dnl so we will detect the wxWidgets relative build setting and use it |
1024 |
- AC_MSG_CHECKING([which wxWidgets toolkit was selected]) |
1025 |
- |
1026 |
- WX_GTKPORT1=$(expr "$WX_SELECTEDCONFIG" : ".*gtk1.*") |
1027 |
- WX_GTKPORT2=$(expr "$WX_SELECTEDCONFIG" : ".*gtk2.*") |
1028 |
- WX_MSWPORT=$(expr "$WX_SELECTEDCONFIG" : ".*msw.*") |
1029 |
- WX_MOTIFPORT=$(expr "$WX_SELECTEDCONFIG" : ".*motif.*") |
1030 |
- WX_OSXCOCOAPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_cocoa.*") |
1031 |
- WX_OSXCARBONPORT=$(expr "$WX_SELECTEDCONFIG" : ".*osx_carbon.*") |
1032 |
- WX_X11PORT=$(expr "$WX_SELECTEDCONFIG" : ".*x11.*") |
1033 |
- WX_DFBPORT=$(expr "$WX_SELECTEDCONFIG" : ".*dfb.*") |
1034 |
- |
1035 |
- WX_PORT="unknown" |
1036 |
- if test "$WX_GTKPORT1" != "0"; then WX_PORT="gtk1"; fi |
1037 |
- if test "$WX_GTKPORT2" != "0"; then WX_PORT="gtk2"; fi |
1038 |
- if test "$WX_MSWPORT" != "0"; then WX_PORT="msw"; fi |
1039 |
- if test "$WX_MOTIFPORT" != "0"; then WX_PORT="motif"; fi |
1040 |
- if test "$WX_OSXCOCOAPORT" != "0"; then WX_PORT="osx_cocoa"; fi |
1041 |
- if test "$WX_OSXCARBONPORT" != "0"; then WX_PORT="osx_carbon"; fi |
1042 |
- if test "$WX_X11PORT" != "0"; then WX_PORT="x11"; fi |
1043 |
- if test "$WX_DFBPORT" != "0"; then WX_PORT="dfb"; fi |
1044 |
- |
1045 |
- dnl NOTE: backward-compatible check for wx2.8; in wx2.9 the mac |
1046 |
- dnl ports are called 'osx_cocoa' and 'osx_carbon' (see above) |
1047 |
- WX_MACPORT=$(expr "$WX_SELECTEDCONFIG" : ".*mac.*") |
1048 |
- if test "$WX_MACPORT" != "0"; then WX_PORT="mac"; fi |
1049 |
- |
1050 |
- dnl check at least one of the WX_*PORT has been set ! |
1051 |
- |
1052 |
- if test "$WX_PORT" = "unknown" ; then |
1053 |
- AC_MSG_ERROR([ |
1054 |
- Cannot detect the currently installed wxWidgets port ! |
1055 |
- Please check your 'wx-config --cxxflags'... |
1056 |
- ]) |
1057 |
- fi |
1058 |
- |
1059 |
- AC_MSG_RESULT([$WX_PORT]) |
1060 |
- else |
1061 |
- |
1062 |
- dnl Use the setting given by the user |
1063 |
- if test -z "$TOOLKIT" ; then |
1064 |
- WX_PORT=$TOOLKIT |
1065 |
- else |
1066 |
- dnl try with PORT |
1067 |
- WX_PORT=$PORT |
1068 |
- fi |
1069 |
- fi |
1070 |
- |
1071 |
- AC_SUBST(WX_PORT) |
1072 |
- |
1073 |
- if test "$WX_DEBUG_CONFIGURE" = "1"; then |
1074 |
- echo "[[dbg]] Values of all WX_* options after final detection:" |
1075 |
- echo "[[dbg]] WX_DEBUG: $WX_DEBUG" |
1076 |
- echo "[[dbg]] WX_UNICODE: $WX_UNICODE" |
1077 |
- echo "[[dbg]] WX_SHARED: $WX_SHARED" |
1078 |
- echo "[[dbg]] WX_RELEASE: $WX_RELEASE" |
1079 |
- echo "[[dbg]] WX_PORT: $WX_PORT" |
1080 |
- fi |
1081 |
- |
1082 |
- dnl Avoid problem described in the WX_STANDARD_OPTIONS which happens when |
1083 |
- dnl the user gives the options: |
1084 |
- dnl ./configure --enable-shared --without-wxshared |
1085 |
- dnl or just do |
1086 |
- dnl ./configure --enable-shared |
1087 |
- dnl but there is only a static build of wxWidgets available. |
1088 |
- if test "$WX_SHARED" = "0" -a "$SHARED" = "1"; then |
1089 |
- AC_MSG_ERROR([ |
1090 |
- Cannot build shared library against a static build of wxWidgets ! |
1091 |
- This error happens because the wxWidgets build which was selected |
1092 |
- has been detected as static while you asked to build $PACKAGE_NAME |
1093 |
- as shared library and this is not possible. |
1094 |
- Use the '--disable-shared' option to build $PACKAGE_NAME |
1095 |
- as static library or '--with-wxshared' to use wxWidgets as shared library. |
1096 |
- ]) |
1097 |
- fi |
1098 |
- |
1099 |
- dnl now we can finally update the DEBUG,UNICODE,SHARED options |
1100 |
- dnl to their final values if they were set to 'auto' |
1101 |
- if test "$DEBUG" = "auto"; then |
1102 |
- DEBUG=$WX_DEBUG |
1103 |
- fi |
1104 |
- if test "$UNICODE" = "auto"; then |
1105 |
- UNICODE=$WX_UNICODE |
1106 |
- fi |
1107 |
- if test "$SHARED" = "auto"; then |
1108 |
- SHARED=$WX_SHARED |
1109 |
- fi |
1110 |
- if test "$TOOLKIT" = "auto"; then |
1111 |
- TOOLKIT=$WX_PORT |
1112 |
- fi |
1113 |
- |
1114 |
- dnl in case the user needs a BUILD=debug/release var... |
1115 |
- if test "$DEBUG" = "1"; then |
1116 |
- BUILD="debug" |
1117 |
- elif test "$DEBUG" = "0" -o "$DEBUG" = ""; then |
1118 |
- BUILD="release" |
1119 |
- fi |
1120 |
- |
1121 |
- dnl respect the DEBUG variable adding the optimize/debug flags |
1122 |
- dnl NOTE: the CXXFLAGS are merged together with the CPPFLAGS so we |
1123 |
- dnl don't need to set them, too |
1124 |
- if test "$DEBUG" = "1"; then |
1125 |
- CXXFLAGS="$CXXFLAGS -g -O0" |
1126 |
- CFLAGS="$CFLAGS -g -O0" |
1127 |
- else |
1128 |
- CXXFLAGS="$CXXFLAGS -O2" |
1129 |
- CFLAGS="$CFLAGS -O2" |
1130 |
- fi |
1131 |
- ]) |
1132 |
- |
1133 |
-dnl --------------------------------------------------------------------------- |
1134 |
-dnl WX_BOOLOPT_SUMMARY([name of the boolean variable to show summary for], |
1135 |
-dnl [what to print when var is 1], |
1136 |
-dnl [what to print when var is 0]) |
1137 |
-dnl |
1138 |
-dnl Prints $2 when variable $1 == 1 and prints $3 when variable $1 == 0. |
1139 |
-dnl This macro mainly exists just to make configure.ac scripts more readable. |
1140 |
-dnl |
1141 |
-dnl NOTE: you need to use the [" my message"] syntax for 2nd and 3rd arguments |
1142 |
-dnl if you want that m4 avoid to throw away the spaces prefixed to the |
1143 |
-dnl argument value. |
1144 |
-dnl --------------------------------------------------------------------------- |
1145 |
-AC_DEFUN([WX_BOOLOPT_SUMMARY], |
1146 |
- [ |
1147 |
- if test "x$$1" = "x1" ; then |
1148 |
- echo $2 |
1149 |
- elif test "x$$1" = "x0" ; then |
1150 |
- echo $3 |
1151 |
- else |
1152 |
- echo "$1 is $$1" |
1153 |
- fi |
1154 |
- ]) |
1155 |
- |
1156 |
-dnl --------------------------------------------------------------------------- |
1157 |
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG |
1158 |
-dnl |
1159 |
-dnl Shows a summary message to the user about the WX_* variable contents. |
1160 |
-dnl This macro is used typically at the end of the configure script. |
1161 |
-dnl --------------------------------------------------------------------------- |
1162 |
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG], |
1163 |
- [ |
1164 |
- echo |
1165 |
- echo " The wxWidgets build which will be used by $PACKAGE_NAME $PACKAGE_VERSION" |
1166 |
- echo " has the following settings:" |
1167 |
- WX_BOOLOPT_SUMMARY([WX_DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
1168 |
- WX_BOOLOPT_SUMMARY([WX_UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
1169 |
- WX_BOOLOPT_SUMMARY([WX_SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
1170 |
- echo " - VERSION: $WX_VERSION" |
1171 |
- echo " - PORT: $WX_PORT" |
1172 |
- ]) |
1173 |
- |
1174 |
- |
1175 |
-dnl --------------------------------------------------------------------------- |
1176 |
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN, WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
1177 |
-dnl |
1178 |
-dnl Like WX_STANDARD_OPTIONS_SUMMARY_MSG macro but these two macros also gives info |
1179 |
-dnl about the configuration of the package which used the wxpresets. |
1180 |
-dnl |
1181 |
-dnl Typical usage: |
1182 |
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN |
1183 |
-dnl echo " - Package setting 1: $SETTING1" |
1184 |
-dnl echo " - Package setting 2: $SETTING1" |
1185 |
-dnl ... |
1186 |
-dnl WX_STANDARD_OPTIONS_SUMMARY_MSG_END |
1187 |
-dnl |
1188 |
-dnl --------------------------------------------------------------------------- |
1189 |
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_BEGIN], |
1190 |
- [ |
1191 |
- echo |
1192 |
- echo " ----------------------------------------------------------------" |
1193 |
- echo " Configuration for $PACKAGE_NAME $PACKAGE_VERSION successfully completed." |
1194 |
- echo " Summary of main configuration settings for $PACKAGE_NAME:" |
1195 |
- WX_BOOLOPT_SUMMARY([DEBUG], [" - DEBUG build"], [" - RELEASE build"]) |
1196 |
- WX_BOOLOPT_SUMMARY([UNICODE], [" - UNICODE mode"], [" - ANSI mode"]) |
1197 |
- WX_BOOLOPT_SUMMARY([SHARED], [" - SHARED mode"], [" - STATIC mode"]) |
1198 |
- ]) |
1199 |
- |
1200 |
-AC_DEFUN([WX_STANDARD_OPTIONS_SUMMARY_MSG_END], |
1201 |
- [ |
1202 |
- WX_STANDARD_OPTIONS_SUMMARY_MSG |
1203 |
- echo |
1204 |
- echo " Now, just run make." |
1205 |
- echo " ----------------------------------------------------------------" |
1206 |
- echo |
1207 |
- ]) |
1208 |
- |
1209 |
- |
1210 |
-dnl --------------------------------------------------------------------------- |
1211 |
-dnl Deprecated macro wrappers |
1212 |
-dnl --------------------------------------------------------------------------- |
1213 |
- |
1214 |
-AC_DEFUN([AM_OPTIONS_WXCONFIG], [WX_CONFIG_OPTIONS]) |
1215 |
-AC_DEFUN([AM_PATH_WXCONFIG], [ |
1216 |
- WX_CONFIG_CHECK([$1],[$2],[$3],[$4],[$5]) |
1217 |
-]) |
1218 |
-AC_DEFUN([AM_PATH_WXRC], [WXRC_CHECK([$1],[$2])]) |