diff options
author | Ryan Hill <rhill@gentoo.org> | 2007-12-20 00:11:50 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2007-12-20 00:11:50 +0000 |
commit | 88b45b9251f9cf25def1dc25095543d7d5f53fa9 (patch) | |
tree | 8a21cd289549630a653a40d87d8840fccc600829 /app-admin | |
parent | Stable on x86 wrt #202087 (diff) | |
download | historical-88b45b9251f9cf25def1dc25095543d7d5f53fa9.tar.gz historical-88b45b9251f9cf25def1dc25095543d7d5f53fa9.tar.bz2 historical-88b45b9251f9cf25def1dc25095543d7d5f53fa9.zip |
Version bump. Move wxwin.m4 handling from wxGTK to here. Die if wrapper
called from portage (currently disabled for testing).
Package-Manager: portage-2.1.4_rc10
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/eselect-wxwidgets/ChangeLog | 11 | ||||
-rw-r--r-- | app-admin/eselect-wxwidgets/Manifest | 56 | ||||
-rw-r--r-- | app-admin/eselect-wxwidgets/eselect-wxwidgets-0.7.ebuild (renamed from app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild) | 7 | ||||
-rw-r--r-- | app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.7 (renamed from app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6) | 0 | ||||
-rwxr-xr-x | app-admin/eselect-wxwidgets/files/wx-config-0.7 (renamed from app-admin/eselect-wxwidgets/files/wx-config-0.6) | 16 | ||||
-rwxr-xr-x | app-admin/eselect-wxwidgets/files/wxrc-0.7 (renamed from app-admin/eselect-wxwidgets/files/wxrc-0.6) | 18 | ||||
-rw-r--r-- | app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.7 (renamed from app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6) | 2 | ||||
-rw-r--r-- | app-admin/eselect-wxwidgets/files/wxwin.m4 | 366 |
8 files changed, 445 insertions, 31 deletions
diff --git a/app-admin/eselect-wxwidgets/ChangeLog b/app-admin/eselect-wxwidgets/ChangeLog index 027c300e9d76..19ff2c05c940 100644 --- a/app-admin/eselect-wxwidgets/ChangeLog +++ b/app-admin/eselect-wxwidgets/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for app-admin/eselect-wxwidgets # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.11 2007/12/13 02:15:27 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/ChangeLog,v 1.12 2007/12/20 00:11:49 dirtyepic Exp $ + +*eselect-wxwidgets-0.7 (20 Dec 2007) + + 20 Dec 2007; Ryan Hill <dirtyepic@gentoo.org> -files/wx-config-0.6, + -files/wxrc-0.6, -files/wxwidgets.eselect-0.6, +files/wx-config-0.7, + +files/wxrc-0.7, +files/wxwidgets.eselect-0.7, +files/wxwin.m4, + -eselect-wxwidgets-0.6.ebuild, +eselect-wxwidgets-0.7.ebuild: + Version bump. Move wxwin.m4 handling from wxGTK to here. Die if wrapper + called from portage (currently disabled for testing). *eselect-wxwidgets-0.6 (13 Dec 2007) diff --git a/app-admin/eselect-wxwidgets/Manifest b/app-admin/eselect-wxwidgets/Manifest index fe3572aaef29..9d218da0371b 100644 --- a/app-admin/eselect-wxwidgets/Manifest +++ b/app-admin/eselect-wxwidgets/Manifest @@ -1,37 +1,41 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 -AUX wx-config-0.6 832 RMD160 a555b4fa4c11176072d584c681490254f909e2ca SHA1 1ed673e49a0225d5968e8e09b6e6fc12774dfd8b SHA256 06013dd63e92adca75ff3742197dcd1191f6cabd417941d79b363e71b545a180 -MD5 9c35b5be486ffaac37b4d42063a0d88b files/wx-config-0.6 832 -RMD160 a555b4fa4c11176072d584c681490254f909e2ca files/wx-config-0.6 832 -SHA256 06013dd63e92adca75ff3742197dcd1191f6cabd417941d79b363e71b545a180 files/wx-config-0.6 832 -AUX wxrc-0.6 890 RMD160 1c8768f1ccd2db9564a6b64edbd96f148ede060c SHA1 0fd4ec3100ce60ca7b832750e8b89f051266ca86 SHA256 7ab7aaba1f1d50019c54013ced24b6b7ebaefa3f9d0a0c7a25b90d2d1151bffc -MD5 7be45f7bab25ad0675e9e7ed4752e6a6 files/wxrc-0.6 890 -RMD160 1c8768f1ccd2db9564a6b64edbd96f148ede060c files/wxrc-0.6 890 -SHA256 7ab7aaba1f1d50019c54013ced24b6b7ebaefa3f9d0a0c7a25b90d2d1151bffc files/wxrc-0.6 890 -AUX wxwidgets.eselect-0.6 5005 RMD160 3877d058f6b52bfe58a4c4dd4cf3141e7c4ed3ff SHA1 44f405d9de22bc0d903a4b88e97eaa022716050b SHA256 93a9eb3fd174c51f34016aa8544aaf4e5e6e822838412a764f40343bf9531828 -MD5 efda053bcccdb4eb05808c5fbde2e562 files/wxwidgets.eselect-0.6 5005 -RMD160 3877d058f6b52bfe58a4c4dd4cf3141e7c4ed3ff files/wxwidgets.eselect-0.6 5005 -SHA256 93a9eb3fd174c51f34016aa8544aaf4e5e6e822838412a764f40343bf9531828 files/wxwidgets.eselect-0.6 5005 -EBUILD eselect-wxwidgets-0.6.ebuild 1282 RMD160 5c6c800b7690095b50a4d83f89d176472d2b510b SHA1 f9d0f4075b6ac346e99d90d4f9441b588da39243 SHA256 67bf2e78ec3b4b0a52f0667a65e9ab3628c09401442a92d07be34ef6ce947bd1 -MD5 9f6e3a1a297082a0a5c1804a1c53f0dc eselect-wxwidgets-0.6.ebuild 1282 -RMD160 5c6c800b7690095b50a4d83f89d176472d2b510b eselect-wxwidgets-0.6.ebuild 1282 -SHA256 67bf2e78ec3b4b0a52f0667a65e9ab3628c09401442a92d07be34ef6ce947bd1 eselect-wxwidgets-0.6.ebuild 1282 -MISC ChangeLog 1981 RMD160 a2554fa0273c7793b08b7692f332e11e3d350834 SHA1 8adbbf5b45d59dfefceb9c9bda4e96ddb4c84939 SHA256 d076df643a4c7ab0aecbc06f3a203ecb360d7133921c535225593dadd2f4aab4 -MD5 e8932e37a598b4e97d143a0bf5c52f51 ChangeLog 1981 -RMD160 a2554fa0273c7793b08b7692f332e11e3d350834 ChangeLog 1981 -SHA256 d076df643a4c7ab0aecbc06f3a203ecb360d7133921c535225593dadd2f4aab4 ChangeLog 1981 +AUX wx-config-0.7 1167 RMD160 4ffb4108cd4ef54f49b1f84407f940185f1a5301 SHA1 bc212c04b4a43ea652709a6b0e783b67e261b885 SHA256 28ba8e42113e45d3f1f1d9d65e23d03a2d3c8e11ff0d0e71f8bda9b790b352cc +MD5 8ab08a59e96c032be85c6e190f6c58d6 files/wx-config-0.7 1167 +RMD160 4ffb4108cd4ef54f49b1f84407f940185f1a5301 files/wx-config-0.7 1167 +SHA256 28ba8e42113e45d3f1f1d9d65e23d03a2d3c8e11ff0d0e71f8bda9b790b352cc files/wx-config-0.7 1167 +AUX wxrc-0.7 1208 RMD160 86934f8436cc2989df3009856303c1d6219d3f59 SHA1 0d245546213a6e5c4973a78c3501b2292000815d SHA256 1e98c0ef1fef166d215adda583ddfc18fb9da295a37e7a6fcb066528a17efccc +MD5 e2bdbad7335ffa32377007e488e8f529 files/wxrc-0.7 1208 +RMD160 86934f8436cc2989df3009856303c1d6219d3f59 files/wxrc-0.7 1208 +SHA256 1e98c0ef1fef166d215adda583ddfc18fb9da295a37e7a6fcb066528a17efccc files/wxrc-0.7 1208 +AUX wxwidgets.eselect-0.7 5005 RMD160 653f133a42f7733e4dc6bb113126e72530f0ad23 SHA1 807097283dd702c564c2a0b1647bf2b4ee050026 SHA256 9131a7a7716fd677369d42823cf6e03a4dea29416daeb83748f674360e694a3e +MD5 e7e691b4e746a262426bdf6602086dac files/wxwidgets.eselect-0.7 5005 +RMD160 653f133a42f7733e4dc6bb113126e72530f0ad23 files/wxwidgets.eselect-0.7 5005 +SHA256 9131a7a7716fd677369d42823cf6e03a4dea29416daeb83748f674360e694a3e files/wxwidgets.eselect-0.7 5005 +AUX wxwin.m4 12433 RMD160 d8001d1e974bdecf44cb24427f22b64984d77535 SHA1 b252940ab25967ab711bc42d0a86df16452f605a SHA256 f143b92ea6e37d9c63417134b1487625799d94fe3095bb0d2d6448e54117afc0 +MD5 2ca4f85bd825e85c136b2efb69861c76 files/wxwin.m4 12433 +RMD160 d8001d1e974bdecf44cb24427f22b64984d77535 files/wxwin.m4 12433 +SHA256 f143b92ea6e37d9c63417134b1487625799d94fe3095bb0d2d6448e54117afc0 files/wxwin.m4 12433 +EBUILD eselect-wxwidgets-0.7.ebuild 1341 RMD160 0b3e9a8bf48702b05c056928f538d8950d2bdc89 SHA1 fe68015cfb27dac99c48363dc7c809d5500478e2 SHA256 a840ceb5e1b50174ba46d9d2d09df746ec18f4dc78983b19cdf0975dec66314a +MD5 20342e47d2128ce8f76bf5eaa94f7098 eselect-wxwidgets-0.7.ebuild 1341 +RMD160 0b3e9a8bf48702b05c056928f538d8950d2bdc89 eselect-wxwidgets-0.7.ebuild 1341 +SHA256 a840ceb5e1b50174ba46d9d2d09df746ec18f4dc78983b19cdf0975dec66314a eselect-wxwidgets-0.7.ebuild 1341 +MISC ChangeLog 2421 RMD160 634b3ee632bc5a5c03f47d4cd11a5a748acb5822 SHA1 396ce3cc46be45c9e35cf76591fe3e3030c3a002 SHA256 1c582338fd88f53bc023debcaa17572bf6949dcad5d9e8f48006ca7a1fc119d5 +MD5 8c8525332f41fef7a07fa731ac974783 ChangeLog 2421 +RMD160 634b3ee632bc5a5c03f47d4cd11a5a748acb5822 ChangeLog 2421 +SHA256 1c582338fd88f53bc023debcaa17572bf6949dcad5d9e8f48006ca7a1fc119d5 ChangeLog 2421 MISC metadata.xml 163 RMD160 f00b10701f46ce312c4e3056575ecdc7214b29b6 SHA1 8ca95681a55a91e5ed44e59ba5660d00bc9b5e0c SHA256 98e13cbe1b574224e90ac29486bdd82dfe1863029528af041f0a963cb01e8c74 MD5 34a3c9a403196f569f63f0f608007f6e metadata.xml 163 RMD160 f00b10701f46ce312c4e3056575ecdc7214b29b6 metadata.xml 163 SHA256 98e13cbe1b574224e90ac29486bdd82dfe1863029528af041f0a963cb01e8c74 metadata.xml 163 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-wxwidgets-0.6 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-wxwidgets-0.6 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-wxwidgets-0.6 0 +MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-eselect-wxwidgets-0.7 0 +RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-eselect-wxwidgets-0.7 0 +SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-eselect-wxwidgets-0.7 0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) -iD8DBQFHYJXEiqiDRvmkBmIRAnzVAJsFAsps6pbGe//0U322Btkdmjo9tgCgst8r -hBKeK3gd2oS3RN0IfE09PLk= -=aKNA +iD8DBQFHabNQiqiDRvmkBmIRAvOGAKDUWjLMeqkcOa7RpW9XJQEYWHs97wCgo+4y +0mvbPZT+KP/vntqaYDbx8VU= +=goua -----END PGP SIGNATURE----- diff --git a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.7.ebuild index c4beb8db654a..6adb55df63c2 100644 --- a/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild +++ b/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.7.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.6.ebuild,v 1.1 2007/12/13 02:15:27 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/eselect-wxwidgets-0.7.ebuild,v 1.1 2007/12/20 00:11:50 dirtyepic Exp $ DESCRIPTION="Manage the system default for wxWidgets packages." HOMEPAGE="http://www.gentoo.org" @@ -11,7 +11,7 @@ SLOT="0" KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc64 ~sparc ~x86" IUSE="" -DEPEND="!<=x11-libs/wxGTK-2.6.4.0-r1" +DEPEND="!<=x11-libs/wxGTK-2.6.4.0-r2" RDEPEND="app-admin/eselect" src_install() { @@ -19,6 +19,9 @@ src_install() { newins "${FILESDIR}"/wxwidgets.eselect-${PV} wxwidgets.eselect \ || die "Failed installing module" + insinto /usr/share/aclocal + doins "${FILESDIR}"/wxwin.m4 + newbin "${FILESDIR}"/wx-config-${PV} wx-config newbin "${FILESDIR}"/wxrc-${PV} wxrc diff --git a/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6 b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.7 index e69de29bb2d1..e69de29bb2d1 100644 --- a/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.6 +++ b/app-admin/eselect-wxwidgets/files/digest-eselect-wxwidgets-0.7 diff --git a/app-admin/eselect-wxwidgets/files/wx-config-0.6 b/app-admin/eselect-wxwidgets/files/wx-config-0.7 index f9e1f2721b5e..550ae2eabc75 100755 --- a/app-admin/eselect-wxwidgets/files/wx-config-0.6 +++ b/app-admin/eselect-wxwidgets/files/wx-config-0.7 @@ -13,6 +13,22 @@ _wxerror() { exit 1 } +# Ebuilds should not use this wrapper and use wxwidgets.eclass instead. +#if [[ -n ${EBUILD_PHASE} ]]; then +# cat <<- EOF +#" +# +# +#*** This ebuild is attempting to use /usr/bin/wx-config directly. +#*** Please see wxwidgets.eclass for instructions how to add wxWidgets support +#*** to your package. +# +# +#" +# EOF +# exit 1 +#fi + if [[ -n ${WX_ECLASS_CONFIG} ]]; then ${WX_ECLASS_CONFIG} "$@" exit 0 diff --git a/app-admin/eselect-wxwidgets/files/wxrc-0.6 b/app-admin/eselect-wxwidgets/files/wxrc-0.7 index f578f1104c09..8a30541d43d7 100755 --- a/app-admin/eselect-wxwidgets/files/wxrc-0.6 +++ b/app-admin/eselect-wxwidgets/files/wxrc-0.7 @@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/bash - # # /usr/bin/wxrc # a lame wrapper by dirtyepic@gentoo.org @@ -12,6 +12,22 @@ _wxerror() { exit 1 } +# Ebuilds should not use this wrapper and use wxwidgets.eclass instead. +if [[ -n ${EBUILD_PHASE} ]]; then + cat <<- EOF +" + + +*** This ebuild is attempting to use /usr/bin/wxrc directly. +*** Please see wxwidgets.eclass for instructions how to add wxWidgets support +*** to your package. + + +" + EOF + exit 1 +fi + if [[ -n ${WX_ECLASS_CONFIG} ]]; then ${WX_ECLASS_CONFIG} "$@" exit 0 diff --git a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.7 index c5a696895563..ee3c95892339 100644 --- a/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6 +++ b/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.7 @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.6,v 1.1 2007/12/13 02:15:28 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-wxwidgets/files/wxwidgets.eselect-0.7,v 1.1 2007/12/20 00:11:50 dirtyepic Exp $ inherit config diff --git a/app-admin/eselect-wxwidgets/files/wxwin.m4 b/app-admin/eselect-wxwidgets/files/wxwin.m4 new file mode 100644 index 000000000000..52c55e2e6e6b --- /dev/null +++ b/app-admin/eselect-wxwidgets/files/wxwin.m4 @@ -0,0 +1,366 @@ +dnl --------------------------------------------------------------------------- +dnl Macros for wxWidgets detection. Typically used in configure.in as: +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl AM_OPTIONS_WXCONFIG +dnl ... +dnl ... +dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.3.4 or above. +dnl ]) +dnl fi +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LIBS="$LIBS $WX_LIBS" +dnl --------------------------------------------------------------------------- + +dnl --------------------------------------------------------------------------- +dnl AM_OPTIONS_WXCONFIG +dnl +dnl adds support for --wx-prefix, --wx-exec-prefix, --with-wxdir and +dnl --wx-config command line options +dnl --------------------------------------------------------------------------- + +AC_DEFUN([AM_OPTIONS_WXCONFIG], +[ + AC_ARG_WITH(wxdir, + [ --with-wxdir=PATH Use uninstalled version of wxWidgets in PATH], + [ wx_config_name="$withval/wx-config" + wx_config_args="--inplace"]) + AC_ARG_WITH(wx-config, + [ --with-wx-config=CONFIG wx-config script to use (optional)], + wx_config_name="$withval" ) + AC_ARG_WITH(wx-prefix, + [ --with-wx-prefix=PREFIX Prefix where wxWidgets is installed (optional)], + wx_config_prefix="$withval", wx_config_prefix="") + AC_ARG_WITH(wx-exec-prefix, + [ --with-wx-exec-prefix=PREFIX + Exec prefix where wxWidgets is installed (optional)], + wx_config_exec_prefix="$withval", wx_config_exec_prefix="") +]) + +dnl Helper macro for checking if wx version is at least $1.$2.$3, set's +dnl wx_ver_ok=yes if it is: +AC_DEFUN([_WX_PRIVATE_CHECK_VERSION], +[ + wx_ver_ok="" + if test "x$WX_VERSION" != x ; then + if test $wx_config_major_version -gt $1; then + wx_ver_ok=yes + else + if test $wx_config_major_version -eq $1; then + if test $wx_config_minor_version -gt $2; then + wx_ver_ok=yes + else + if test $wx_config_minor_version -eq $2; then + if test $wx_config_micro_version -ge $3; then + wx_ver_ok=yes + fi + fi + fi + fi + fi + fi +]) + +dnl --------------------------------------------------------------------------- +dnl AM_PATH_WXCONFIG(VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND +dnl [, WX-LIBS [, ADDITIONAL-WX-CONFIG-FLAGS]]]]) +dnl +dnl Test for wxWidgets, and define WX_C*FLAGS, WX_LIBS and WX_LIBS_STATIC +dnl (the latter is for static linking against wxWidgets). Set WX_CONFIG_NAME +dnl environment variable to override the default name of the wx-config script +dnl to use. Set WX_CONFIG_PATH to specify the full path to wx-config - in this +dnl case the macro won't even waste time on tests for its existence. +dnl +dnl Optional WX-LIBS argument contains comma- or space-separated list of +dnl wxWidgets libraries to link against (it may include contrib libraries). If +dnl it is not specified then WX_LIBS and WX_LIBS_STATIC will contain flags to +dnl link with all of the core wxWidgets libraries. +dnl +dnl Optional ADDITIONAL-WX-CONFIG-FLAGS argument is appended to wx-config +dnl invocation command in present. It can be used to fine-tune lookup of +dnl best wxWidgets build available. +dnl +dnl Example use: +dnl AM_PATH_WXCONFIG([2.6.0], [wxWin=1], [wxWin=0], [html,core,net] +dnl [--unicode --debug]) +dnl --------------------------------------------------------------------------- + +dnl +dnl Get the cflags and libraries from the wx-config script +dnl +AC_DEFUN([AM_PATH_WXCONFIG], +[ + dnl do we have wx-config name: it can be wx-config or wxd-config or ... + if test x${WX_CONFIG_NAME+set} != xset ; then + WX_CONFIG_NAME=wx-config + fi + + if test "x$wx_config_name" != x ; then + WX_CONFIG_NAME="$wx_config_name" + fi + + dnl deal with optional prefixes + if test x$wx_config_exec_prefix != x ; then + wx_config_args="$wx_config_args --exec-prefix=$wx_config_exec_prefix" + WX_LOOKUP_PATH="$wx_config_exec_prefix/bin" + fi + if test x$wx_config_prefix != x ; then + wx_config_args="$wx_config_args --prefix=$wx_config_prefix" + WX_LOOKUP_PATH="$WX_LOOKUP_PATH:$wx_config_prefix/bin" + fi + if test "$cross_compiling" = "yes"; then + wx_config_args="$wx_config_args --host=$host_alias" + fi + + dnl don't search the PATH if WX_CONFIG_NAME is absolute filename + if test -x "$WX_CONFIG_NAME" ; then + AC_MSG_CHECKING(for wx-config) + WX_CONFIG_PATH="$WX_CONFIG_NAME" + AC_MSG_RESULT($WX_CONFIG_PATH) + else + AC_PATH_PROG(WX_CONFIG_PATH, $WX_CONFIG_NAME, no, "$WX_LOOKUP_PATH:$PATH") + fi + + if test "$WX_CONFIG_PATH" != "no" ; then + WX_VERSION="" + + min_wx_version=ifelse([$1], ,2.2.1,$1) + if test -z "$5" ; then + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version]) + else + AC_MSG_CHECKING([for wxWidgets version >= $min_wx_version ($5)]) + fi + + WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args $5 $4" + + WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null` + wx_config_major_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_config_minor_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_config_micro_version=`echo $WX_VERSION | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + wx_requested_major_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + wx_requested_minor_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` + wx_requested_micro_version=`echo $min_wx_version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` + + _WX_PRIVATE_CHECK_VERSION([$wx_requested_major_version], + [$wx_requested_minor_version], + [$wx_requested_micro_version]) + + if test -n "$wx_ver_ok"; then + + AC_MSG_RESULT(yes (version $WX_VERSION)) + WX_LIBS=`$WX_CONFIG_WITH_ARGS --libs` + + dnl is this even still appropriate? --static is a real option now + dnl and WX_CONFIG_WITH_ARGS is likely to contain it if that is + dnl what the user actually wants, making this redundant at best. + dnl For now keep it in case anyone actually used it in the past. + AC_MSG_CHECKING([for wxWidgets static library]) + WX_LIBS_STATIC=`$WX_CONFIG_WITH_ARGS --static --libs 2>/dev/null` + if test "x$WX_LIBS_STATIC" = "x"; then + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(yes) + fi + + dnl starting with version 2.2.6 wx-config has --cppflags argument + wx_has_cppflags="" + if test $wx_config_major_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -gt 2; then + wx_has_cppflags=yes + else + if test $wx_config_minor_version -eq 2; then + if test $wx_config_micro_version -ge 6; then + wx_has_cppflags=yes + fi + fi + fi + fi + fi + + dnl starting with version 2.7.0 wx-config has --rescomp option + wx_has_rescomp="" + if test $wx_config_major_version -gt 2; then + wx_has_rescomp=yes + else + if test $wx_config_major_version -eq 2; then + if test $wx_config_minor_version -ge 7; then + wx_has_rescomp=yes + fi + fi + fi + if test "x$wx_has_rescomp" = x ; then + dnl cannot give any useful info for resource compiler + WX_RESCOMP= + else + WX_RESCOMP=`$WX_CONFIG_WITH_ARGS --rescomp` + fi + + if test "x$wx_has_cppflags" = x ; then + dnl no choice but to define all flags like CFLAGS + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` + WX_CPPFLAGS=$WX_CFLAGS + WX_CXXFLAGS=$WX_CFLAGS + + WX_CFLAGS_ONLY=$WX_CFLAGS + WX_CXXFLAGS_ONLY=$WX_CFLAGS + else + dnl we have CPPFLAGS included in CFLAGS included in CXXFLAGS + WX_CPPFLAGS=`$WX_CONFIG_WITH_ARGS --cppflags` + WX_CXXFLAGS=`$WX_CONFIG_WITH_ARGS --cxxflags` + WX_CFLAGS=`$WX_CONFIG_WITH_ARGS --cflags` + + WX_CFLAGS_ONLY=`echo $WX_CFLAGS | sed "s@^$WX_CPPFLAGS *@@"` + WX_CXXFLAGS_ONLY=`echo $WX_CXXFLAGS | sed "s@^$WX_CFLAGS *@@"` + fi + + ifelse([$2], , :, [$2]) + + else + + if test "x$WX_VERSION" = x; then + dnl no wx-config at all + AC_MSG_RESULT(no) + else + AC_MSG_RESULT(no (version $WX_VERSION is not new enough)) + fi + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + ifelse([$3], , :, [$3]) + + fi + else + + WX_CFLAGS="" + WX_CPPFLAGS="" + WX_CXXFLAGS="" + WX_LIBS="" + WX_LIBS_STATIC="" + WX_RESCOMP="" + + ifelse([$3], , :, [$3]) + + fi + + AC_SUBST(WX_CPPFLAGS) + AC_SUBST(WX_CFLAGS) + AC_SUBST(WX_CXXFLAGS) + AC_SUBST(WX_CFLAGS_ONLY) + AC_SUBST(WX_CXXFLAGS_ONLY) + AC_SUBST(WX_LIBS) + AC_SUBST(WX_LIBS_STATIC) + AC_SUBST(WX_VERSION) + AC_SUBST(WX_RESCOMP) +]) + +dnl --------------------------------------------------------------------------- +dnl Get information on the wxrc program for making C++, Python and xrs +dnl resource files. +dnl +dnl AC_ARG_ENABLE(...) +dnl AC_ARG_WITH(...) +dnl ... +dnl AM_OPTIONS_WXCONFIG +dnl ... +dnl AM_PATH_WXCONFIG(2.6.0, wxWin=1) +dnl if test "$wxWin" != 1; then +dnl AC_MSG_ERROR([ +dnl wxWidgets must be installed on your system +dnl but wx-config script couldn't be found. +dnl +dnl Please check that wx-config is in path, the directory +dnl where wxWidgets libraries are installed (returned by +dnl 'wx-config --libs' command) is in LD_LIBRARY_PATH or +dnl equivalent variable and wxWidgets version is 2.6.0 or above. +dnl ]) +dnl fi +dnl +dnl AM_PATH_WXRC([HAVE_WXRC=1], [HAVE_WXRC=0]) +dnl if test "x$HAVE_WXRC" != x1; then +dnl AC_MSG_ERROR([ +dnl The wxrc program was not installed or not found. +dnl +dnl Please check the wxWidgets installation. +dnl ]) +dnl fi +dnl +dnl CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS" +dnl CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY" +dnl CFLAGS="$CFLAGS $WX_CFLAGS_ONLY" +dnl +dnl LDFLAGS="$LDFLAGS $WX_LIBS" +dnl --------------------------------------------------------------------------- + + + +dnl --------------------------------------------------------------------------- +dnl AM_PATH_WXRC([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl +dnl Test for wxWidgets' wxrc program for creating either C++, Python or XRS +dnl resources. The variable WXRC will be set and substituted in the configure +dnl script and Makefiles. +dnl +dnl Example use: +dnl AM_PATH_WXRC([wxrc=1], [wxrc=0]) +dnl --------------------------------------------------------------------------- + +dnl +dnl wxrc program from the wx-config script +dnl +AC_DEFUN([AM_PATH_WXRC], +[ + AC_ARG_VAR([WXRC], [Path to wxWidget's wxrc resource compiler]) + + if test "x$WX_CONFIG_NAME" = x; then + AC_MSG_ERROR([The wxrc tests must run after wxWidgets test.]) + else + + AC_MSG_CHECKING([for wxrc]) + + if test "x$WXRC" = x ; then + dnl wx-config --utility is a new addition to wxWidgets: + _WX_PRIVATE_CHECK_VERSION(2,5,3) + if test -n "$wx_ver_ok"; then + WXRC=`$WX_CONFIG_WITH_ARGS --utility=wxrc` + fi + fi + + if test "x$WXRC" = x ; then + AC_MSG_RESULT([not found]) + ifelse([$2], , :, [$2]) + else + AC_MSG_RESULT([$WXRC]) + ifelse([$1], , :, [$1]) + fi + + AC_SUBST(WXRC) + fi +]) |